Reference no: EM133663815
Homework: Database Systems
Objectives
This homework item relates to the unit learning outcomes as in the unit descriptor. This homework is designed to improve students' skills to analyze organization database requirements, develop a data model to reflect the organization's business rules. This homework covers the following LOs.
A. Synthesize user requirements/inputs and analyze the matching data processing needs, demonstrating adaptability to changing circumstances.
B. Develop an enterprise data model that reflects the organization's fundamental business rules; refine the conceptual data model, including all entities, relationships, attributes, and business rules.
C. Derive a physical design from the logical design taking into account application, hardware, operating system, and data communications networks requirements; further use of data manipulation language to query, update, and manage a database
Case Study
This homework concerns a liquor shop chain in Sydney, called the A-one liquor (AL). The objective of this homework is to develop a database system that will be used to centrally store and manage all relevant information for the branches of AL.
The information to be stored include information on different branches of AL (e.g., Bankstown, Hornsby, etc.), types of drinks they sell (beers, wines, cedars, etc.), staff they employ (Retail Assistants, Shelving Assistants, etc.), AL Members (AL Loyalty Card holders). The basic requirements gathered from the stake holders is presented in the following four points. As typically the case, these requirements are often underspecified. Use your judgment in interpreting them when required and keep a note of the assumptions you made.
A. Branch Information: The AL System shall keep information on each branch including its name and address, and the number of employees who work there. The system shall also contain information on which days (Mon-Sun) the branch is open, and opening hours. It will also keep information on opening hours (e.g., Mon-Fri 10:00AM-5:30PM; Sat 9:00AM-9:00PM; Sun Closed).
B. Product Information: The system shall contain relevant information on products of different types at the "item level", such as: (wine/beer/spirit/...), packaging info (can/bottle/...), volume (e.g., 375ml X 6 pack), price, and brand (e.g., Tooheys Old Dark Ale), as well as current stock level.
C. Staff Information: The system shall record information on staff members who work at different branches of AL. This will include their roles, type of employment (e.g., permanent, casual), salary (annual or hourly depending on permanent or casual), as well as who they report to (i.e., supervisors).
D. Membership Information: The system shall record information on AL members, including type of membership (Platinum/Gold/Silver), and when the membership will expire.
Part I: Entity - Relationship Diagram
Task A:
Investigate and identify data requirement for the given study by providing list of required entities, list of attributes in each of these entities, and the unique identifier for each entity.
Task B:
Develop an Entity-Relationships Diagram for the given scenario (It must contain entities and unique identifiers in terms of keys, relationships between the entities including relationships constraints, and the attributes).
Task C:
Derive the physical design having detail of entities, primary and foreign keys, detail of all the attributes.
Part II: Normalisation
Submit a single plain text file with filename as "studentid_studentname_AL_SQL" containing all SQL implementation. Your
SQL queries must work on MS SQL Server and be able to be demonstrated. SQL code required (Use MS SQL Server):
A. Create a database and CREATE TABLE statements for all tables in your ERD (Part A) including primary and foreign keys.
B. INSERT INTO statements for populating the database
1. Insert five rows of (made-up) data into each table. Make sure that the data you enter in these tables should be sufficient to return at least one row for each query in Task 3. AL should hold at least 5 bottles of Penfold Grange 2010 in some branch or other.
C. Select Statements
1. List the branches (ID) of MA that have in stock at least 5 bottles of Penfold Grange 2010.
2. SELECT statement to generate a list of all email addresses of members whose card will expire in the month after the coming month. Thus, for instance, if the query is run in November 2121, it will list the emails of all members whose membership will expire in January 2122. The emails should be ordered by Branch ID, then by expiry date, and then by the email address, all in ascending order.
D. Consider the following relation schema as the join of a few tables from Homework ERD
Abnormal_Rel ( ProductID, BranchID, campaignID, MemberID,
ProductType, PackageType, YearProduced, Price, Brand,
StockLevel, CampaignStartDate, CampaignEndDate, FirstName, LastName, eMail, MembershipLevel,
MemberExpDate, Discount )
Determine for UPDATE anomaly whether or not the relation Abnormal_Rel is susceptible to that anomaly. Support your determination with adequate explanation and a small example.
E. Normalize/decompose the relation schema Abnormal_Rel until you get relations that are in 3NF. Use appropriate illustration to aid the understanding of your work