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

  How do these change with variation in the condence values

Looking at the predictive accuracy (Percent correct) results for tree learning on these data sets, has learning improved accuracy over the baseline ?

  Develop an entity-relationship diagram as a conceptual mode

For the following requirements analysis description, develop an Entity-Relationship Diagram as a conceptual model that captures all of the requirements to the fullest extent possible.

  Choose a suitable indicator to plot the measure

Determine how you will collect the data elements needed for this measure (i.e. how will you collect the data elements needed to calculate the measure). Describe what those data elements are, and how they will be collected.

  What is the functionality of the tool

What is the functionality of the tool and what is the actual running environment (software and hardware) of the tool - how will you evaluate the tool based on your own experience?

  Evaluate a dbms in terms of lock granularity

Suppose you are asked to evaluate a DBMS in terms of lock granularity and the different locking levels. Create a simple database environment in which these features would be important.

  Data analysis and definition

What is the business implications that can be drawn from the process of building and comparing these models, and has this practice helped resolve the business issue? Why or why not?

  Knowledge and data warehousing adventure works cycles the

knowledge and data warehousing adventure works cycles the fictitious company on which the adventureworks sample

  Prepare a systems proposal

Prepare a Systems Proposal that includes an executive summary and a problem statement. Refer to the guidelines and recommended format for the systems proposal.

  Code an oracle database trigger

Code an Oracle Database trigger to enforce the constraint that an employee can never change his or her department.

  Produce an entity-relationship diagram

Produce an Entity-Relationship diagram which represents the above activities of the insurance company. Indicate the names and degrees of all the relationships. Give appropriate attributes for each entity shown, and identify the primary key for eac..

  Database modeling and design

Database Modeling and Design: A complete table diagram. Transform model to tables, include all attributes and keys.

  Find all non-trivial dependencies

Compute the closure sets of R, find all non-trivial dependencies and what are the candidate keys of R?

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