Question 1 consider the relational schemapartpart-id name

Assignment Help Database Management System
Reference no: EM13357424

Question 1. Consider the relational schema

part(part-id, name, cost)

subpart(part-id, subpart-id, count)

A tuple (p1, p2, 3) in the subpart relation denotes that the part with part-id p2 is a direct subpart of

the part with part-id p1, and p1 has 3 copies of p2. Note that p2 may itself have further subparts.

Write a recursive SQL query that outputs the names of all subparts of the part with part-id "P-100".

Question 2. Consider the relation, r, shown below. Give the result of the following query:

1738_sql.png

 SELECT building, room_number, time_slot_id, count(*)

FROM r

GROUP BY ROLLUP (building, room_number, time_slot_id)

Question 3. Consider an employee database with two relations

employee(employee-name, street, city)

works(employee-name, company-name, salary)

where the primary keys are underlined. Write a query to find companies whose employees earn a

higher salary, on average, than the average salary at "First Bank Corporation".

a. Using user defined SQL functions as appropriate.

b. Without using user defined SQL functions (you can use built-in SQL functions such as

avg(), min()).

Question 4. Write the following queries in both relational algebra and SQL, using the university schema.

(Appendix A, page 1271, look at that .zip file) Attachment:- DDL.zip

a. Find the names of all students who have taken at least one Comp. Sci. course.

b. Find the IDs and names of all students who have not taken any course offering before

Spring 2009.

c. For each department, find the maximum salary of instructors in that department. You

may assume that every department has at least one instructor.

d. Find the lowest, across all departments, of the per-department maximum salary

computed by the preceding query.

Question 5. Construct an E-R diagram for a hospital with a set of patients and a set of medical doctors.

Associate with each patient a log of the various tests and examinations conducted.

Question 6. Explain the distinction between disjoint and overlapping constraints.

Question 7. Explain the distinction between total and partial constraints.

Question 8. Consider the following set F of functional dependencies on the relation schema

r(A,B,C,D,E,F):

A --> BCD

BC --> DE

B --> D

D--> A

a. Compute B+.

b. Prove (using Armstrong's axioms) that AF is a superkey.

c. Compute a canonical cover for the above set of functional dependencies F; give each step

of your derivation with an explanation.

d. Give a 3NF decomposition of r based on the canonical cover.

 

Reference no: EM13357424

Questions Cloud

Question 1-what sars viral proteins are made using the : question 1-what sars viral proteins are made using the frameshifting? nbspis there only one sars viral protein made
Organization analysis paper assignment needs assessment for : organization analysis paper assignment needs assessment for hrd interventions take place in a specific organizational
Create a powerpoint presentation depicting the : create a powerpoint presentation depicting the organizational structure of a fortune 500 company. based on your
Anbspdesign and explain a computer-based simulation model : anbspdesign and explain a computer-based simulation model which you will use to estimate the probability that among 25
Question 1 consider the relational schemapartpart-id name : question 1. consider the relational schemapartpart-id name costsubpartpart-id subpart-id counta tuple p1 p2 3 in the
Questionnbspdo brief research on asean economic community : questionnbspdo brief research on asean economic community aec and discuss on the following questions how does the aec
Question1 explain the challenges and advantages of having : question1 explain the challenges and advantages of having internal gills over external gills for gas exchange?question
1nbspnbspnbspnbspnbsp name two financing options that are : 1.nbspnbspnbspnbspnbsp name two financing options that are available tonbspcorporations. what are the benefits and
Question 1 draw a picture of a moving source and the waves : question 1. draw a picture of a moving source and the waves surrounding it according to what you observed in this

Reviews

Write a Review

Database Management System Questions & Answers

  List the details of parts supplied by quality

Attribute dob is the customer's date of birth, stops is the number of stops (0-??) a flight requires, and onTime is a percentage (0-100) indicating how often a flight is on time. Keys are underlined.

  Create a clustered index on the groupid column

Write the CREATE INDEX statements to create a clustered index on the GroupID column and a nonclustered index on the IndividuallD column of the GroupMembership table.

  Purpose of the database

Complete Entity-Relationship Diagram (ERD) for the database design. Include all maximum and minimum cardinalities on your diagram.

  Essay on data mining in warehouse architectures

Course: data mining. Require a 7 page essay on subjects: Warehouse Architectures: the paper requires to contain information about centralized, federated, and tiered data warehouse.

  A company makes use of a computerised flat file information

a company makes use of a computerised flat file information retrieval and storage system. the company is experiencing

  Find maximum salary of employees from database table

Find the maximum salary of all employees who are not managers. Give all the managers in the database a 10 percent salary raise. Give all the other employees a 5 percent salary raise.

  Question accountants will use data flow diagrams dfds to

question accountants will use data flow diagrams dfds to depict the physical flows of data through an ais like document

  Discuss common input - output technologies

Create a Microsoft Word table that identifies the advantages, disadvantages, computer requirements, initial costs, and future savings for an organization considering an engagement in virtualization.

  Determine columns that make up the primary key

Carry out the following tasks below by using the correct SQL statements. Create the statements in Oracle by using the following steps (SQL > SQL commands > Enter Command). Determine the columns that make up the primary key of the l_lunch_items tabl..

  describe capability of Good Eat Enterprise Resource Planning

This system will also provide administrators with the ability to create custom reports and filter data based upon a wide variety of information captured from each store.

  Identify three potential users and design subschema for each

Identify three potential users and design a subschema for each. Justify your design by explaining why each user needs access to that data element.

  Question 1 consider that you have been presented with the

question 1 consider that you have been presented with the subsequent relation for the baxter aviation database charters

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd