Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Part A

1. A lock on a larger data element increases both system overhead and waiting by transactions.

True False

2. When transactions T1 and T2 are in a deadlock, one of the transactions will eventually execute to completion and let the other one continue execution.

True False

3. When an update to the database takes place, the time of the update, the values of the data before and after the update, and the type of lock used are recorded in the transaction log.

True False

4. To restore a database using the immediate update approach, both undo and redo operations may be necessary, whereas with the deferred update approach only redo operations are used.

True False

5. Which of the following is an example of lost update?

A. The system assigns the last aisle seat on a flight to John whereas Peter receives a window seat, although both indicated preference for an aisle seat

B. John and Peter receive each a window seat as they both requested

C. John is initially assigned the last window seat, but this seat is later on assigned to Peter

D. None of the above

6. Julia has a lock on the savings account and Bill is trying to perform a conflicting action on the data:

A. Bill's transaction is granted permission to perform the desired action

B. Bill's transaction must wait until Julia's lock is released

C. Bill's transaction must wait until Julia has read the savings account value

D. None of the above

7. Julia has a shared lock on the savings account and Bill is trying to perform an action requesting a shared lock on the same data:

A. Bill's transaction is granted permission to perform the desired action

B. Bill's transaction must wait until Julia's lock is released

C. Bill's transaction must wait until Julia has read the savings account value

D. None of the above

8. Julia has an exclusive lock on the savings account and Bill is trying to perform an action requesting a shared lock on the same data:

A. Bill's transaction is granted permission to perform the desired action

B. Bill's transaction must wait until Julia's lock is released

C. Bill's transaction must wait until Julia has read the savings account value

D. None of the above

9. Which of the following will cause a deadlock?

A. Transaction T1 requests an exclusive lock on data A at the same time as transaction T2

B. Transaction T1 places an exclusive lock on data A, then transaction T2 requests a shared lock on data A

C. Transaction T1 places an exclusive lock on data A, then requests one on data B. Simultaneously, transaction T2 places an exclusive lock on data B, then requests one on data A

D. Transaction T1 and T2 modify data A without any lock

10. In the two-phase locking protocol:

A. A transaction only acquires a lock after the previously acquired lock has been released

B. A transaction acquires locks as needed. After it starts releasing locks, it does not acquire new locks

C. A transaction acquires all needed locks at once, then releases them after completion

D. The transaction locks the full database, then releases the locks

11. Consider a transaction that updates each of the 100 employees' salaries in a table (there is one row per employee) under the immediate update mode. The transaction terminates abnormally after 10 rows have been updated in the database (and the normal operations have taken place on the log). What should the recovery procedure perform to make sure the transaction completes as desired?

A. Redo

B. Redo followed by execution of the transaction again

C. Undo

D. Undo followed by execution of the transaction again

12. Consider a transaction that updates each of the 100 employees' salaries in a table (there is one row per employee) under the deferred update mode. The transaction terminates abnormally after the new values of 10 rows have been written to the log. What should the recovery procedure perform to make sure the transaction completes as desired?

A. Execute the transaction again

B. Redo followed by execution of the transaction again

C. Undo

D. Undo followed by execution of the transaction again

13. Consider a transaction that updates each of the 100 employees' salaries in a table (there is one row per employee) under the immediate update mode and completes before a checkpoint. The system crashes after the checkpoint. What should the recovery procedure perform to make sure the transaction completes as desired?

A. Nothing

B. Redo followed by execution of the transaction again

C. Undo

D. Undo followed by execution of the transaction again

14. Consider a transaction that updates each of the 100 employees' salaries in a table (there is one row per employee) under the immediate update mode and completes after a checkpoint but before a system failure. The system crashes after the checkpoint. What should the recovery procedure perform to make sure the transaction completes as desired?

A. Nothing

B. Redo forward from checkpoint

C. Undo

D. Undo followed by execution of the transaction again

15. With database locking, a(n) _______________ lock must be obtained before reading a database item, and a(n) ___________ lock must be obtained before writing to a database item.________________________________________

CUSTOMER

In table CUSTOMER, CID is the primary key (Customer ID).

RENTALS

In the table RENTALS, RTN provides the rental number (the primary key), CID is the customer's unique id, PICKUP is the city where the car was picked up, and Return is the city where the car was returned.

RENTCOST

RENTCOST shows the base cost of renting a given MAKE for one day.

CITYADJ

If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.

RENTLENGTH

RENTLENGTH shows the number of days for the rental number (RTN) shown in table RENTALS. In a database used in reality, this table would be merged with the RENTALS table.

16. SELECT DISTINCT CID, CNAME

FROM CUSTOMER

WHERE CID IN

(SELECT CID FROM RENTALS WHERE MAKE IN ('FORD', 'TOYOTA'))

The CNAMEs shown by the execution of this query are:

A. BLACK

B. BLACK, JONES

C. BLACK, JONES, MARTIN

D. BLACK, JONES, MARTIN, VERNON

17. SELECT DISTINCT CUSTOMER.CID, CNAME

FROM CUSTOMER, RENTALS, RENTCOST

WHERE CUSTOMER.CID = RENTALS.CID

AND RENTALS.MAKE = RENTCOST.MAKE AND NOT EXISTS

(SELECT * FROM RENTALS R, RENTCOST C

WHERE R.MAKE = C.MAKE

AND RENTALS.CID = R.CID

AND RENTCOST.COST <> C.COST)

The meaning of this query is:

A. List all customers with more than one car make rented

B. List all customers who have only rented one make

C. List all customers with one or more rentals for which the cost of each car make rented is the same

D. None of the above

18. SELECT MAKE

FROM RENTALS, CUSTOMER

WHERE RENTALS.CID = CUSTOMER.CID

AND RESID_CITY = 'HEMET'

GROUP BY MAKE

HAVING COUNT (DISTINCT RENTALS.CID) =

(SELECT COUNT(*) FROM CUSTOMER

WHERE RESID_CITY = 'HEMET')

The execution of this query produces the following number of rows:

A. 0

B. 1

C. 2

D. 3

19. SELECT MAKE

FROM RENTALS, CUSTOMER

WHERE RENTALS.CID = CUSTOMER.CID

AND RESID_CITY = 'HEMET '

GROUP BY MAKE

HAVING COUNT (DISTINCT RENTALS.CID) =

(SELECT COUNT(*) FROM CUSTOMER

WHERE RESID_CITY = 'HEMET')

The meaning of this query is the following:

A. List all makes of cars rented to customers residing in Hemet

B. List all makes of cars rented to at least one customer residing in Hemet

C. List all makes of cars rented to all customers residing in Hemet

D. None of the above

20. SELECT CID, CNAME FROM CUSTOMER

WHERE 0 =

(SELECT COUNT(*) FROM RENTALS

WHERE CUSTOMER.CID = RENTALS.CID)

What is the interpretation of this query?

A. List the customers who do not have rentals

B. List the customers who have one rental

C. List the customers who have 0 or more rentals

D. List the customers who have 1 or more rentals

21. SELECT CNAME, DATE_OUT, RTN

FROM CUSTOME

WHERE CUSTOMER.CID = RENTALS.CID

AND BIRTHPLACE IN ('ERIE', 'CARY') AND EXISTS

(SELECT * FROM RENTCOST

WHERE COST < 40 AND RENTALS.MAKE= RENTCOST.MAKE)

The CNAMEs shown by the execution of this query are:

A. SIMON

B. GREEN, BLACK, SIMON

C. GREEN

D. GREEN, SIMON

22. Data warehouse data are organized and summarized by table, such as CUSTOMER and ADDRESS.

True False

23. In most implementations, the data warehouse and OLAP are stand-alone, independent environments.

True False

24. ____________ query optimization takes place at compilation time.

a. Dynamic
c. Automatic
b. Static
d. Manual

25. Implementing BI in an organization involves capturing not only business data (internal and external) but also the ____.

a. Metadata
c. information
b. Facts
d. rules

Part B

Q 1. Let us consider the following transactions which are being performed online by students of DBST 651 using https://my.umuc.edu. Individual transactions are illustrated in the diagram shown below. Based upon your understanding and reading of Transaction Management & Concurrency Control chapter answer the following:

What is needed to restart if transaction (T3) is aborted with a rollback after checkpoint before the system failure? Explain restart of work assuming the recovery manager using deferred update.

Same as #1 but assume recovery manager is using immediate update approach.

Assuming recovery manager is using deferred update approach. Explain how the restart will impact all the transactions shown in the timeline diagram (illustrated above - T1 to T9).

Same as #3 but the recovery manager is using immediate update approach.

Discuss the impact of restart of work if in case there is a device failure?

Q 2.Using DBST651.sql script which is available under the final exam to respond the following SQL problems:

Create SQL statements for the following scenarios. Your response should include SQL statement, output and any other assumptions you have made to arrive at the solution.

a. For Colorado customers compute the average amount of their orders and the number of orders placed. The result should include the customer number, customer last name, average order amount and the number of orders placed.

b. For Colorado customers compute the number of unique products ordered. If a product is purchased on multiple orders, it should be counted only one time. The result should include customer number, customer last name and the number of unique products ordered.

c. For each employee with a commission less than 0.04, compute the number of orders taken and the average number of products per order. The results should include the employee number, employee last name, number of orders taken and the average number of products per order.

d. For each Connex product compute the number of unique customers who ordered the product in Jan 2007. The results should include the product number, product name and the number of unique customers.

Q 3.

Answer the following in your own words not exceeding ONE page:

a. Explain the differences between a centralized and decentralized approach to database design. Make sure to provide suitable examples to understand your response.

b. What command is used to save changes to the database? What is the syntax for this command? Illustrate with an example.

c. What is a subquery? When is it used? Does the RDBMS deal with subqueries any differently from normal queries? Illustrate with examples different types of sub-query and co-related subqueries (nested etc).

d. What is a view? What is the command used to create a view. Illustrate the command with an example.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91348739
  • Price:- $30

Guranteed 24 Hours Delivery, In Price:- $30

Have any Question?


Related Questions in DBMS

Students will select a situation or problem from their

Students will select a situation or problem from their company as a course project that can be solved using a database system. Using MS Access, or MS SQL Server Express, students will create a relational database model o ...

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

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

Assignmentqueries functions and triggersdatabase

Assignment Queries, Functions and Triggers Database Systems Aims The aims of this assignment are to: formulate SQL queries; populate an RDBMS with a real dataset, and analyse the data; design test data for testing SQL qu ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

Assignment task -write and run sql statements to complete

Assignment Task - Write and run SQL statements to complete the following tasks Part A - DML 1. Show the details of the products where the product code starts with '22'. 2. Display the vendor details from areacode 615. 3. ...

Stored procedure please create the following stored

Stored procedure. Please create the following stored routines using CPS3740_2017S database using the tables in dreamhome database. xxxx is your email id 1) Implement a stored procedure p3Q21_xxxx to display the Branch ci ...

A taking an unnormalised list describe how you would

(a) Taking an unnormalised list, describe how you would normalise it using the normal forms technique and show how the result of this method is used. (b) You are currently in the process of developing a RDBMS for a natio ...

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

Football association of zambia faz super leaguethe faz has

Football Association of Zambia (FAZ) Super League The FAZ has recently decided to reorganise their operations to support both existing and possibly expanded league operations in Zambia and part of preparation for the 201 ...

  • 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