EXPERIMENT docx

14 257 0
  • Loading ...
    Loading ...
    Loading ...

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Tài liệu liên quan

Thông tin tài liệu

Ngày đăng: 01/08/2014, 09:22

1D.1 Relational Database Desi g n L L E E S S S S O O N N : : 1 1 D D E E X X P P E E R R I I M M E E N N T T 1D.2 Relational Database Desi g n 1D.3 Relational Database Desi g n L L A A B B E E X X E E R R C C I I S S E E S S Exercise 1 New Era is a manufacturing company that has two types of suppliers. The first type of suppliers allow credit and the second type of suppliers insist on payment in cash before delivery. The manufacturer wants to maintain information on these two types of suppliers separately. For the credit suppliers, “credit period” and “credit limit” have to be recorded. For the cash suppliers, “date of payment” needs to be stored. John is the database administrator at New Era. He needs to draw an E/R diagram to represent the above situation. I I N N S S T T R R U U C C T T O O R R N N O O T T E E S S Solution Exercise 2 Ron Floyd is the newly appointed database administrator at Standard bank. The management of this bank wants to computerize the process of banking. According to the bank’s policy, one customer can have many accounts but one account cannot be shared by many customers. As the first activity in database design, Ron is required to SUPPLIERS CREDIT CASH PAY_D CR_PERIOD CR_LIMIT Relational Database Desi g n 1D.4 make an E/R diagram to represent the relationship between a customer and the accounts owned by that customer. I I N N S S T T R R U U C C T T O O R R N N O O T T E E S S Solution Exercise 3 Red Sky Systems is a newly formed IT company. They are involved in doing software projects for their clients. This company maintains a database for keeping a record of its employees and projects. All employee-related information is stored in a table called Employee. The information about the projects undertaken by the company is stored in a table called Project. There is another table called Assignment that stores the information about which project is assigned to which employee. The three tables are as follows: EMPLOYEE Emp-Code Emp-Name Department Age 0007 Susan Finance 23 0010 Tracy Finance 35 0079 Erica Systems 30 0111 John Systems 21 0123 Ron Systems 25 0217 Chris Systems 22 ACCOUNT CUSTOME R HAS CUST- NAME SOCIAL- SECURITY CUST- ADDRESS ACCOUNT- NUMBER BALANCE 1 m 1D.5 Relational Database Desi g n PROJECT Proj-Code Proj-Name P011 Budget Planning P012 Financial System P013 Personnel Software P014 Inventory Control P015 Budget Monitoring P016 Executive Software ASSIGNMENT Proj-Code Emp-Code P011 0007 P012 0079 P013 0010 P014 0217 P015 0010 P016 0111 Chris is the database administrator at Red Sky Systems. He wants to display the following: 1. All details of the employees in the Finance division. 2. The name and age of all employees. 3. The project name, employee name, and department for every employee. 4. The names of all employees who are less than 25 years of age and have an employee code greater than 100. Identify the ways in which each of these can be done and what will be the result. Relational Database Desi g n 1D.6 I I N N S S T T R R U U C C T T O O R R N N O O T T E E S S Solution 1. Chris needs to use the Restrict operation. The result will be the following table: Emp-Code Emp-Name Department Age 0007 Susan Finance 23 0010 Tracy Finance 35 2. The Project operation will be used here and the result will be: Emp-Name Age Susan 23 Tracy 35 Erica 30 John 21 Ron 25 Chris 22 3. The operators to be used here are Join and Project. The result is as follows: Proj-Name Emp-Name Department Budget Planning Susan Finance Financial System Tracy Finance 1D.7 Relational Database Desi g n Proj-Name Emp-Name Department Personnel Software Erica Systems Inventory Control John Systems Budget Monitoring Ron Systems Executive Software Chris Systems 4. This information can be obtained using the Restrict and Project operators. The result is as follows: Emp-Name John Chris Exercise 4 Jack is a departmental storeowner. He has regular customers who purchase grocery items from his store. Jack also has regular suppliers for grocery items. He has assigned customer codes and supplier codes to the regular customers and suppliers to simplify transactions. Jack has created a table to store records of the regular customers and the products they purchase. He has also created another table to store the records of the regular suppliers and the product they supply. He needs to create a third table, Customer-Supplier that displays records of the regular customers, the products they purchase, and the supplier who supplies it. Identify how Jack can create this third table and what will be the result. Use the Customer Records and Supplier Records tables to solve the problem. Customer Records Cust ID Prod Name A0001 Honey Relational Database Desi g n 1D.8 Cust ID Prod Name A0025 Bread C0098 Honey D0046 Chips D0078 Bread Supplier Records Sup_ID Prod Name S0023 Bread S0056 Honey S0003 Jam S0067 Butter S0015 Chips I I N N S S T T R R U U C C T T O O R R N N O O T T E E S S Solution The table can be created by using the Join operation. Customer-Supplier Cust ID Prod Name Sup ID A0001 Honey S0056 A0025 Bread S0023 C0098 Honey S0056 D0046 Chips S0015 1D.9 Relational Database Desi g n Cust ID Prod Name Sup ID D0078 Bread S0023 Relational Database Desi g n 1D.10 A A D D D D I I T T I I O O N N A A L L E E X X E E R R C C I I S S E E S S Exercise 1 Reliable Insurance is a car insurance company that provides insurance for all types of cars. This company has many customers and each customer owns a number of cars. The company also maintains a record of accidents associated with each car. Jim Burton is the newly appointed database designer. He needs to draw an E/R diagram to represent the above situation. I I N N S S T T R R U U C C T T O O R R N N O O T T E E S S Solution CA R CUSTOME R OWNS CUST- CODE CUST- NAME CUST- ADDRESS CAR- NUMBER MODEL MET ACCIDENT ACCIDENT- NO ACCIDENT- DATE ACCIDENT- PLACE DAMAGE- AMOUNT 1 m 1 m
- Xem thêm -

Xem thêm: EXPERIMENT docx, EXPERIMENT docx, EXPERIMENT docx

Từ khóa liên quan