Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam-dziedzic/0cd94d0b0871b1c9e08edef20c516301 to your computer and use it in GitHub Desktop.
Save adam-dziedzic/0cd94d0b0871b1c9e08edef20c516301 to your computer and use it in GitHub Desktop.
This is the dataset which should be used for homework 1 (Database course, University of Chicago)
group: database schema
description[[ the data for exercises 6.10 - 6.14]]
course = { course_id, title, dept_name, credits
BIO-101 Intro_to_Biology Biology, 4
BIO-301 Genetics Biology 4
BIO-399 Computional_Biology Biology 3
CS-101 Intro_to_computer_science Comp.Sci. 4
HIS-100 Ancient_Greece History 1
HIS-102 Ancient_Egypt History 2
}
takes = { ID course_id sec_id semester year grade
00128 CS-101 1 Winter 2009 A
00128 CS-347 1 Winter 2009 C-
19991 HIS-100 2 Spring 2010 B
19991 HIS-102 1 Spring 2008 A
12345 CS-347 1 Winter 2011 A-
00000 CS-101 1 Winter 2009 A
00000 CS-347 2 Spring 2009 A
}
student = { ID name dept_name tot_cred
00128 Zhang Comp.Sci. 102
12345 Shankar Comp.Sci. 32
19991 Brandt History 80
00000 Adam Comp.Sci. 100
}
instructor = {ID name dept_name salary
10101 Srinivasan Comp.Sci. 6500
12121 Wu Finance 90000
15151 Mozart Music 40000
10000 Jackson Comp.Sci. 7000
20000 Vivaldi Music 10000
30000 Buffet Finance 100000
}
employee = {person_name street city
adam kenwood chicago
bob kimbark chicago
joe michigan chicago
justyna medykow katowice
olga medykow katowice
weronika sloneczna warszawa
lukasz pulawska warszawa
bartek marszalkowska warszawa
}
works = {person_name company_name salary
adam 'First Bank Corporation' 2500
bob 'First Bank Corporation' 11000
joe 'First Bank Corporation' 1000
justyna hospital 20000
olga hospital 19000
weronika office 4000
lukasz it 10000
bartek it 15000
}
company = { company_name city
'First Bank Corporation' chicago
'First Bank Corporation' warszawa
'First Bank Corporation' 'new york'
hospital warszawa
hospital chicago
hospital chorzow
office pruszkow
it warszawa
'Small Bank Corporation' warszawa
'Small Bank Corporation' chicago
}
manages = {person_name, manager_name
adam bob
lukasz bartek
olga justyna
}
member = {memb_no name dob
1 adam 123
2 mike 456
3 jack 789
4 lukasz 100
5 tomasz 111
6 weronika 101
7 bartek 222
}
books = {isbn title authors publisher
1 "7 habits" napoleon "McGraw-Hill"
2 "what you think" feynman "mit press"
3 "pragmatic programmer" "andre hunt" "pragmatic"
4 "java 8" bob "McGraw-Hill"
5 "ruby" jack "McGraw-Hill"
6 "c++" samuel "McGraw-Hill"
7 "python" adam "McGraw-Hill"
8 databases mike "mit press"
9 "operating systems" andrew "mit press"
10 "c programming" denis "McGraw-Hill"
11 "c#" bill "McGraw-Hill"
}
borrowed = {memb_no isbn date
1 11 "2016.01.01"
1 10 "2016.01.02"
1 1 "2016.01.03"
1 4 "2016.01.03"
1 5 "2016.01.03"
1 6 "2016.01.03"
1 7 "2016.01.03"
1 8 "2016.01.03"
2 8 "2016.01.04"
5 11 "2016.01.03"
4 11 "2016.01.01"
4 10 "2016.01.02"
4 1 "2016.01.03"
4 4 "2016.01.03"
4 5 "2016.01.03"
4 6 "2016.01.03"
4 7 "2016.01.03"
4 8 "2016.01.03"
7 1 "2016.01.03"
7 4 "2016.01.03"
7 5 "2016.01.03"
7 6 "2016.01.03"
7 7 "2016.01.03"
7 10 "2016.01.03"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment