lab1_school_example_sql_EF

lab1_school_example_sql_EF - TIME varchar (5) ) ; rem...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
rem drop all school tables; drop table OFFERING; drop table STUDENT; drop table FACULTY; drop table ENROLLMENT; rem create enrollment table create table ENROLLMENT (OFFERINGNUM number (4) not null, STUDENTID number (3) not null ) ; rem insert enrollment data insert into Enrollment Values (1111, 100); insert into Enrollment Values (1233, 500); insert into Enrollment Values (2222, 300); insert into Enrollment Values (3333, 400); rem create Faculty table create table FACULTY (FACULTYID number (4) not null, NAME varchar(10), DEPARTMENT varchar(2), ADDRESS varchar(12), RANK varchar(10) ) ; rem insert Faculty data insert into Faculty Values (0980, 'MARTIN', 'IM', '11 MAIN', 'DEAN'); insert into Faculty Values (5430, 'SEAVER', 'IS', '12 SOUTH', 'PROFESSOR'); insert into Faculty Values (7650, 'LOONEY', 'IT', '14 NORTH', 'INSTRUCTOR'); insert into Faculty Values (9870, 'MILLS', 'SA', '16 EAST', 'LECTURER'); rem create OFFERING table create table OFFERING (OFFERINGNUM number (4) not null, COURSENUM varchar (5), FACULTYID number (4), TERM varchar(6),
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
YEAR varchar(4),
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: TIME varchar (5) ) ; rem insert Offering data insert into Offering Values (1111, 'IS320', 5430, 'FALL', '2001', '10 AM'); insert into Offering Values (1233, 'IS320', 0980, 'FALL', '2001', '11 AM'); insert into Offering Values (2222, 'IS460', 7650, 'SPRING', '2002', '10 AM'); insert into Offering Values (3333, 'IT480', 5430, 'SPRING', '2002', '11 AM'); rem create Student table create table STUDENT (STUDENTID number (3) not null, NAME varchar(10), MAJOR varchar(16), STATUS varchar(2), ADDRESS varchar(12), GPA number(3,2) ) ; rem insert Student data insert into Student Values (100, 'ABLE', 'HISTORY', 'SR', '1 UTAH', 3.00); insert into Student Values (200, 'BAKER', 'ACCOUNTING', 'JR', '2 IOWA', 2.70); insert into Student Values (300, 'CHARLES', 'MATH', 'SR', '3 MAINE', 3.50); insert into Student Values (400, 'DRAKE', 'COMPUTER SCIENCE', 'FR', '4 IDAHO', 2.80); insert into Student Values (500, 'ELLIOT', 'COMPUTER SCIENCE', 'SM', '5 NEVADA', 3.25); rem end of school example...
View Full Document

This note was uploaded on 12/23/2009 for the course DBST dbst 668 taught by Professor Yelena - ta during the Spring '09 term at MD University College.

Page1 / 2

lab1_school_example_sql_EF - TIME varchar (5) ) ; rem...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online