Skip to content

Instantly share code, notes, and snippets.

@DemiurgeApeiron
Last active April 6, 2021 18:03
Show Gist options
  • Save DemiurgeApeiron/94f418b7e24b0d33ab64efc1fc329c36 to your computer and use it in GitHub Desktop.
Save DemiurgeApeiron/94f418b7e24b0d33ab64efc1fc329c36 to your computer and use it in GitHub Desktop.
DataSet Relational Algebra Exercise 1
group: Company DB Elmasri & Navathe Figure 5.6
description[[ the data for this dataset was taken from the Elmasri & Navathe (Fundamentals of Database Systems Textbook) with some minor modifications
The relation _Employee_ contains basic information about the employees at a company
The relation _Dependent_ contains basic information about each employees dependents
The relation _Department_ contains basic information about the dept and its manager
The relation _Dept_Locations_ contains info on where each department has offices
The relation _Project_ contains basic information on each project and which dept it is in
The relation _Works_On_ contains information on how much each employee works on each project
]]
Employee = {
FNAME, MINIT, LNAME, SSN:number, BDATE, ADDRESS, SEX, SALARY:number, SUPER_SSN:number, DNO:number
John, B, Smith, 123456789, 1965-01-09, 731-Fondren-Houston-TX, M, 30000.00, 333445555, 5
Franklin, T, Wong, 333445555, 1955-12-08, 638-Voss-Houston-TX, M, 40000.00, 888665555, 5
Joyce, A, English, 453453453, 1972-07-31, 5631-Rice-Houston-TX, F, 25000.00, 333445555, 5
Ramesh, K, Narayan, 666884444, 1962-09-15, 975-Fire-Oak-Humble-TX, M, 38000.00, 333445555, 5
James, E, Borg, 888665555, 1937-11-10, 450-Stone-Houston-TX, M, 55000.00, NULL, NULL
Jennifer, S, Wallace, 987654321, 1941-06-20, 291-Berry-Bellaire-TX, F, 43000.00, 888665555, 4
Ahmad, V, Jabbar, 987987987, 1969-03-29, 980-Dallas-Houston-TX, M, 25000.00, 987654321, 4
Alicia, J, Zelaya, 999887777, 1968-01-19, 3321-Castle-Spring-TX, F, 25000.00, 987654321, 4
}
Dependent = {
ESSN:number, DEPENDENT_NAME, SEX, BDATE, RELATIONSHIP
123456789, Alice, F, 1905-05-01, Daughter
123456789, Elizabeth, F, 1905-05-12, Spouse
123456789, Michael, M, 1905-06-07, Son
333445555, Alice, F, 1905-06-01, Daughter
333445555, Joy, F, 1905-05-05, Spouse
333445555, Theodore, M, 1905-05-23, Son
987654321, Abner, M, 1905-03-28, Spouse
}
Department = {
DNAME, DNUMBER:number, MGR_SSN:number, MGR_START_DATE
Headquarters, 1, 888665555, 1905-05-11
Administration, 4, 987654321, 1905-06-17
Research, 5, 333445555, 1988-05-16
}
Dept_locations = {
DNUMBER:number, DLOCATION
1, Houston
4, Stafford
5, Bellaire
5, Houston
5, Sugarland
}
Project = {
PNAME, PNUMBER:number, PLOCATION, 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:number, PNO:number, HOURS:number
123456789, 1, 32.50
123456789, 2, 7.50
123456789, 10, 0.00
123456789, 20, 0.00
333445555, 2, 10.00
333445555, 3, 10.00
333445555, 10, 10.00
333445555, 20, 10.00
}
@DemiurgeApeiron
Copy link
Author

DataSet Relational Algebra Exercise 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment