COIT11237 Database Design and Implementation-Data Model Transformation
Some information in the case study will be conflicting, ambiguous, vague, and/or missing. This should encourage you to think, explore, and search for answers. Seek clarification and/or make reasonable assumptions to complete the requirements: your assumptions and clarifications need to support all details of the ERD that are not already provided by the case study. Document any assumptions you make and clarifications you obtain in an appendix named ‘Assumptions and Clarifications’. There are two options:
1. Seek clarification about the case study by searching the forums. If your question has not already been discussed, please post your question.
2. Make reasonable assumptions about missing or ambiguous information in the case study.However, marks may be lost for unreasonable assumptions. For example, it is unreasonable to assume that people only ever buy one item or one type of item at a time.
Notes:
• You are encouraged to hand-draw and scan ERDs. Your ERDs should be neat, clear and easy to read. ERDs developed with tool support are acceptable.
• Please follow the modelling standard used in the text book and lecture slides.
• Only use the attributes mentioned in the case study as primary keys. For example, do not introduce surrogate keys not mentioned in the case study.
Answer:
To derive the ERD the following assumptions were made on top of the provided business rules.
- Every station has two types of items; normal items and hot food. Normal items do not have a waiting time but hot food items have a waiting time. The two types of items are bought under one purchase hence the customer is offered one receipt with a unique receipt number.
- For a purchase a customer postcode can be recorded if the customer is a regular customer. If the customer is not a regular customer, the customer postcode is left null to symbolize the customer was not a regular customer. If
the customer is a regular customer, the postcode is recorded to identify the customer. - All regular customers have a unique postcode.
- A manager can have a supervisor or not. If a manager has a supervisor who is also a manager the supervisorID field is recorded with the employeeID of the supervisor and if a manager does not have a supervisor, the field is left null.
- A manager can receive training sessions. The training sessions are optional and are given by another manager identified with an employeeID.
Data Model Transformation
Based on the ERD in figure 1, the following set of relations can be derived. All the primary keys are underlined while the foreign keys are written in italics.
- Products (productID,productNAme,price,quantityInStock)
- Purchase (receiptNO,date,totalAmount,customerPostCode) – foreign key (customerPostCode) references regularCustomers (postcode)
Foreign key (customerPostCode) will have a cascade update. This will update the customer post code in the purchase record when the post code of the customer is changed.
- NormalPurchaseItems(itemPurchaseID,productID,quantity,purchasePrice,receiptNO)- foreign key (productID) references products (productID), foreign key (receiptNO) references purchase (receiptNO)
Foreign key (productID) has a cascade update so that the item purchased is updated once the productID is updated in the product relations
Foreign key (receiptNO) has a cascade update and cascade delete .Cascade update updates the receiptNO when the receiptNO is updated and cacscade delete deletes the record when receiptNO is deleted in the purchase relation
- hotFoodPurchaseItems(itemPurchaseID,productID,quantity,purchasePrice,waitingTIme, receiptNO)- foreign key (productID) references products (productID), foreign key (receiptNO) references purchase (receiptNO)
Foreign key (productID) has a cascade update so that the item purchased is updated once the productID is updated in the product relations
Foreign key (receiptNO) has a cascade update and cascade delete .Cascade update updates the receiptNO when the receiptNO is updated and cacscade delete deletes the record when receiptNO is deleted in the purchase relation
- regularCustomers(customerID,name,phone,postcode)
- Managers(employeeID,title,firstName,lastName,email,mobileNumber,workNumber,supervisor) – Foreign key (supervisor) References supervisors (employeeID)
Foreign key (supervisor) has a cascade update so that when the supervisorID is updated in the supervisor relation, the supervisor field is updated in the manager’s relation.
- Supervisors(employeeID) Foreign key (employeeID) references Managers (employeeID)
- Trainers (employeeID,hrsAllocated,amountPaid) Foreign key (employeeID) references Managers (employeeID)
Foreign key (employeeID) has a cascade update and a cascade delete to update and delete respectively if the manager’s relation is updated or deleted.
- TrainingSession (sessionID,trainerEmployeeID,traineeEmployeeID,date) Foreign key (trainerEmployeeID) references Managers (employeeID), Foreign key (traineeEmployeeID) references Managers (employeeID)
Foreign key (trainerEmployeeID) has a cascade update to update the relation when the employeeID is updated in the manager’s relation
Foreign key (traineeEmployeeID) has a cascade update to update the relation when the employeeID is updated in the manager’s relation
- Station(stationID,stationName,location,managerEmployeeID) Foreign key (employeeID) references Managers (employeeID)
Foreign key (employeeID) has a cascade update so that when the employeeID field is updated in the manager’s relation, the supervisor field is updated in the manager’s relation
2.2 Database implementation
According to the database implemented using Microsoft Access 2013.
- Use of data types
The diagram below shows the design view of table products. Each column has its corresponding data type.
The diagram above shows unique constraint in table regularCustomers where the customerPostcode is unique and cannot accept duplicates.
- Cascading delete
The relationship between purchase and normalPurchaseItems has a cascade delete because when a purchase is deleted all the items associated with that purchase should be deleted too.
- Cascading update
The relationship between normalPurchaseItems ans products has a cascade update because when the productID is updated these should also be updated in the normalPurchaseItems.
- Column Constraints
In table regularCustomers the customerPostCode has to be filled and in table purchase the date column has to be filled.
- Table Constraint
Table normalPurchaseItems cannot be inserted a record without first creating a purchase record.
- Default values
Quantity column in table normalPurchaseItems has a default value of 0 .
Quantity column in table hotFoodPurchaseItems has a default value of 0.
- Validation rule
In table purchase the date cannot be less than the date today.
Validation text : >=Date()
In table products, the quantityInStock cannot be less than 0.
Validation text: >0
- Input mask
In table regularCustomers the customerPostCode has input mask # meaning that the field can allow spaces while the user is entering a postcode.
- Required
In table purchase the date filed is required.
- Format
In table purchase the date field has a format of general date that makes the date picked to appear in the format of DD/MM/YYYY HR:MIN:SEC
- Unary relationship
Table manager has a unary relationship where a supervisor is also a manger thus has an employeeID. A manager supervises a manager.
- Many to many relationship.
Many customers can have many purchases.
- Subtype
Tables normalPurchaseItems and hotFood purchase items are subtype of products. They are both products but with a difference of waiting time attribute.
Buy COIT11237 Database Design and Implementation-Data Model Transformation Answers Online
Talk to our expert to get the help with COIT11237 Database Design and Implementation-Data Model Transformation Answers to complete your assessment on time and boost your grades now
The main aim/motive of the management assignment help services is to get connect with a greater number of students, and effectively help, and support them in getting completing their assignments the students also get find this a wonderful opportunity where they could effectively learn more about their topics, as the experts also have the best team members with them in which all the members effectively support each other to get complete their diploma assignments. They complete the assessments of the students in an appropriate manner and deliver them back to the students before the due date of the assignment so that the students could timely submit this, and can score higher marks. The experts of the assignment help services at urgenthomework.com are so much skilled, capable, talented, and experienced in their field of programming homework help writing assignments, so, for this, they can effectively write the best economics assignment help services.