SQL ASSIGNMENT HELP
The problem domain is the same as that you came across earlier in Assignment 1. For convenience its description is reproduced below. Also, following the domain description, is provided a simplified relational data model for the problem domain.
This case study deals with a system used by a Book Shop Chain, known as Sydney Book House (SBH). The information to be stored in the system includes four major categories of data: branch information about SBH, author information, book information, and publisher records. Information about employees of SBH and other relevant data are also stored in the system.
- Branch Information: SBH has several branches all over Sydney. The system shall contain a branch name, an ID number, address and number of employees working at that branch.
- Author Information: The system shall contain a list of author identifiers along with author name and author email address.
- Book Information: The system shall contain a list of unique book identifiers including book title, book type (e.g. fiction, history, educational), price of that book and whether it is paperback or not (yes/no). The following business rules are operative:
- Each book is published by a publisher who is listed in the system. A publisher may or may not publish any books.
- Each book must be written by at least one author. There may exist multiple authors for a book. In this case, the author sequence must be maintained as in the cover page of the
book. Of course, an author can write many books or she might be waiting to publish her first book.
- In addition, the system must keep track of the number of copies available for each book per branch of SBH. A branch may have many books in its store (possibly none).
- Publisher Information: The system shall contain information about publishers. Each publisher must have an identifier which is a unique code of three alphanumeric characters, publisher name, city and contact number. As mentioned earlier, a publisher may publish many books (possibly none).
- Employee Information: The system shall contain a record of all employees who work at SBH. Each employee has a unique eight alphanumeric character long identifier, name, employee type (e.g. permanent, contractual, casual etc.). Each employee must have a supervisor to whom he/she reports to. Supervisors are also employee of SBH.
- Working Shift Information: The system shall contain a list of working shift identifiers including the week day (Monday-Sunday), start time, end time and type of duty (e.g. cleaning, sales, security). The management maintains a duty roster for employees specifying who works on which working shift each week. Since employees prefer to have weekends off, SBH has a policy that no employee is allocated working shift for consecutive weekends.
- Auxiliary Information: Some branches of SBH are located at more important locations in the city and attract more customers than others. Therefore, the management has decided that employees can be rostered to work at different branches so that workload of each employees will be more balanced. However, the standard hours of work for an employee are 35 hours a week. Also, no employee is scheduled to work in more than one branch in a given week.
Download Project for Solution