Date post: | 15-Feb-2017 |
Category: |
Education |
Upload: | leon-marsden |
View: | 242 times |
Download: | 1 times |
Exam Preparation DayQUESTION 5 – RELATIONAL DATABASE MANAGEMENT SYSTEMS
a. (i) Identify one issue with storing the data in a single table, as shown above.
a. (i) Identify one issue with storing the data in a single table, as shown above.
- Repetitive data wastes disk space. Costs money.
- Repetitive data is time consuming to type. Wastes employees’ time, costs money. Inefficient.
- Repetitive data entry / typing may result in errors. Results from queries / outputs may be inaccurate. Unreliable.
a. (ii) Explain how a relational database can resolve the issue you identified in part (a)(i).
a. (ii) Explain how a relational database can resolve the issue you identified in part (a)(i).
- By normalising data into source tables, in this case into Customer (or Business) and Product (or Drinks), the amount of initial data entry is reduced. The benefits include reduced disk space, accuracy, ease of data entry.
b. (i) Discuss the effect of having Customer ID (C_ID) and Product ID (P_ID) as composite keys in Items Table.
b. (i) Discuss the effect of having Customer ID (C_ID) and Product ID (P_ID) as composite keys in Items Table.
- This would not be an ideal composite foreign key because any combination of Product and Customer could only occur once. This would have the effect of, for example, Freed’s Drinks only being able to purchase 24 Coke Cans on one occasion.
b. (ii) Discuss the effect of having Customer ID (C_ID) and Date (I_Date) as composite keys in Items Table.
b. (ii) Discuss the effect of having Customer ID (C_ID) and Date (I_Date) as composite keys in Items Table.
- This would not be an ideal composite foreign key because any combination of Product and Date could only occur once. This would have the effect of, for example, Freed’s Drinks only being able to purchase one product on Friday October.
b. (iii) Discuss an appropriate composite keys for the Items Table.
b. (iii) Discuss an appropriate composite keys for the Items Table.
- C_ID, IP_TS (item purchase Time / Date Stamp)…? CHECK THIS
c. (i) Two of the entities in the database are ‘Customers’ and ‘Products’. Explain the relationship between these two entities.
c. (i) Two of the entities in the database are ‘Customers’ and ‘Products’. Explain the relationship between these two entities.
- One customer can purchase Many item types. One item type can be purchased by Many customers. The relationship is therefore Many to Many and can be resolved by including a transaction table with foreign keys from each source table.
c. (ii) Complete the diagram above to include the Table Relationships.
c. (ii) Complete the diagram above to include the Table Relationships.
c. (iii) Explain the table relationship between ‘Customers’ and ‘Products’ in the context of this table relationship diagram from part (ii)
c. (iii) Explain the table relationship between ‘Customers’ and ‘Products’ in the context of this table relationship diagram from part (ii)
It’s still a many to many relationship, but it’s been resolved by the inclusion of the Items table, with a sub-form / portal into this via the Invoice table to include multiple purchases at any given time. CHECK THIS, unsure what’s being asked.
c. again Design an appropriate query that will output this information.
c. again Design an appropriate query that will output this information.
SELECT P_ID P_Name P_CostPrice QuantityI_Date
FROM ProductsProductsProductsItems Invoice
WHERE No query, all items sorted
SORTBY or ORDERBY Quantity, descending
STOPAT 1 (for most popular product)
3 (for top three products)
**NOTE: Assumes Quantity is a summary field that totals all for a given P_ID. If not, may need an additional field.
d. Discuss how the database for Big Drink Supplies could be expanded to automate the ordering system and reduce user error.
d. Discuss how the database for Big Drink Supplies could be expanded to automate the ordering system and reduce user error.
Repeating weekly / monthly automated orders. Script is run to email is sent to customers seven days prior to order being processed. Order details generated from DB based on previous (or first) orders. If nothing is done by the processing date, order proceeds. If there’s a problem, customer can login and alter details themselves via a web interface to the database (bypassing data entry by an employee, eliminating errors when transcribing e.g. from phone calls or email). Whenever data is entered, a pop up or summary of the order is shown to the user to ensure that the entered data is correct prior to the order proceeding and funds being withdrawn.
e. Explain the recommended practices that a database developer will need to implement to ensure that customer’ personal information is not disclosed to unauthorised clerical staff.
e. Explain the recommended practices that a database developer will need to implement to ensure that customer’ personal information is not disclosed to unauthorised clerical staff.
- Login details (username and password) on computer and database start up. User groups / permissions prevent clerical staff from accessing certain information.
- Local encryption of working copies of data.
- Viewing of clients’ data will have visible data obfuscated.
- Emails, physical paper etc. with customer details are destroyed once data is entered.
- Onsite and offsite backups are secured / encrypted.
Questions?