Database Assignment
Database Assignment
Database Assignment
Overview
Scenario
Facebook deals with data on a massive scale, with a growing number of Facebook Groups pages
structured as a plain text series of “posts”. A Facebook executive, recently graduated from the
Desautels Faculty of Management at McGill University, was reflecting on their time at school.
They recalled that as a poor penniless student, they had to save money wherever possible and
were buying their textbooks second hand. These were often in reasonable condition and much
less expensive than in bookstores. The executive also recalled using the Facebook Groups feature
back in the day to browse various listings of textbooks for sale. There were a multitude, as most
of these textbooks were thoroughly useless after the corresponding course was passed and done
with.
Out of curiosity, the executive visited a few such pages (see Appendix) for a dose of nostalgia.
They immediately noticed the unstructured nature of the posts. Unfortunately, the executive had
completely forgotten what they learned in INSY661, though they had an inkling that something
database-related could be implemented to make the pages more user-friendly.
This brave, unnamed executive contacted us, as they knew that the knowledge we had absorbed
in INSY661 was still freshly coursing through our veins. Their requirement was simple: take the
component elements of plain text posts from the main McGill Facebook textbook trade Group
and organize these elements into a database. Consequently, a new version of this Group page
would be implemented with users entering various textbook data in a more structured way,
making posts easier to navigate and allowing students to quickly locate what they were looking
for. No more scrolling through endless posts.
Details of Scope1
This should provide a basic framework for a structured version of a textbook Groups page.
Mission Statement
The purpose of the McGill textbook database is to add an organizational element to Facebook’s
current groups structure. Instead of plain text entries (posts), users should be able to search for
textbooks for sale according to department, course, price range, and location. This will allow
students to find exactly what they are looking for without having to scroll through dozens of
possibly outdated pages (see Appendix).
Mission Objectives
- maintain (enter, update, delete) data on courses
- maintain (enter, update, delete) data on textbooks
- maintain (enter, update, delete) data on buyers and sellers
- perform searches on courses' booklists
- perform searches on textbooks
- perform searches on sellers
- perform searches on prices
- perform searches based on location
- to track availability status of books
- to track price of books
- to track acceptable editions for courses
- to track no-longer-valid editions
- to report on sellers
- to report on price fluctuations / averages
- to report on number of books sold
- to report on number of books available
ERD
Assumptions:
Description of Attributes
Entity Name Attributes Description Data Type Nulls Multi- Derived Default
Valued
Textbook_Info ISBN13 Identifier for 14 chars No No No None
Textbook
Title Title of 30 variable chars No No No None
Textbook
Publisher Textbook 30 variable chars No No No None
publisher
Language Language of the 20 variable chars No No No None
text
Pages Number of Small int No No No None
pages of the
text
Author Author(s) of the 14 chars No Yes No None
book
User User ID Identifier for the Small int No No No None
user
Name Name of user 50 variable chars No No No None
Location Location of 50 variable chars Yes No No None
user
Contact Contact info for 50 variable chars No No No None
user
Entity Name Attributes Description Data Type Nulls Multi- Derived Default
Valued
Rating RatingID Identifier for the Small int No No No None
rating
Grade User’s rating Small int No No No None
Description Description of 100 variable chars Yes No No None
User’s rating
Transactions TransactionID Identifier for 14 chars No No No None
transaction
DateSold Date book was Datetime No No No None
sold
Location Location book 50 variable chars No No No None
was sold
NegPrice Negotiated price Float No No No None
of book
Textbooks for SellerBookID Identifier of Small int No No No None
Sale Textbook for
sale
Condition Condition of the 20 variable chars No No No None
book
Availability Whether or not 20 variable chars No No No None
the book is for
sale or has been
sold
Format Format of the 20 variable chars No No No None
book
Price Price of the Float No No No None
book
Discount Discount off the Float No No No None
price
Course CourseID Identifier of the Small int No No No None
course
Name Official course 20 variable chars No No No None
name
CourseCode Official course 15 variable chars No No No None
code
Department Associated 20 variable chars No No No None
department
ISBN13 Valid textbooks 14 chars No Yes No None
for the course
Relational Schema
Textbook_Info(ISBN13, Title, Publisher, Language, Pages)
Author( ISBN13 , Name)
FK: ISBN13 references Textbook_Info(ISBN13)