Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Relational databases: theory and practice Assignment

ANSWER ALL QUESTIONS

Question 1 - Use the block notes to answer the following questions:

i. Explain what is meant by the process of denormalization and how it is done.

ii. Explain why we may need to use denormalization (i.e. provide the motivation for denormalization)

iii. Explain when it is  a good idea to use normalization.

iv. Give an example of denormalization.

v. Explain the drawbacks of denormalization.

vi. Explain when denormalization should be avoided.

Question 2 - Use the e-library and other resources to answer the following questions:

i. Explain what is meant by extensible relational database design.

ii. Explain what is meant by the "Entity-Attribute-Value (EAV)" approach.

iii. Explain how can the EAV approach be used to implement database extensibility.

iv. Give an example of using the EAV approach to implement a simple relational database with extensibility features.

v. Explain why we may need to use the EAV approach to implement relational database extensibility (i.e. describe the advantages of the EAV approach for implementing relational database extensibility).

vi. Explain why we may not sometimes wish to use the EAV approach to implement relational database extensibility (i.e. describe the disadvantages of using the EAV approach for implementing relational database extensibility).

You must provide at least two references in the Harvard style of referencing, excluding your course materials and Wikipedia.  At least one of the references should be a recent reference (within the last four years).

Question 3 - Develop a conceptual model for the following scenario.  The data model should consist of the usual 5 components: E-R diagram, Entity Types (including entity type identifiers), assumptions, additional constraints, and limitations:

It is desired to develop an online pizza ordering database for a pizza shop.

For each customer, we need to keep a customer id, first name, middle name, last name, title, telephone number and address.

A customer may make zero or more orders.  For each order, we maintain a unique order id, a date, a time, and any special discounts offered on the whole order.

Each order is made by exactly one customer, taken by exactly one employee, delivered by exactly one driver and consists of one or more line-items.

An order cannot contain more than 100 line items.

For each employee, we keep an employee id, a first name, a middle name, a last name, an address, a telephone number and a salary.

An employee can take many orders.

For each driver, we keep the driver id, name, telephone number and hourly salary.

A driver may deliver many orders.

For each Line item, we keep a line number, a quantity, and a sale price.

A line item must be associated with a single order and must also be associated with a single menu item.

A menu item is a main item that can be ordered by itself from the menu.  There are two types of menu items: standard items, like standard specialty pizzas, French fries, salads, drinks, etc. and custom pizzas which you can customize yourself by choosing the crust type, the toppings, and so on.

For each menu item, we keep a menu number, a name, a description, a menu price, and customer special requests.

A menu item can participate in zero or many line items.  Every menu item must be either a standard item or a custom pizza but not both.

For standard items, we keep the menu number, which indicates that the menu item having this menu number is a standard item and the portion size (small, medium or large).

Obviously, a standard item must be associated with a single menu item.

For custom pizzas, we keep pizza-diameter, type of crust and flavor of crust.

A custom pizza must also be associated with a single menu item and can have many toppings up to a maximum of 7 toppings.

For each topping, we keep a type, pizza-diameter and price.  A custom pizza can only be supplied with a topping priced for the same diameter.

A toping may be used by many custom pizzas.

Note: you should expect about 10 entity types, 9 relationship types, 45 attributes, 8 additional constraints, 4 assumptions and 2 limitations in the CDM for this application.

Question 4 -

i. Convert the following relational representation back into a CDM using three relationships and four entity types.  Include the ER diagram, the entity types and the additional constraint sections only.

ii. Consider the schema below to answer the following questions:

R (A, B, C, D, E, F, G)

fd1: (A, B) → C, D, E, F, G

fd2: C → A, B, D, E, F, G

fd3: D → E

fd4: F → G

a. Show that relation R is in 2NF and not in 3NF explaining why.

b. Normalize the relation R into a set of 3NF relations. Show the primary keys.

c. Further normalize the results of the previous step into a set of BCNF relations if not already in BCNF and show the primary keys.

Question 5 - You will need to refer to the University database to answer this question. Write SQL queries to perform the following operations. In each case show the SQL statement you used and the actual output from your DBMS.  You are required to show the actual output of your queries.

a) List patient details for all male patients in ward number 'w5'.

b) List the ward numbers of all occupied wards with no duplicates.

c) List the patient ids, the start date and reason for treatment for all patients undergoing a treatment for a reason that contains the word 'temperature' or the word 'fever' and who started their treatment after 5 December 2006.

d) List the names of all specialists along with their specialisms.

e) Get the ward numbers and ward names for all wards that have no patients.

f) Write a query to get the number of distinct patients undergoing each type of treatment (i.e. reason for treatment) in the database, ordered alphabetically by the reason for the treatment.

g) Write a query to get the names of all patients receiving a prescription whose daily dosage is higher than the average daily dosage of all prescriptions using the same drug.

h) Write a query to retrieve the ward number and average weight of patients for all wards having more than three patients, excluding ward w5.

Attachment:- Assignment.rar

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92059934

Have any Question?


Related Questions in DBMS

Case study problem 1 the case study company has experienced

Case Study: Problem 1 The case study company has experienced rapid growth in both the size of its client base and also in the services provided to clients. Unfortunately, the growth in data management policies, procedure ...

Instructionsfor decades relational databases remained

Instructions For decades, relational databases remained essentially unchanged; data was segmented into specific chunks for columns, slots, and repositories, also called structured data. However, in this Internet of Thing ...

Question lab 1 creating a database designthis assignment

Question: Lab 1: Creating a Database Design This assignment contains two (2) Sections: Database Design Diagram and Design Summary. You must submit both sections as separate files in order to complete this assignment. Not ...

Question create the physical data model for the logical

Question: Create the physical data model for the logical data model that you submitted in IP3. This should include all of the data definition language SQL. Your submission should include all DDL needed to: Create the tab ...

Question find at least two academic sources that describe

Question: Find at least two academic sources that describe the movement of Enterprise resource planning (ERP) activities to the cloud. Discuss the types of ERP activities that can be conducted in the cloud and the pros a ...

Answer the following question explain the difference

Answer the following Question : Explain the difference between a database management system (DBMS) and a database. Are Microsoft Access, SQL Server, and Oracle examples of databases or database management systems (DBMS)?

Sqlwrite a select statement that returns three columns from

SQL Write a SELECT statement that returns three columns from the Vendors table: VendorContactFName, VendorContactLName, and VendorName. Sort the result set by last name, then by first name.

Sqlwrite a select statement that returns one column from

SQL Write a SELECT statement that returns one column from the Vendor table named Full Name. Create this column from the VendorContactFName and VendorContactLName columns. Format it as follows: last name, comma, first nam ...

Question a suppose you are a marathon runner that can run a

Question : a) Suppose you are a marathon runner that can run a maximum of n miles on a single bottle of water. You are given a map of your marathon route with all the water stations marked. Design an efficient algorithm ...

Select from e d pwhere edeptddept and dcitypcity and

Select * From E, D, P WHERE E.dept=D.dept AND D.city=P.city AND D.budget>1M AND P.priority=A; Assuming relations have the same size and uniform distributions, what is the best plan with Nested Loop joins only? Write it a ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As