Skip to content

Instantly share code, notes, and snippets.

@onzfonz
Last active January 29, 2018 19:17
Show Gist options
  • Save onzfonz/f59c08a9ad0841921ef5 to your computer and use it in GitHub Desktop.
Save onzfonz/f59c08a9ad0841921ef5 to your computer and use it in GitHub Desktop.
Sample Library Information for Elmasri & Navathe DB State
group: Elmasri & Navathe Possible Library DB State
description[[ this is a potential set of data based on the Library Schema from the Elmasri & Navathe (Fundamentals of Database Systems Textbook) While it is based on the Schema, this is not from the book.
The relation _Book_ contains basic information about a book
The relation _Book_authors_ contains basic information about authors of books
The relation _Publisher_ contains basic information about a publisher
The relation _Book_copies_ contains information about the number of copies of a particular book
The relation _Book_loans_ contains information on Loans done at a library
The relation _Library Branch_ has simple information about one branch in a library system
The relation _Borrower_ has information about the library patrons
]]
Book = {
Book_id, Title, Publisher_name
1, First-100-Words, Priddy-Books
2, Harry-Potter, Pottermore
3, Hunger-Games, Scholastic
4, Databases, Pearson
}
Book_authors = {
Book_id, Author_name
1, Priddy
2, Rowling
3, Collins
4, Elmasri
5, Navathe
}
Publisher = {
Name, Address, Phone
Priddy-Books, NY, 800-555-9999
Pottermore, UK, 800-555-9998
Scholastic, NY, 800-555-9997
Pearson, NJ, 800-555-9996
}
Book_copies = {
Book_id, Branch_id, No_of_copies
1, 1, 2
1, 2, 1
1, 3, 2
2, 1, 2
2, 2, 2
2, 3, 3
2, 4, 4
2, 5, 10
2, 6, 1
3, 1, 5
3, 2, 8
3, 3, 11
3, 4, 5
3, 5, 7
3, 6, 8
4, 1, 1
4, 2, 2
4, 3, 4
4, 5, 1
4, 6, 3
}
Book_loans = {
Book_id, Branch_id, Card_no, Date_out:date, Due_date:date
1, 1, 100, 2017-08-19, 2017-11-18
1, 2, 101, 2017-12-20, 2018-03-19
1, 3, 102, 2017-12-21, 2018-03-20
1, 3, 103, 2017-12-22, 2018-03-21
2, 1, 104, 2017-12-23, 2018-03-22
2, 1, 105, 2017-12-24, 2018-03-23
2, 2, 106, 2017-12-25, 2018-03-24
2, 3, 107, 2017-12-26, 2018-03-25
2, 3, 108, 2017-12-27, 2018-03-26
2, 4, 109, 2017-12-28, 2018-03-27
2, 4, 110, 2017-12-29, 2018-03-28
2, 4, 111, 2017-12-30, 2018-03-29
2, 5, 112, 2017-12-31, 2018-03-30
2, 5, 113, 2018-01-01, 2018-03-31
2, 5, 114, 2018-01-02, 2018-04-01
2, 5, 115, 2018-01-03, 2018-04-02
2, 5, 116, 2018-01-04, 2018-04-03
2, 5, 117, 2018-01-05, 2018-04-04
2, 5, 118, 2018-01-06, 2018-04-05
2, 6, 119, 2018-01-07, 2018-04-06
3, 1, 120, 2018-01-08, 2018-04-07
3, 1, 121, 2018-01-09, 2018-04-08
3, 1, 122, 2018-01-10, 2018-04-09
3, 1, 123, 2018-01-11, 2018-04-10
3, 2, 124, 2018-01-12, 2018-04-11
3, 2, 125, 2018-01-13, 2018-04-12
3, 2, 126, 2018-01-14, 2018-04-13
3, 2, 127, 2018-01-15, 2018-04-14
3, 2, 128, 2018-01-16, 2018-04-15
3, 2, 129, 2018-01-17, 2018-04-16
3, 2, 130, 2018-01-18, 2018-04-17
3, 3, 131, 2018-01-19, 2018-04-18
3, 3, 132, 2018-01-20, 2018-04-19
3, 3, 133, 2018-01-21, 2018-04-20
3, 3, 134, 2018-01-22, 2018-04-21
3, 3, 135, 2018-01-23, 2018-04-22
3, 3, 136, 2018-01-24, 2018-04-23
3, 3, 137, 2018-01-25, 2018-04-24
3, 4, 138, 2018-01-26, 2018-04-25
3, 4, 139, 2018-01-27, 2018-04-26
3, 5, 140, 2018-01-28, 2018-04-27
3, 6, 141, 2018-01-29, 2018-04-28
4, 1, 142, 2018-01-30, 2018-04-29
4, 2, 143, 2018-01-31, 2018-04-30
4, 3, 144, 2018-02-01, 2018-05-01
4, 6, 145, 2018-02-02, 2018-05-02
}
Library_branch = {
Branch_id, Branch_name, Address
1, Knox-Holt, UOP
2, Green, Stanford
3, Cubberley, Stanford
4, Health-Sciences, UOP
5, Shields, Davis
6, University, Turlock
}
Borrower = {
Card_no, Name, Phone
100, Mitchell, 555-0023
101, Jillian, 555-0022
102, Ryan, 555-0016
103, Carissa, 555-0042
104, Sahib, 555-0024
105, Alex, 555-5309
106, John, 555-0012
107, Kyle, 555-0007
108, Max, 555-0040
109, Link, 555-0013
110, Dorothy, 555-0028
111, Drew, 555-0000
112, Mark, 555-0008
113, An, 555-0019
114, Michael, 555-0021
115, Norlan, 867-5309
116, Jeremy, 555-0015
117, Alicia, 555-0027
118, Hillary, 555-0034
119, Antonio, 555-0017
120, Edgar, 555-0028
121, Kyle, 555-0018
122, Naomi, 555-0038
123, Jaskaran, 555-0032
124, Link, 555-0025
125, Tom, 555-0031
126, Lisa, 555-0038
127, Marth, 555-0006
128, Mario, 555-0014
129, Pikachu, 555-0026
130, Fox, 555-0039
131, Kirby, 555-0010
132, Katya, 555-0008
133, Samus, 555-0037
134, Yoshi, 555-0009
135, Snake, 555-0011
136, Danilo, 555-0008
137, Jigglypuff, 555-0041
138, Mario, 555-0020
139, Osvaldo, 555-5555
140, Bowser, 555-0030
141, Ness, 555-0035
142, Clement, 555-0018
143, Powercat, 555-0033
144, Wario, 555-0036
145, Leeroy, 555-0003
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment