Relational Schema of Database:



Similar documents
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";! SET time_zone = "+00:00";!

A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks

Tutorial: How to Use SQL Server Management Studio from Home

Application note: Connecting the to a Database

Online shopping cart. Tarik Guelzim Graduate school of computer science at Monmouth University. CS517 Database management systems Project 2

Using SQL Server Management Studio

Oracle Database 10g Express

A basic create statement for a simple student table would look like the following.

Create a Database Driven Application

EECS 647: Introduction to Database Systems

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

IRF2000 IWL3000 SRC1000 Application Note - Apps with OSGi - Condition Monitoring with WWH push

Customer Bank Account Management System Technical Specification Document

MySQL Quick Start Guide

SQL NULL s, Constraints, Triggers

Mul$media im Netz (Online Mul$media) Wintersemester 2014/15. Übung 03 (Nebenfach)

CSC 443 Data Base Management Systems. Basic SQL

Introduction to SQL ( )

Server side scripting and databases

Lab 2: PostgreSQL Tutorial II: Command Line

We begin with a number of definitions, and follow through to the conclusion of the installation.

The Relational Model. Why Study the Relational Model?

TAMS Analyzer 3 and Multi-User Projects. By Matthew Weinstein

Extracting META information from Interbase/Firebird SQL (INFORMATION_SCHEMA)

Database Security. Principle of Least Privilege. DBMS Security. IT420: Database Management and Organization. Database Security.

A Brief Introduction to MySQL

!"# $ %& '( ! %& $ ' &)* + ! * $, $ (, ( '! -,) (# *&23. mysql> select * from from clienti;

SQL. Short introduction

Databases What the Specification Says

CSCI110 Exercise 4: Database - MySQL

8- Management of large data volumes

IMPLEMENTATION OF SUBJECTSPLUS AT ZAMAN UNIVERSITY, CAMBODIA

SQL Tables, Keys, Views, Indexes

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

Certified PHP/MySQL Web Developer Course

Dictionary (catálogo)

Installing Drupal on Your Local Computer

How to install phpbb forum on NTU student club web server

IT2305 Database Systems I (Compulsory)

Database Administration with MySQL

Using Netbeans and the Derby Database for Projects Contents

Estructura de aplicación en PHP para System i

SQL DATA DEFINITION: KEY CONSTRAINTS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7

SQL Programming. CS145 Lecture Notes #10. Motivation. Oracle PL/SQL. Basics. Example schema:

php tek 2006 in Orlando Florida Lukas Kahwe Smith

Lecture 6. SQL, Logical DB Design

How To Create A Table In Sql (Ahem)

Introduction to Triggers using SQL

2. Oracle SQL*PLUS Winter Some SQL Commands. To connect to a CS server, do:

Designing for Dynamic Content

Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems

In This Lecture. SQL Data Definition SQL SQL. Notes. Non-Procedural Programming. Database Systems Lecture 5 Natasha Alechina

Database Query 1: SQL Basics

CPE111 COMPUTER EXPLORATION

SVN Authentication and Authorization

Designing and Implementing an Online Bookstore Website

IT2304: Database Systems 1 (DBS 1)

Database Migration : An In Depth look!!

SQL Injection. Blossom Hands-on exercises for computer forensics and security

Create e-commerce website Opencart. Prepared by : Reth Chantharoth Facebook : rtharoth@yahoo.

CREATE SCHEMA IF NOT EXISTS `FIV` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ; USE `FIV` ;

Using CertAgent to Obtain Domain Controller and Smart Card Logon Certificates for Active Directory Authentication

Configuring an Alternative Database for SAS Web Infrastructure Platform Services

Point-of-Sale (POS) Users Guide Lech José Olmedo Guerrero Jaime Herrerro Gallardo RTAC Americas

Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst

Faculty of Engineering and Architecture. Computer Engineering Department DATABASE MANAGEMENT SYSTEMS POSTLAB #3 SOLUTION

Developing SQL and PL/SQL with JDeveloper

MySQL quick start guide

Tutorial 3 The Relational Database Model

UC8XX LCD and Web GUI custom Guide

types, but key declarations and constraints Similar CREATE X commands for other schema ëdrop X name" deletes the created element of beer VARCHARè20è,

VIP Help Desk Web Application User Guide Version 3.0

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

B.1 Database Design and Definition

Building Data-centric Websites with Dataface. Steve Hannah Faculty of Applied Sciences Simon Fraser University

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

Using SQL Developer. Copyright 2008, Oracle. All rights reserved.

Scenario: Law Office Management System / Law (Legal) Practice Management System

14 Triggers / Embedded SQL

Web Hosting Wordpress, Joomla, Drupal Integration

Intermediate SQL C H A P T E R4. Practice Exercises. 4.1 Write the following queries in SQL:

Add User to Administrators Group using SQL Lookup Table

Tonido Cloud Admin Guide

Conventional Files versus the Database. Files versus Database. Pros and Cons of Conventional Files. Pros and Cons of Databases. Fields (continued)

Using Internet or Windows Explorer to Upload Your Site

The Whole OS X Web Development System

PHP+MYSQL, EASYPHP INSTALLATION GUIDE

MySQL Quick Start Guide

Linas Virbalas Continuent, Inc.

Creating Database Tables in Microsoft SQL Server

There are five fields or columns, with names and types as shown above.

equate Installation QUICK START GUIDE

FileMaker 13. ODBC and JDBC Guide

CSCE 156H/RAIK 184H Assignment 4 - Project Phase III Database Design

Transcription:

Relational Schema of Database:

DDL Commands(with an instance example used for testing the page): phpmyadmin SQL Dump version 3.4.10.1deb1 http://www.phpmyadmin.net Servidor: localhost Tiempo de generación: 07-11-2012 a las 23:48:54 Versión del servidor: 5.5.24 Versión de PHP: 5.3.10-1ubuntu3.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; Base de datos: `g3` Estructura de tabla para la tabla `Applies`

CREATE TABLE IF NOT EXISTS `Applies` ( `sid` int(11) NOT NULL DEFAULT '0', `oid` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`sid`,`oid`), KEY `oid` (`oid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Volcado de datos para la tabla `Applies` INSERT INTO `Applies` (`sid`, `oid`) VALUES (1, 122319), (16, 122319); Estructura de tabla para la tabla `Company` CREATE TABLE IF NOT EXISTS `Company` ( `pid` int(11) NOT NULL, `cname` char(20) NOT NULL, `Type` varchar(25) NOT NULL, `Description` char(100) NOT NULL, `Logo` varchar(50) NOT NULL,

`Webpage` varchar(50) DEFAULT NULL, `cpassword` varchar(50) NOT NULL, PRIMARY KEY (`pid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Volcado de datos para la tabla `Company` INSERT INTO `Company` (`pid`, `cname`, `Type`, `Description`, `Logo`, `Webpage`, `cpassword`) VALUES (7, 'CGS', 'Financial', '', '', NULL, ''), (28, 'VMI dxblol', '', '', '', NULL, ''), (29, 'VMI dxblolmama', '', '', '', NULL, ''), (30, 'VMI dxblolma', '', '', '', NULL, ''), (37, 'bab', '', '', '', NULL, ''), (39, 'Vvv', '', '', '', NULL, ''), (40, 'Custom Guitar Shop', 'Engineering', 'JEJEJEJJE funciona', '40C', 'www.orellanof.com', ''); Estructura de tabla para la tabla `Individual` CREATE TABLE IF NOT EXISTS `Individual` ( `pid` int(11) NOT NULL DEFAULT '0', `Name` varchar(25) NOT NULL, `Email` varchar(25) NOT NULL,

`Password` varchar(50) NOT NULL, PRIMARY KEY (`pid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Volcado de datos para la tabla `Individual` INSERT INTO `Individual` (`pid`, `Name`, `Email`, `Password`) VALUES (38, 'nna', '', ''); Estructura de tabla para la tabla `Opportunity` CREATE TABLE IF NOT EXISTS `Opportunity` ( `oid` int(11) NOT NULL AUTO_INCREMENT, `pid` int(11) NOT NULL, `Location` varchar(50) NOT NULL, `Description` text NOT NULL, `otype` text NOT NULL, `Requirements` text, `Major` text NOT NULL, `Title` text NOT NULL, `Date` date NOT NULL, PRIMARY KEY (`oid`),

KEY `pid` (`pid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=122333 ; Volcado de datos para la tabla `Opportunity` INSERT INTO `Opportunity` (`oid`, `pid`, `Location`, `Description`, `otype`, `Requirements`, `Major`, `Title`, `Date`) VALUES (1, 1, '', '', '', NULL, '', '', '2012-11-06'), (122319, 19, '', '', 'Internship', 'Ser mamao', 'Engineering', 'Ricky sexy', '2012-11-16'), (122326, 40, '', 'a', 'Internship', 'a', 'Computer Engineering', 'ma', '2012-11-16'), (122332, 40, '', 'a', 'Co-op', 'a', 'Computer Engineering', 'ma', '2012-11-16'); Estructura de tabla para la tabla `OpportunityProvider` CREATE TABLE IF NOT EXISTS `OpportunityProvider` ( `pid` int(11) NOT NULL AUTO_INCREMENT, `cname` char(20) NOT NULL, `cpassword` varchar(50) NOT NULL, PRIMARY KEY (`pid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=41 ;

Volcado de datos para la tabla `OpportunityProvider` INSERT INTO `OpportunityProvider` (`pid`, `cname`, `cpassword`) VALUES (1, 'ICS Connect', ''), (2, 'ICS Connect', '123'), (4, 'x', 'xx'), (5, 'jkgkjgk', 'vv'), (6, 'x', ''), (7, 'b', ''), (11, 'ics', '123'), (12, 'ics', '12'), (13, 'momo', 'nini'), (14, 'x', 'b'), (15, 'gua', 'g'), (18, 'masillano@upr.edu', 'me'), (19, 'masilano@upr.edu', 'chi'), (21, 'CGS', 'manolo'), (28, 'VMI dxblol', 'd'), (29, 'VMI dxblolmama', 'ma'), (30, 'VMI dxblolma', 'x'), (37, 'bab', 'ba'), (38, 'nna', 'na'), (39, 'Vvv', 'v'), (40, 'Custom Guitar Shop', 'lespaul');

Estructura de tabla para la tabla `Sresume` CREATE TABLE IF NOT EXISTS `Sresume` ( `sid` int(11) NOT NULL DEFAULT '0', `ResumeLink` varchar(50) NOT NULL, PRIMARY KEY (`sid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Volcado de datos para la tabla `Sresume` INSERT INTO `Sresume` (`sid`, `ResumeLink`) VALUES (14, '14'), (16, '16'); Estructura de tabla para la tabla `Student` CREATE TABLE IF NOT EXISTS `Student` ( `sid` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(50) NOT NULL, `Email` varchar(25) NOT NULL,

`GPA` float DEFAULT NULL, `Year` varchar(3) DEFAULT NULL, `Graduation` date DEFAULT NULL, `PictureLink` varchar(50) DEFAULT 'DEFAULT.jpg', `Password` varchar(50) NOT NULL, `Major` char(20) NOT NULL, PRIMARY KEY (`sid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=69 ; Volcado de datos para la tabla `Student` INSERT INTO `Student` (`sid`, `Name`, `Email`, `GPA`, `Year`, `Graduation`, `PictureLink`, `Password`, `Major`) VALUES (1, 'john', 'john@upr.edu', 2, '3', NULL, NULL, '1234', 'Engineering'), (14, 'Ricardo Marrero', 'ricardo.marrero3@upr.edu', 3, '5', NULL, '14', 'warcry', 'Engineering'), (16, 'Jose Orellano', 'j.orellano@ieee.org', 3.22, '5', '0000-00-00', '16', 'sdfghj', 'Computer Engineering'), (59, '', 'adalgisa.lopez@upr.edu', NULL, NULL, NULL, NULL, 'lamoca453', ''), (60, '', 'juan_23_896@hotmail.com', NULL, NULL, NULL, NULL, '11', ''), (63, '', 'jose.orellano@upr.edu', NULL, NULL, NULL, NULL, 'fofo', ''), (64, 'Arelis Guerrero', 'arelis.guerrero@upr.edu', 3.06, '5', '0000-00-00', NULL, 'joseanormal', 'ICOM'), (65, '', 'masillano@upr.edu', NULL, NULL, '2012-11-01', NULL, 'me', ''), (66, 'lissy', 'lissyorellano@hotmail.com', 3.75, '2', '0000-00-00', NULL, 'saterman1', 'homewrecker'), (67, '', 'MECASO@U.OM', NULL, NULL, NULL, 'DEFAULT.jpg', 'S', ''), (68, '', 'jose1.orellano@upr.edu', NULL, NULL, NULL, 'DEFAULT.jpg', 'jiji', '');

Restricciones para tablas volcadas Filtros para la tabla `Applies` ALTER TABLE `Applies` ADD CONSTRAINT `Applies_ibfk_1` FOREIGN KEY (`sid`) REFERENCES `Student` (`sid`), ADD CONSTRAINT `Applies_ibfk_2` FOREIGN KEY (`oid`) REFERENCES `Opportunity` (`oid`); Filtros para la tabla `Company` ALTER TABLE `Company` ADD CONSTRAINT `Company_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `OpportunityProvider` (`pid`); Filtros para la tabla `Individual` ALTER TABLE `Individual` ADD CONSTRAINT `Individual_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `OpportunityProvider` (`pid`); Filtros para la tabla `Opportunity` ALTER TABLE `Opportunity` ADD CONSTRAINT `Opportunity_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `OpportunityProvider` (`pid`);

Filtros para la tabla `Sresume` ALTER TABLE `Sresume` ADD CONSTRAINT `Sresume_ibfk_1` FOREIGN KEY (`sid`) REFERENCES `Student` (`sid`) ON DELETE CASCADE; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; Source code: Download and installation instructions: To download the code, go to http://icom5016.ece.uprm.edu/~g3/ics%20connect.zip and after downloading it, unzip it in the server. This code does not need to be compiled, just save the public_html folder in the server and access it using a browser.