0% found this document useful (0 votes)
25 views

1stpart Database Assignment

Uploaded by

sangam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

1stpart Database Assignment

Uploaded by

sangam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Subject: COMP712 - Database Systems

The British College

Assignment 1: Database Design

Student Name1: Sajan Awale


Student id: 77181263

Student Name2: Bishank Pandey


Student id: 7160041

Student Name3: Sangam Adhikari


Student id: 77205862
Table of Contents
1. Introduction to the Report 1
2. EERM 2
2.1 Assumptions: 2
2.1 Extended Entity Relationship Diagram (EER Diagram) 3
2.3 List your attributes and identifiers here: 4
2.4 Validation Questions 9
2.5 A definition for each entity 9
2.6 Occurrences for each entity 10
3. Normalisation 11
3.1: Customer Order Enquiry Screen 11
3.2: Product Enquiry Screen 12
Form 3.3: Customer History Screen 14
4. COMPOSITE EERD (based on top-down and bottom up approaches) –
using QSEE. 15
4.1. Composite EERD diagram 15
4.2 FINAL LIST OF tables and attributes, defining all Primary Keys and any
Foreign Keys(s) derived from the Composite EERD 16
5. Physical Design Discussion 21
6. Bibliography 21
7. Appendixes 21
1. Introduction to the Report
Development of management system has increased the business
performance and helped in growth of business. Technology adaptation for the
development of different management systems has been practiced in different
organization in current organizational environments. The business database is
helpful for the business owners track and organize their inventory, employees
and customers (Lindblad and Seidel, 2019). Different database software has
been developed with different new features making the database system
development easy and feasible for better management performances as well
as storage of database for different analysis.
In the context of development of database, a Mail order company Headingly
Trading PLC Company was struggling with the management of database for
organizational development. Mail order company is a businesses where
colorful catalogs displaying goods for customer and make customer to shop
from home (Lee, 2019).In the case study of Headingley Trading PLC
Company it has adopted the database system for the business function which
was more traditional format for its business purpose due to which the
company was noticing the drop of in the sales with their higher end products
and socio- economic customers. The report also include that the drop of the
sales was due to the increase of similar services and products on-line.
As the competition was increasing the Whilst Headingley Trading PLC
Company decided to adopt the Web-based service and embrace e-commerce
to grow the company with good relationship with customers through better
services with information technology.

1
2. EERM
2.1 Assumptions:
According to the given scenario, different assumptions were made according
to the understanding of the case study given as follows:
 Headingley Trading PLC, a mail order company sales agent base
catalogues through agents.
 Headingley Trading PLC, Agent contacts directly to customer to sell the
products and each sale gets commission as per the discount
categories.
 Payments are done through credit cards and traditional periodic
payment system.
 Customer information is maintained for mailing marketing and to
recognize credit card customer and an agent support customer.
 The company headquarter is in Leeds with central depot as
Birmingham that supplies regional depots
 The agent organization has general sales manager and under which
has four divisions.
 Each Division has number of regions and a larger region has more
than one depot.

 A monthly report of the orders taken by product is summarized for


Sales organization management.
 Sales statistics are produced of each product category for monitoring
the effectiveness of different discount strategies.
 Order received by agents are summarized and posted to head office
over night.
 Orders are validated, priced and checked centrally for availability at
appropriated depots.
 Each depot services of the customer are provided according to Agent
ID.
 Stocks may be transferred between depots to satisfy incoming orders.
 Stocks are delivered between depots to satisfy upcoming
 Each week head office produces estimates.
 Week report used to update a three month sales forecast.
 Forecast help to show expected sales of each product in thirteen
weeks.
 Forecast is used as on the basis for ordering stock from different
supplier.
 Each order from different suppliers has quoted as unique lead
time and price.
 Product order list for several different products has its own delivery
time in different week.
 Price and lead time are updated time to time for suppliers from revised
quote.
 Price of purchased order remains same from the price of order time.
 Discount structures are based on the product categories.
 Invoice is produced daily form the details of consignment shipped.

2
 Customer balance sheet maintained for the note of faulty good credit
and short delivery notice to customer if necessary.
 Order processing system operates on a centralized computer.

2.1 Extended Entity Relationship Diagram (EER Diagram)

In the basis of assumptions from the case study of Headingly Trading PLC, the following
extended entity relationship diagram has been prepared using QSEE tool as shown in
fig.1.1.

Fig1.1. EER diagram of mail order company

3
2.3 List your attributes and identifiers here:

Entity Type Attribute


1. Customer
customer_id
customer_first_name
customer_last_name
Customer_address
Country
Zip_code
Email_address
Contact_number
Agent_id

2. Agent
Agent_id
Agent_first_name
Agent_last_name
Agent_enroll_date
Agent_address
Agent_contact_number
Agent_citizenship_number
Agent_email_address
Customer_id

3. Product_catalogue
Product_catalogue_id
Product_catalogue_code
Product_catalogue_description
Product_catalogue_image
Product_offer
Order_line_id
Product_id

4
4. Product
Product_id
Product_code
Product_description
Product_price
Product_cost
Prduct_mailing_code
Product_weight_gram
Product_annual_sales_goal
Product_line_name

5. Product_line
Product_line_name
Product_line_annual_sales_goal

6. Order
Order_number
Order_placement_date
Order_fulfillment_date
Customer_id
Stock_id

7. Order_line
Order_number
Product_id
Order_qty
Shipping_country
Shipping_zip_code
Shipping_address
Special_instruction

8. Invoice
Invoice_id
Order_number
Invoice_date

5
9. Payment
Payment_id
Invoice_id
Payment_type
Payment_date
Payment_amount

10. Customer_balance_sheet
Customer_balance_sheet_id
Invoice_id
Credit
Debit
Transaction_type
Date_sent
Credit_limit
Balance

11. Back_order
Back_order_id
Order_return_date
Return_qts
Order_id

12. Stock
Stock_id
Stock_qts
Stock_name
Product_code
Order_id
Back_order_id

13. Stock_pricing_history
Stock_pricing_history_id
Stock_date
Purchase_rate
Stock_id

6
14. Region
Region_id
Region_name
Region_address
Division_id

15. Division
Division_id
Division_name
Region_id

16. Office
Office_id
Department
Division_id
Supplier_id

17. Supplier
Supplier_id
Supplier_code
Supplier_name
Supplier_mailing_code
Supplier_address
Supply_date
Supplier_product
Supplier_product_rate
Supplier_line_id

18. Supplier_line
Supplier_line_id
Supplier_line_name
Supply_date

19. Central_depot
Central_depot_id
Depot_name
Depot_address
Supplier_id

7
20. Regional_depot Region_depot_id
Depot_name
Depot_type
Depot_address
Depot_consignment_id

21. Van
Van_id
Van_number
Van_driver_licence_number
Depot_id

22. Ship
Ship_id
Ship_number
Shipping_dateandtime
Ship_address
Depot_id

23. Depot_consignment
Depot_consignment_id
Ship_id
Van_id
Invoice_id

24. Discount_structure
Dis_id
Dis_for_agent
Sales_threshold
Oldstock_target
Targeted_discount
dateandtime
Comment

8
2.4 Validation Questions
 Does the model list the agent based customers and customers without agents?
 Is the Payment done for the order reliable via credit card or debit card?
 Does the model list the discount strategies for the customers and agent?
 Can the model provide the expected sales of each product in month?
 Can the model provide monthly report of the order taken?
 Can the model provide the sales statistics for each product category for effective
discount strategies?
 Can the model manage the time of purchase and unique quote for each product?
 Does the price of purchase order remain same from the price of order time?
 Do the customers get the invoice on delivery of the order or not?
 Is there any discount structure based on product categories or catalogue?

2.5 A definition for each entity


 EntityName: Company hold details on the CD’s publisher
 Customer: Customer holds the detail of the ones who submits the
order for the order.

 Agent: Agent holds the detail of the person working in different regions
and contact with customer group for the sales of the product as per the
sales agent gets the commission for each product sales including
different discount categories or structures.

 Agent_commission: It provides the amount of received commission


by a particular agent of the commission structure of different products.
 Discount_structure: It holds the discount structure receive by the
agents.
 Product_catalogue: It consists of different categories that include
different items according to the theme of the catalogues.
 Product: Product includes the each product item details of the
catalogues.
 Product_line: The product sales thresholds, weekly forecast for
setting different goal like prior year goal and current year goal.
 Order_line: The place where customer makes a desire to get the items
and submits the order with the required quantity and location for
transportation.
 Order: It provided the placement date and fulfillment date according to
the customer and order line.
 Invoice: The details of the item delivery and conformation from the
customer including the total amount of the items confirming through
depot consignment.
 Payment: Payment consists of payment structure and money
transaction details of a customer.

9
 Customer_balance _sheet: It includes the balance sheet of the
customer for the collection of transactional history data of the
customer.
 Back_order: The details of product that are returned or were damaged
when a customer received the order and comment of the product for
maintaining the stock and also the customer balance sheet.
 Stock: The number of product remained and the damaged stock is
maintained.
 Stock_pricing_history: The detail historical data for the stock price
according to the date.
 Region: It is a division through geographical areas.
 Division: The geographical separation of Office.
 Office: The headquarters that lies in Leeds of Whilst Headingly
Trading PLC Company.
 Suppliers: The different vendors who supply their products for sales
via Headingley Trading PLC Company.
 Supplier_line: The supplier line consists of the date of supply with
monthly sales of specific supplier company.
 Depot: The central depot Birmingham supplies the regional orders and
stock items or products. The regional stock house distribute the order
items according to the agent id and customer shipping information.
 Van: The delivery of items through road transportation.
 Ship: The delivery of items through the water transportation.
 Depot_consignment: The details on the basis of delivery and order
date and conformation of customer getting order items.

2.6 Occurrences for each entity

Company id Company name Address Phone Country

001 UTSF Otley 0113-111 111 UK

002 PJWSTK Beckett 0142-222 222 UK

According to the case study of the Headingly Trading PLC Company the
occurrence of the entity are drawn as follows:
Enitity: Customer
custo customer_fi customer_last customer custo Contact_n Country zip_code email-
mer_i rst_name _name _address mer_c o address
d ity

1. Suraj Newpane khumalt Lalitp +9779849 Nepal 44700 surajnew


ar ur 878645 pane@g
mail.com

10
3. Normalisation
Normalised Forms found in the Appendix – each form individually

3.1: Customer Order Enquiry Screen

UNF 1NF 2NF 3NF Tables/


1. List all un- 1. Split attributes 1.Table with 1. Further data Relations
normalized attributes into separate one key groups created
form the spread groups/table having attribute is by breaking out
sheet broken out repeated already in non-key
groups. 2NF, nothing dependencies.
2. Choose a
2. Identify is done to 2. If identified
candidate key
Primary keys for
showing the Key that relation break down to a
each attribute group
attribute underlined table here. new group,
table.
or in bold. Do you 2.Further data leaving key
3. Repeated group
need to introduce a key is a compound
groups attribute as a
Artificial Key? one. Move from created by foreign key in the
3. Use this non-repeating breaking out original group.
candidate key to group PK(s) to part key 3. All group are
help you to identify repeated group. dependencie now fully
Repeating attribute This key attribute s. normalized and
groups showing (..)* will also be a 3.Identify keys have a key and
foreign key of each group foreign key(s)@
and any show
foreign
key(s)@

Order no. Order no. Order no. Order no. Order


Customer no. Due date Due date Due date
Agent ID Customer ID Special Special instruction Customer
Date received Items outstanding instruction

Due date Special instruction Customer ID Agent


Items outstanding Date received Items outstanding
Special instructions Agent ID Customer ID Date received Product
Product Code Items Agent ID(FK)
outstanding
Quantity Product code Depot
Date received consignmen
Discounted Price Quantity Product code

11
Date Sent Discounted Price Agent ID Quantity t
Date Sent Discounted Price
Product code Depot
Quantity consignment(FK)

Discounted Date Sent


Price
Date Sent

3.2: Product Enquiry Screen


UNF 1NF 2NF 3NF Tables/
1.List all un- 1. Split attributes 1. Table with one 1. Further data Relations
normalized attributes into separate key attribute is groups created by
form the spread groups/table having already in 2NF, breaking out non-
sheet broken out repeated nothing is done to key dependencies.
2. Choose a groups. that relation table 2. If identified break
candidate key 2. Identify Primary here. down to a new
showing the Key keys for each 2. Further data group, leaving key
attribute underlined attribute group table. groups created by attribute as a
or in bold. Do you breaking out part foreign key in the
3. Repeated group
need to introduce a key dependencies. original group.
key is a compound
Artificial Key?
one. Move from 3.Identify keys of 3.All group are now
3. Use this candidate non-repeating group each group and fully normalized
key to help you to PK(s) to repeated any foreign and have a key and
identify Repeating group. This key key(s)@ foreign key(s)@
attribute groups attribute will also be show
showing (..)* a foreign key
Product Code Product Code Product Code Product Code Product
Date Added Date Added Date Added Date Added Code

Product Product Product Product Description


Description Description Description STD Bundle/
STD STD STD Weight(grammes) Associated
Weight(grammes) Weight(grammes) Weight(grammes) code

Bundle/Associated Bundle/Associated Bundle/Associated


code code Bundle/Associated code Mailing
Bundle/Associated Bundle/Associated code Code
Bundle/Associated
description description Bundle/Associated description
Packing Type Packing Type description Packing Type Invoice
Mailing Code Mailing Code Packing Type Mailing Code(FK)
Unit Price Invoice Unit Price Discount

12
VAT class Unit Price VAT class Invoice Code
Discount Code VAT class Mailing Code Unit Price
Discount Code VAT class Stock
Depot No. Depot No. Discount Code Location
No.
Stock Location No. Stock Location No. Discount Code
Quantity in Stock Quantity in Stock Stock Location No.
Depot No.
Daily Usage Daily Usage Quantity in Stock
Re-order level Re-order level Daily Usage Stock Location No.
Re-order
Maximum Stock Maximum Stock Depot No. Quantity in Stock level
level level Re-order level Daily Usage
Valuation Valuation Maximum Stock Depot No.(FK)
level
Valuation Re-order level
Maximum Stock
level
Valuation

Form 3.3: Customer History Screen


UNF 1NF 2NF 3NF Tables/
1.List all un- 1. Split attributes into 1. Table with 1. Further data Relations
normalized attributes separate groups/table one key groups created by
form the spread sheet having broken out attribute is breaking out non-
2. Choose a candidate repeated groups. already in 2NF, key dependencies.
key showing the Key 2. Identify Primary nothing is done 2. If identified break
attribute underlined or keys for each to that relation down to a new
in bold. Do you need attribute group table. table here. group, leaving key
to introduce a 2. Further data attribute as a
3. Repeated group
Artificial Key? groups created foreign key in the
key is a compound
3. Use this candidate one. Move from non- by breaking out original group.
key to help you to repeating group part key 3.All group are now
identify Repeating PK(s) to repeated dependencies. fully normalized
attribute groups group. This key 3.Identify keys and have a key and
showing (..)* attribute will also be of each group foreign key(s)@
a foreign key and any foreign show
key(s)@

13
Customer No. Customer No. Customer No. Customer No. Customer
Customer Name Customer Name Customer Name Customer Name No.

Agent Name Agent Name Credit Limit Credit Limit


Credit Limit Credit Limit Agent No. Agent No.(FK) Agent No.

Balance Balance
Date Date Agent No. Agent No. Customer
balance
Reference Reference Agent Name Agent Name sheet
Debit($) Debit($)
Credit($) Credit($) Customer Customer balance Payment
Trans Type* Trans Type* balance sheet sheet
Date Date
Reference Reference
Debit($) Debit($)
Credit($) Credit($)
Balance Balance

Payment Payment
Trans Type* Trans Type*

14
4. COMPOSITE EERD (based on top-down and bottom up
approaches) – using QSEE.
4.1. Composite EERD diagram

Fig.1.2. EERD diagram of Mail order Company

The fig1.1 of mail order company was drawn as the top down approach where
Depot were separated and was unable to get the details of transportation
information from the central depot where here it has the proper information of
van delivery and ship delivery from central as well as regional depot. Here the
agent commission entity was included so that it could make easy for agent
commission as well as the performance of agents. The log_in entity was
included so that it could help mail the customer about any notice as well as
update about new offers and products. In second sections, form normalization
was done through which multiple tables were created where the changes
seems to be needed for the better EERD diagram planning from early top
down approach. Hence, the changes in first EERD has been done in the

15
Fig.1.2 EEER diagram above.

4.2 FINAL LIST OF tables and attributes, defining all Primary Keys and
any Foreign Keys(s) derived from the Composite EERD

Entity Type Attribute


25. Customer
customer_id
customer_first_name
customer_last_name
Customer_address
Country
Zip_code
Email_address
Contact_number
Agent_id

26. Agent
Agent_id
Agent_first_name
Agent_last_name
Agent_enroll_date
Agent_address
Agent_contact_number
Agent_citizenship_number
Agent_email_address
Customer_id

27. Agent Commission


Agent_id
Agent_commission_id
Commission
Commission_date

28. Product_catalogue
Product_catalogue_id
Product_catalogue_code

16
Product_catalogue_description
Product_catalogue_image
Product_offer

29. Product
Product_id
Product_code
Product_description
Product_price
Product_cost
Prduct_mailing_code
Product_weight_gram
Product_annual_sales_goal
Product_line_name

30. Product_line
Product_line_name
Product_line_annual_sales_goal

31. Order
Order_number
Order_placement_date
Order_fulfillment_date
Customer_id
Stock_id

32. Order_line
Order_number
Product_id
Order_qty
Shipping_country
Shipping_zip_code
Shipping_address
Special_instruction

17
33. Invoice
Invoice_id
Order_number
Invoice_date

34. Payment
Payment_id
Invoice_id
Payment_type
Payment_date
Payment_amount

35. Customer_balance_sheet
Customer_balance_sheet_id
Invoice_id
Credit
Debit
Transaction_type
Date_sent
Credit_limit
Balance

36. Back_order
Back_order_id
Order_return_date
Return_qts
Order_id

37. Stock
Stock_id
Stock_qts
Stock_name
Product_code
Order_id
Back_order_id

18
38. Stock_pricing_history
Stock_pricing_history_id
Stock_date
Purchase_rate
Stock_id

39. Region
Region_id
Region_name
Region_address
Division_id

40. Division
Division_id
Division_name
Region_id

41. Office
Office_id
Department
Division_id
Supplier_id

42. Supplier
Supplier_id
Supplier_code
Supplier_name
Supplier_mailing_code
Supplier_address
Supply_date
Supplier_product
Supplier_product_rate
Supplier_line_id

43. Supplier_line
Supplier_line_id
Supplier_line_name
Supply_date

19
44. Depot
Depot_id
Depot_name
Depot_address
Depot_type
Supplier_id
Region_id

45. Van
Van_id
Van_number
Van_driver_licence_number
Depot_id

46. Ship
Ship_id
Ship_number
Shipping_dateandtime
Shipping_address
Depot_id

47. Depot_consignment
Depot_consignment_id
Ship_id
Van_id
Invoice_id

48. Discount_structure
Dis_id
Dis_for_agent
Sales_threshold
Oldstock_target
Targeted_discount
dateandtime
Comment

20
5. Physical Design Discussion

6. Bibliography

Harvard style
 Lindblad, M. and Seidel, M. (2019). Database Uses in Business.
[online] Smallbusiness.chron.com. Available at:
https://smallbusiness.chron.com/database-uses-business-
64298.html [Accessed 23 Apr. 2019].
 Lee, G. (2019). List of U.S. Mail-Order Companies. [online]
Smallbusiness.chron.com. Available at:
https://smallbusiness.chron.com/list-us-mailorder-companies-
13448.html [Accessed 23 Apr. 2019].

7. Appendixes

21

You might also like