Project RDD
-
Upload
tran-hoai-quang -
Category
Documents
-
view
323 -
download
11
Transcript of Project RDD
PPROROJJEECCTT
GV Nguyễn Thị Thanh Tâm
Relational Database Design 1.2
IINNSSTRTRUUCCTTOORRNNOOTESTES
The following are the inputs for the faculty for project allocation and evaluation:
The project should be allocated to individual students by the end of theRelational Database Design module, the third cycle.
The student can start the project earliest after the first Experiment session ofRelational Database Design is over.
During allocation, explain the students the scope of the project by referring to the topic Project Activities and Project Timelines.
Ask the students to refer to the sample case study and its solution given in the sample project documentation.
Ask the students to refer to the topic Project Standards and Guidelines before starting the project documentation.
Before project evaluation day, ask the students to verify their projects accordingto the standards and guidelines given in the topic Project Standards andGuidelines.
Evaluate the students according to the guidelines given in the topic ProjectEvaluation Guidelines.
CCAASESESSTTUUDDYY11:: SSHHOOPP HHEERREE
BackgroundShop Here is a leading departmental store in New York. The store is known for quality products, affordable price range, timely services, and home delivery facility. The store has customers from all sections of the society and procures goods from various countries.
Existing SystemShop Here maintains an optimum inventory of various categories of items. The detailsof the various categories are stored in the Categories file. This file contains dataabout the item category numbers and the corresponding categories. The details of the items are stored in a file named Items. The Items file contains records such as itemnumber, item description, item category number, serial number of the item, unit priceof each item, and reorder level of each item.
The store has several regular suppliers for the various items. The suppliers are spread over various geographical locations. A detailed record is maintained for each supplier. The supplier record consists of supplier code, supplier’s name, address, phonenumber, country of origin, and shipment mode number and shipment mode foroutstation suppliers. All records are maintained in the Suppliers file.
Whenever the employee of a store places a purchase order, a purchase order form needs to be filled out. The format of a purchase order form is as follows:
PURCHASE ORDER FORM
Purchase Order ID: Supplier ID:
Employee ID: Order Date:
Shipment Date: Quantity:
Shipment Method ID: Freight Charge:
A complete transaction takes place when the purchase is made and the payment isdone.
GV Nguyễn Thị Thanh Tâm
Relational Database Design 1.4
Envisioned SystemShop Here requires a computerized system that provides an effective method ofstoring transaction details. The inventory-in-charge, Chris Symonds, realizes that with growth in business, it becomes difficult to manually maintain the inventory. Shop Here also wants to include the information about employees who place purchase orders with the suppliers. Therefore, the management of the store has decided to computerize the inventory management of the store. To fulfill this need, the store management has contacted RedSky IT Systems to develop the computerized system. Don Allen, aproject manager of RedSky IT Systems, has been deputed to manage the assignment. Don and his project team need to perform the following tasks:
1. Identify the various entities involved.
2. Identify the attributes of the various entities. The attributes should completely define the entities.
3. Draw an E/R diagram to demonstrate the relationship between the various entities.
4. Map the E/R diagram to tables.
5. Normalize the tables to 3 NF.
6. Identify the primary and foreign keys in the tables.
7. Draw a diagram to show the relationships between various tables.
CCAASESESSTTUUDDYY22:: SSHHOOWWMAMANN HHOOUUSSEE
BackgroundShowman House is a large event management company of New York. The company organizes various types of events throughout the year. The events types include fashion shows, celebrity shows, chat shows, musical extravaganza, exhibitions, fairs, and charity shows.
Existing SystemShowman House organizes events of different types. The details of the various event types are stored in the Event Types file. This file contains data about the event type codes and the corresponding event types. Any attendee who wishes to organize an event needs to provide details about the nature of the event he wants to organize. Along with providing event details, he also makes the payment for the event. The payment for an event is made in instalments, according to the fee plan, which isstored in the Fee Schedules file. The Fee Schedules file maintains details such as fee schedule id, event id, fee description, and fee amount. An attendee needs to pay allthe instalments of the payment, on or before the start date of the event.
All details related to an event such as event code, event name, event type code, location of the event, start date, end date, event description, number of people, and the staffing required for the event are stored in the Events file. The payment details that include payment amount, payment date, payment method id, and payment method description are also stored in the Events file. The details of an attendee suchas attendee id, attendee name, and address are stored in the Attendees file.
Any event at Showman House is managed by an employee. The employee details suchas employee id, first name, last name, title, and phone are stored in the Employeesfile.
Envisioned SystemThe management of Showman House realize that it is difficult to maintain so much data manually. Therefore, they have decided to computerize the entire system of event management.
Blue Moon Computers have been assigned the task to computerize the system. The project team needs to perform the following tasks:
1. Identify the various entities involved.
2. Identify the attributes of the various entities. The attributes should completely define the entities.
3. Draw an E/R diagram to demonstrate the relationship between the various entities.
GV Nguyễn Thị Thanh Tâm
Relational Database Design 1.6
4. Map the E/R diagram to tables.
5. Normalize the tables to 3 NF.
6. Identify the primary and foreign keys in the tables.
7. Draw a diagram to show the relationships between various tables.
CCAASESESSTTUUDDYY33:: NNEWEW PPRROOJECTJECT LLTDTD
BackgroundNew Project Ltd. is a company that provides staff on contract for various project assignments. The company is known for providing qualified and skilled staff that can fulfill the project requirements efficiently. New Project employs professionals from various fields that match the requirement of clients.
Existing SystemNew Project has a system of time cards. Time cards are issued to its employees for working at the client site until the completion of the project. The employees use their time cards for all work processes and expenses during the contract period. The time card data enables New Project to prepare the final billing that needs to be submittedto the clients for release of payment in lieu of work.
When a work agreement is signed, a project form needs to be filled out. The format of this form is as follows:
PROJECT FORM
CLIENT SECTION
Client code: Company Name:
Address: Country:
Contact Person: Phone:
PROJECT SECTION
Project code: Project Name:
Project Description: Estimate Bill:
Start Date: End Date:
EMPLOYEE SECTION
Employee code: Employee Name:
Address: Country:
Work Phone: Billing Rate:
GV Nguyễn Thị Thanh Tâm
Relational Database Design 1.8
The client details are stored in the Clients file, the project details are stored in theProjects file, and the employee details are stored in the Employees file. The next form that needs to be filled out is the Time Card Details form. The format of the formis as follows:
TIME CARD DETAILS
Time Card code: Employee code:
EXPENSES DETAILS
Time Card Expense code: Expense Description:
Expense code ID: Expense code:
Expense Date: Expense amount:
WORK DETAILS
Work code ID: Work code:
Work Description: Work date:
Project code:
BILL SECTION
Billed Hours: Billing Rate:
All employees fill the time card details on a daily basis. These details include TimeCard ID, Employee ID, Date Issued, Date Worked, Project ID, Work Description,Billable Hours, and Work Code ID. The staffing-in-charge of New Project stores these details in the Time Cards file. The work code ID defines the category of the taskperformed by the employee in the project. The details related to the work codes arestored in the Work Codes file, which includes details such as work code id and work code description.
During the project life cycle, employees might also incur expenses due to conveyance, food etc. The details of the expenses incurred by an employee in a project are storedin the Time Card Expenses file. These details include time card expense id, timecard id, expense date, expense amount, expense description, project id, expense code id, and expense code. After every project, the company calculates its payment due from the client and raises an invoice. On realization of the payment, all related data is stored in the Payments file. This file contains data about payment code, payment mode ID, payment mode name, corresponding project code, payment amount, payment date, and credit card details if the client pays through credit card. Credit card details consist of card number, cardholder’s name, and expiry date of the credit card.
Envisioned SystemThe management decided that manually maintaining such records was a cumbersome process. It also gave rise to data redundancy and record duplication. Therefore, to streamline the entire process, the best solution was to create databases and convert the manual process to a computerized process.
An in-house development team has been created to work on the project of computerizing the staffing process of New Project Ltd. The development team has the following tasks to perform:
1. Identify the various entities involved.
2. Identify the attributes of the various entities. The attributes should completely define the entities.
3. Draw an E/R diagram to demonstrate the relationship between the various entities.
4. Map the E/R diagram to tables.
5. Normalize the tables to 3 NF.
6. Identify the primary and foreign keys in the tables.
7. Draw a diagram to show the relationships between various tables.
GV Nguyễn Thị Thanh Tâm
Relational Database Design 1.10
PPRROOJECTJECT EEXXEECCUUTTIIOONN
This book contains three case studies. These case studies will be allocated toindividual students.
Phases in Project ExecutionThe project will be carried out in the following phases:
System Analysis: System analysis refers to an in-depth study of the existing system to depict the functionality of the system. The analysis phase is the most crucial phase in a project because it helps developers to identify the processes in the system and the functioning of each process. The project teams will analyze their respective case studies before moving on to the development phase.
Design: This phase involves designing the project based on the specifications.
Documentation: The project documentation should be submitted to the coordinator in the formats given in this book before the project evaluation. The blank report following the case studies is to be filled up, detached from thebook, and submitted on the given date.
Project Evaluation GuidelinesThe project is to be evaluated based on the following parameters:
Quality: Conformance to requirements of the case study – 20 marks
The solution maps to the requirements specified along with the case study
Timeliness - 20 marks
Timely completion of the project
Quality of documentation - 40 marks
Completion of all formats
Adherence to standards and processes
Query handling during project walkthrough - 20 marks
Project Standards and GuidelinesThe following standards and guidelines should be followed while creating the project. Following these standards and guidelines is one of the evaluation criteria for the project:
The E/R diagram should be simple to understand.
A consistent naming convention should be used for tables.
Fields in a table should not have a “.” Character.
Project ActivitiesThe students will get 6 hours to complete the project. The activities to be performed during this period are:
a. Analyze the case study to identify the system processes. b. Identify the entities.c. Identify the attributes of the entities.d. Draw the E/R diagram.e. Map the E/R diagram to tables.f. Normalize the tables to 3 NF.g. Identify the primary keys and foreign keys.h. Document the project by using the formats given in the later section.i. Submit the documentation to the faculty.j. After submitting the documentation, the faculty will query the student
based on the RDBMS concepts and the design created in thedocumentation. The faculty will assign marks to the student based on theevaluation criterions specified in Project Evaluation Guidelines section.
Project TimelinesThe students should follow the given timelines to complete the project on time:
Session # Task to be Performed
1 Analyze the case study to identify the system processes
Identify the entities
Identify the attributes of the entities
2 Draw the E/R diagram
Map the E/R diagram to tables
3 Normalize the tables to 3 NF
Identify the primary keys and foreign keys
Document the project
GV Nguyễn Thị Thanh Tâm
Relational Database Design 1.12
SSAMAMPPLLEE CCAASESESSTTUUDDYY 44::PPAAYY JJUUNNCTCTIIOONN
BackgroundPay Junction is a company that performs order processing and manages payment realizations for other organizations.
Existing SystemPay junction maintains separate files for storing customer details and order details. The Customer Details file consists of records such as customer code, customer name, company name, address, country, phone number, and billing address.
When an order is processed, various parameters that affect the order are filled in a form and then analyzed. The format of the Order Processing form is shown below:
ORDER PROCESSING
Order code: Order Details code:
Customer code: Order Date:
Product code: Product Name:
Quantity: Unit Price:
Discount:
SHIPMENT DETAILS
Shipment Name: Shipping Address:
Shipping Country: Contact Phone:
Shipping Date: Shipping Mode ID:
Shipping Mode: Freight Charges:
Tax:
Total Value:
The data related to the order and shipment is transferred from the Order Processingform to the Orders file. The data related to the products ordered is stored in theProducts file.
The payments for orders are accepted through cash or credit card. When the customer makes the payment, the Payments file is updated with the data about payment code, order code, payment amount, payment date, payment mode ID, payment mode, and credit card details if the customer pays through a credit card. The credit card details consist of card number, cardholder’s name, and card expiry date.
Envisioned SystemPay Junction has decided to stop manual data storage and start computerized database management and order processing. It would also enable the company to have quicker communication with the clients.
A small group of database designers have been deployed by Pay Junction to develop a computerized system of order processing and database management. Pay Junctionalso wants to include the information about an employee who processes an order. Thisinformation will include the employee code, name, title, and phone number.
The development team needs to perform the following activities:
1. Identify the entities.
2. Identify the attributes of the entities.
3. Draw an E/R diagram to represent the relationships between various entities.
4. Map the E/R diagram to corresponding tables.
5. Normalize the tables to 3 NF taking care that there is minimum amount of redundancy and disk space usage. Also, take care that the query performanceis optimum.
6. Identify the primary and foreign keys in the tables.
7. Draw a diagram to show the relationships between various tables.
GV Nguyễn Thị Thanh Tâm
Relational Database Design 1.14
SSAMAMPPLLEE PPRROOJEJECCTTDDOOCCUUMMEENNTTAATTIIONON:: PPAAYY
JJUUNNCTCTIIOONN
PROJECT ON
Pay Junction
Developed by
Name: Debbie Howe
Reg. No.: 4701-10-258
Pay Junction(Project Title)
Batch Code :Start Date : March 1, 2004 End Date: March 10, 2004
Name of the Coordinator : Alex Norton
Name of Developer : Debbie Howe
Date of Submission : March 11, 2004
GV Nguyễn Thị Thanh Tâm
Relational Database Design 1.16
CERTIFICATE
This is to certify that this report titled Pay J u n c t i o n embodies theoriginal work done by D e b b ie H o w e in partial fulfillment of their course requirement at NIIT.
Coordinator:
Alex Norton
ACKNOWLEDGEMENT
We have benefited a lot from the feedback and suggestions given tous by Mr. Alex Norton and other faculty members.
GV Nguyễn Thị Thanh Tâm
Relational Database Design 1.18
SYSTEM ANALYSIS
System Summary: Pay Junction is a company that has been taken up by aleading leather accessories manufacturer for order processing and managingpayment realizations. Pay Junction maintains separate files for storing customerdetails and order details. When an order is processed, various parameters thataffect the order are filled in a form and then analyzed. The payments for ordersare accepted through cash or credit card.
ENTITIES
Number of entities: 5
Names of entities:
1. Customers
2. Orders
3. Products
4. Payments
5. Employees
GV Nguyễn Thị Thanh Tâm
Relational Database Design 1.20
ATTRIBUTES
Attributes:
The attributes of the regular entities are:
a. CustomersCust-CodeFirst Name Last Name Address CountryZip CodePhone No
b. OrdersOrder-CodeCust-Code Prod-Code Emp-CodeOrder-DtShip Name Ship Address Ship Country Ship Phone Ship-DtShip Method Id Ship Method Freight Charge Sales Tax Quantity DiscountTotal Cost
c. ProductsProd-CodeProd-Name Description Unit Price
d. PaymentsPayment-Code Order-Code Payment Amount Payment-Dt Payment Mode Id Payment Mode CreditCard No Cardholders NameCreditCardExpiry-Dt
Relational Database Design 1.22
e. EmployeesEmp-Code First Name Last Name TitlePhone No
1.23 Relational Database Design
E/R DIAGRAM
SHIP NAME
SHIPADDRESS
SHIP COUNTRY
SHIP PHONE
SHIP-DT
SHIP METHOD
SHIP METHOD ID
ORDER- DT
SALES TAX
ADDRESS
LAST NAME
FIRST NAME
COUNTRY
ZIP CODE
PHONE NO
CUST- CODE
EMP- CODE
FREIGHT CHARGE
QUANTITY
DISCOUNT
TOTAL COST
CUST-CODE ORDER-C OD E
1 m m m
CUSTOMERS1
PLACES ORDERS FOR PRODUCTS
E M P-
MAKES
1
m
PROCESSES
m
1
FOR
1
UNIT PRICE
DESCRIPTION PROD-CODE
CODE EMPLOYEES PAYMENTS PROD-NAME
FIRSTNAME
LASTNAME TITLE
PHONE NO
CREDITCARDEXPIRY- DT
CARDHOLDERS NAME
CREDITCARD NO
PAYMENT MODE
PAYMENT-DT
PAYMENT MODE ID
PAYMENT AMOUNT
PAYMENT-CODE
ORDER- CODE
Orders
Order-Code
Cust-Code
Emp-Code
Order-Dt
Ship-Name
Ship-Address
Ship-Country
Ship-Phone
Ship-Dt
Ship-Method-ID
Ship-Method
Freight-Charge
Sales-Tax
Order Details
OrderDetail-ID
Order-Code
Prod-Code
Quantity
Discount
Total-Cost
TABLES
Number of Tables: 6
Customers [Entity] Orders [Entity] Order Details [Relationship]
Customers
Cust-Code
First-Name
Last-Name
Address
Country
Zip-Code
Phone-No
The Order Details table is formed because of a many-to-many relationship betweenthe Orders and Products entities.
Payments
Payment- Code
Order-Code
Payment-Amount
Payment-Dt
Payment-Mode- ID
Payment-Mode
Credit Card-No
Card Holders-Name
CreditCardExpiry-Dt
Employees
Emp-Code
First-Name
Last-Name
Title
Phone-No
Products [Entity] Payments [Entity] Employees [Entity]
Products
Prod-Code
Prod-Name
Description
Unit-Price
TABLES AFTER 1 NF
Orders
Order-Code
Cust-Code
Emp-Code
Order-Dt
Ship-Name
Ship-Address
Ship-Country
Ship-Phone
Ship-Dt
Ship-Method-ID
Ship-Method
Freight-Charge
Sales-Tax
Order Details
OrderDetail-ID
Order-Code
Prod-Code
Quantity
Discount
Total-Cost
The tables are already in 1 NF.
Customers Orders Order Details
Customers
Cust-Code
First-Name
Last-Name
Address
Country
Zip-Code
Phone-No
Payments
Payment- Code
Order-Code
Payment-Amount
Payment-Dt
Payment-Mode- ID
Payment-Mode
Credit Card-No
Card Holders-Name
CreditCardExpiry-Dt
Employees
Emp-Code
First-Name
Last-Name
Title
Phone-No
Products Payments Employees
Products
Prod-Code
Prod-Name
Description
Unit-Price
Orders
Order-Code
Cust-Code
Emp-Code
Order-Dt
Ship-Name
Ship-Address
Ship-Country
Ship-Phone
Ship-Dt
Ship-Method-ID
Ship-Method
Freight-Charge
Sales-Tax
Order Details
OrderDetail-ID
Order-Code
Prod-Code
Quantity
Discount
Total-Cost
TABLES AFTER 3 NF
The tables are already in 2 NF as the attributes in each table depend on the primarykey.
Customers Orders Order Details
Customers
Cust-Code
First-Name
Last-Name
Address
Country
Zip-Code
Phone-No
Payments
Payment- Code
Order-Code
Payment-Amount
Payment-Dt
Payment-Mode- ID
Payment-Mode
Credit Card-No
Card Holders-Name
CreditCardExpiry-Dt
Employees
Emp-Code
First-Name
Last-Name
Title
Phone-No
Products Payments Employees
Products
Prod-Code
Prod-Name
Description
Unit-Price
Orders
Order-Code
Cust-Code
Emp-Code
Order-Dt
Ship-Name
Ship-Address
Ship-Country
Ship-Phone
Ship-Dt
Ship-Method-ID
Ship-Method
Freight-Charge
Sales-Tax
Order Details
OrderDetail-ID
Order-Code
Prod-Code
Quantity
Discount
Total-Cost
TABLES AFTER 5 NF
In the Orders table, the attribute Ship-Method depends on Ship-Method-ID and not onOrder-Code. Therefore, for the tables to be in 3 NF, we need to create another table, Shipment Methods. Also, in the Payments table, the attribute Payment-Mode dependson Payment-Mode-ID and not on Payment-Code. Therefore, we need to create aseparate table, Payment Modes. In addition, the attributes Cardholders-Name and CreditCardExpiry-Dt depend on CreditCard-No and not on Payment-Code. Therefore, we need to create another table, Credit Cards. Now, the tables are:
Customers Orders Order Details
Customers
Cust-Code
First-Name
Last-Name
Address
Country
Zip-Code
Phone-No
Payments
Payment- Code
Order-Code
Payment-Amount
Payment-Dt
Payment-Mode-ID
Credit Card-No
Employees
Emp-Code
First-Name
Last-Name
Title
Phone-No
Credit Cards
Credit Card-No
Card Holders- Name
CreditCardExpiry- Dt
Products Payments Employees
Products
Prod-Code
Prod-Name
Description
Unit-Price
Shipment Methods Payment Modes Credit Cards
ShipmentMethods
PaymentModes
Ship-Method-ID Payment-Mode-ID
Ship-Method Payment-Mode
Orders
Order-Code
Cust-Code
Emp-Code
Order-Dt
Ship-Name
Ship-Address
Ship-Country
Ship-Phone
Ship-Dt
Ship-Method-ID
Ship-Method
Freight-Charge
Sales-Tax
Order Details
OrderDetail-ID
Order-Code
Prod-Code
Quantity
Discount
Total-Cost
TABLES AFTER DENORMALIZATION
When we place the information about credit card in a separate table, the queryperformance during the generation of payment receipt will get affected due to creationof joins in every payment receipt. Therefore, for optimum performance, wedenormalize and place the credit card information back into the Payments table. Now, the tables are as follows:
Customers Orders Order Details
Customers
Cust-Code
First-Name
Last-Name
Address
Country
Zip-Code
Phone-No
Payments
Payment- Code
Order-Code
Payment-Amount
Payment-Dt
Payment-Mode-ID
Credit Card-No
Employees
Emp-Code
First-Name
Last-Name
Title
Phone-No
Products Payments Employees
Products
Prod-Code
Prod-Name
Description
Unit-Price
Shipment Methods Payment Modes
Shipment Methods Payment Modes
Ship-Method-ID Payment-Mode-ID
Ship-Method Payment-Mode
PRIMARY AND FOREIGN KEYS
Customers
Primary key: Cust-Code
Orders
Primary key: Order-Code
Foreign keys: Cust-Code, Emp-Code, Ship-Method-ID
Order Details
Primary key: OrderDetail-ID
Foreign keys: Order-Code, Prod-Code
Shipment Methods
Primary key: Ship-Method-ID
Products
Primary key: Prod-Code
Payments
Primary key: Payment-Code
Foreign keys: Order-Code, Payment-Mode-ID
Payment Modes
Primary key: Payment-Mode-ID
Employees
Primary key: Emp-Code
Field Name1
Prod-Code
Prod-Name
Description
Unit-Price
Field Name
Cust-Code
First-Name
Last-Name
Address
Country
Zip-Code
Phone-No
Field Name
Payment-Code
Order-Code
Payment-Amount
Payment-Dt
Payment-Mode-ID
CreditCard-No
CardHolders-Name
CreditCardExpiry-Dt
Field Name
Emp-Code
First-Name
Last-Name
Title
Phone-No
RELATIONSHIPS BETWEEN FINAL TABLES
Order Details Products
Field NameField Name
OrderDetail-IDOrder-Code
Order-CodeCust-Code
Prod-CodeEmp-Code
QuantityOrder-Dt
DiscountShip-Name
Total-CostShip-Address
Ship-Country
Shipment MethodsShip-Phone
Field NameShip-Dt
Ship-Ship-Method-ID Method-ID
Ship-MethodFreight-Charge
Payments Sales-Tax
Employees
Payment Modes
Field Name
Payment- Mode-ID
Payment-Mode
BBLLANANKK DDOOCCUUMMEENNTTAATTIIOONN FFOORRMAMATSTS
PROJECT ON
Developed by
Name:
Reg. No.:
(Project Title)
Batch Code :Start Date : End Date:
Name of the Coordinator :
Name of Developer :
Date of Submission :
CERTIFICATE
This is to certify that this report titled embodies the original work done by in partial fulfillment of their course requirementat NIIT.
Coordinator:
ACKNOWLEDGEMENT
SYSTEM ANALYSIS
System Summary:
ENTITIES
Number of entities:
Names of entities:
ATTRIBUTES
Attributes:
E/R DIAGRAM
TABLES
Number of Tables:
TABLES AFTER 1 NF
TABLES AFTER 2 NF
TABLES AFTER 3 NF
TABLES AFTER DENORMALIZATION
PRIMARY AND FOREIGN KEYS
RELATIONSHIPS BETWEEN FINAL TABLES