Skip to content

Instantly share code, notes, and snippets.

@joe4dev
Last active February 3, 2021 13:02
Show Gist options
  • Select an option

  • Save joe4dev/80a49769c15c993a386c3074b7741255 to your computer and use it in GitHub Desktop.

Select an option

Save joe4dev/80a49769c15c993a386c3074b7741255 to your computer and use it in GitHub Desktop.
group: COMPANY DB
description: The COMPANY database from Chapter 3 "Fundamentals of Database Systems" by Elmasri and Navathe.
EMPLOYEE = {
Fname:string, Minit:string, Lname:string, Ssn:string , Bdate:date, Address:string , Sex:string, Salary:number, Super_Ssn:string, Dno:number
'James' , 'E' , 'Borg' , '888665555', 1937-11-10, '450 Stone, Houston, TX' , 'M' , 55000 , null , 1
'Jennifer' , 'S' , 'Wallace' , '987654321', 1941-06-20, '291 Berry, Bellaire, Tx' , 'F' , 37000 , '888665555' , 4
'Franklin' , 'T' , 'Wong' , '333445555', 1955-12-08, '638 Voss, Houston, TX' , 'M' , 40000 , '888665555' , 5
'John' , 'B' , 'Smith' , '123456789', 1965-01-09, '731 Fondren, Houston, TX' , 'M' , 30000 , '333445555' , 5
'Alicia' , 'J' , 'Zelaya' , '999887777', 1968-01-19, '3321 castle, Spring, TX' , 'F' , 25000 , '987654321' , 4
'Ramesh' , 'K' , 'Narayan' , '666884444', 1920-09-15, '975 Fire Oak, Humble, TX' , 'M' , 38000 , '333445555' , 5
'Joyce' , 'A' , 'English' , '453453453', 1972-07-31, '5631 Rice, Houston, TX' , 'F' , 25000 , '333445555' , 5
'Ahmad' , 'V' , 'Jabbar' , '987987987', 1969-03-29, '980 Dallas, Houston, TX' , 'M' , 22000 , '987654321' , 4
'Melissa' , 'M' , 'Jones' , '808080808', 1970-07-10, '1001 Western, Houston, TX', 'F' , 27500 , '333445555' , 5
}
DEPARTMENT = {
Dname:string , Dnumber:number, Mgr_ssn:string, Mgr_start_date:date
'Research' , 5 , '333445555' , 1988-05-22
'Administration', 4 , '987654321' , 1995-01-01
'Headquarters' , 1 , '888665555' , 1981-06-19
}
DEPT_LOCATIONS = {
Dnumber:number, Dlocation:string
1 , 'Houston'
4 , 'Stafford'
5 , 'Bellaire'
5 , 'Sugarland'
5 , 'Austin'
}
PROJECT = {
Pname:string , Pnumber:number, Plocation:string, Dnum:number
'ProductX' , 1 , 'Bellaire' , 5
'ProductY' , 2 , 'Sugarland' , 5
'ProductZ' , 3 , 'Houston' , 5
'Computerization', 10 , 'Stafford' , 4
'Reorganization' , 20 , 'Houston' , 1
'Newbenefits' , 30 , 'Stafford' , 4
}
WORKS_ON = {
Essn:string, Pno:number, Hours:number
'123456789', 1 , 32
'123456789', 2 , 8
'453453453', 1 , 20
'453453453', 2 , 20
'333445555', 1 , 10
'333445555', 2 , 10
'333445555', 3 , 5
'333445555', 10 , 10
'333445555', 20 , 10
'333445555', 30 , 5
'999887777', 30 , 30
'999887777', 10 , 10
'987987987', 10 , 35
'987987987', 30 , 5
'987654321', 30 , 20
'987654321', 20 , 15
'888665555', 20 , 10
}
DEPENDENT = {
Essn:string, Dependent_name:string, Sex:string, Bdate:date, Relationship:string
'333445555', 'Alice' , 'F' , 1986-04-05, 'Daughter'
'333445555', 'Theodore' , 'M' , 1983-10-25, 'Son'
'333445555', 'Joy' , 'F' , 1958-05-03, 'Spouse'
'987654321', 'Abner' , 'M' , 1988-01-04, 'Son'
'987654321', 'Jennifer' , 'F' , 1988-01-04, 'Daughter'
'123456789', 'John' , 'M' , 1988-02-28, 'Son'
'123456789', 'Alice' , 'F' , 1988-12-30, 'Daughter'
'123456789', 'Elizabeth' , 'F' , 1967-05-05, 'Spouse'
'453453453', 'Joyce' , 'F' , 1990-04-05, 'Daughter'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment