Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Database Management Assignment

Question 1. Consider the following relation:

Recipe (rid: int, name: varchar(40), time: int, difficulty: int)

Assume the presence of a clustered index idx1 on rid and an unclustered index idx2 on time.

A. Give an example of an update query that would be significantly speeded up by idx1.

B. Give an example of an update query that would be significantly speeded up by idx2.

C. Give an example of an update query that would be significantly slowed down by idx1 and/or idx2.

D. Give an example of an update query that is not impacted by idx1 and/or idx2.

Question 2. A streaming company needs to measure the AVERAGE amount of time users spend watching video on their platform in a session. They are interested in users between the ages of 25 and 30, inclusive, who have at least 50 sessions stored in the DB. The duration for a user is the maximum time spent watching video in a session minus the minimum time spent in a session, regardless of the users' age at the time the sessions were made. There are several tables in the DB, but the ones of interested here are:

User (uid, name, age) , SessionRecord (uid, date, duration)

Primary key attributes are underlined. In the table definitions, the attribute of age is declared as NOT NULL, but duration can be NULL.

Write a query that satisfies the above requirements by making sure to use GROUP BY and HAVING clauses.

Question 3. Assume a B+ tree is used to index a set of 1,002,001,000 ordered keys. Each node/leaf can contain up to 1000 keys/pointers. All nodes and leaves of the tree are fully occupied. How many levels are in the resulting tree? Write the formula to obtain the final number.

Question 4. A. Given two relations A and B, with number of records n=|A| and m=|B|. What is the worst case complexity (number of comparisons) of the nested loop join if the predicate has O(1) complexity?

B. Considering the previous setting (relations A and B) with number of pages nA, nB and number of records per page pA and pB, respectively. What is the total number of disk reads for the block nested loop join? (assume relations do not fit in memory, A is outer).

DBMS, Programming

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

Have any Question?


Related Questions in DBMS

Assignmenta restaurant is designing a database to keep

Assignment A restaurant is designing a database to keep track of customer services. A customer is defined as a customer ID, name, address and a telephone number. Customers are served by employees. Each employee is define ...

Sql assignmentin these exercises youll enter and run your

SQL Assignment In these exercises, you'll enter and run your own SELECT statements. You will use the MyGuitarShop database for these queries. If you do not already have the MyGuitarShop database, the SQL script and the i ...

Question suppose we have two kinds of doctors hospital

Question : Suppose we have two kinds of doctors: hospital doctors and family physicians. In addition to the doctor's id number, name, specialty, and years of experience, we want to record the hospital name for the hospit ...

Solve the following questions using oracle you are not

Solve the following questions using Oracle. You are not allowed to use the syntax of any DBMS other than Oracle. Make sure to upload an electronic copy of your solution to your CSC335 TRACE folder. Name the file hw4.sql. ...

Database design amp development assignment -assignment

Database Design & Development Assignment - Assignment title - Design and Implement a Relational Database for a local Print and Ink Refill Business. Learning Outcome - Use an appropriate design tool to design a relational ...

In sql database questions phase-1 in 100 words what steps

In SQL Database Questions: Phase-1 In 100 words, what steps can one take to avoid losing work? Which command is used to save changes to the database? What is the syntax for this command? Phase-2 In 100 words, explain the ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

Need an expert in the fields of system design to handle

Need an expert in the fields of system design to handle this project This is a system analysis and design project, not a research project. Refer to the list of deliverables in the instructions in the assignment to make s ...

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 ...

Databases assignment - monash library services monlib case

Databases Assignment - Monash Library Services (MonLib) Case Study TASK 1: Data Definition For this task you are required to complete the following: 1.1 - Add to your solutions script, the CREATE TABLE and CONSTRAINT def ...

  • 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