Consider the following database schema. It represents a database used to manage library books. Library Authors...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following database schema. It represents a database used to manage library books. Library Authors NoBiblio: Integer (PK) LibraryName: Text Copies CopyNo: Integer(PK) NoBiblio:Integer(FK) NoLive:Integer(FK) Borrowing NoCopy :Integer(PK,FK) NoUser:Integer(PK,FK) NoAuthor: Integer (PK) AuthorName: Text Books BookNo;Integer Title:Text AuthorNo:Integer(FK) Users NoUser:Integer(PK) UserNo:Text You have to write different queries to evaluate your understanding of this scheme. 1) Write the 6 queries to create the different tables. 2) Write 6 data insertion queries, one for each table in the database. You can choose your ID numbers but the 6 queries must be consistent 3) Display the list of books (title) and the name of the associated author. 4) Display the title of the books of which there is at least one copy at UQAM (NoBiblio). 5) Display the names of users who have a current loan or who have already borrowed. 6) There would have been an error in the numbering of copies of books in UQAM libraries. Copies of books by the author "John Smith" were numbered between 1000 and 2000 when they should have been numbered between 5000 and 6000. You need to write a query that will update the copy numbers involved. Consider the following database schema. It represents a database used to manage library books. Library Authors NoBiblio: Integer (PK) LibraryName: Text Copies CopyNo: Integer(PK) NoBiblio:Integer(FK) NoLive:Integer(FK) Borrowing NoCopy :Integer(PK,FK) NoUser:Integer(PK,FK) NoAuthor: Integer (PK) AuthorName: Text Books BookNo;Integer Title:Text AuthorNo:Integer(FK) Users NoUser:Integer(PK) UserNo:Text You have to write different queries to evaluate your understanding of this scheme. 1) Write the 6 queries to create the different tables. 2) Write 6 data insertion queries, one for each table in the database. You can choose your ID numbers but the 6 queries must be consistent 3) Display the list of books (title) and the name of the associated author. 4) Display the title of the books of which there is at least one copy at UQAM (NoBiblio). 5) Display the names of users who have a current loan or who have already borrowed. 6) There would have been an error in the numbering of copies of books in UQAM libraries. Copies of books by the author "John Smith" were numbered between 1000 and 2000 when they should have been numbered between 5000 and 6000. You need to write a query that will update the copy numbers involved.
Expert Answer:
Related Book For
Fundamentals of Database Systems
ISBN: 978-0136086208
6th edition
Authors: Ramez Elmasri, Shamkant Navathe
Posted Date:
Students also viewed these databases questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
A five-year follow-up study was carried out in a certain metropolitan area to assess the relationship of diet and weight to the incidence of stomach cancer. Data were obtained on n = 2,000 subjects....
-
client with celiac disease asks for a nutrition plan, what should the trainer recommend? Refer to a dietician 3-day food log to prescribe meal plan A templated meal plan Give a breakdown of...
-
At one point, Time Warner and the Walt Disney Company discussed merging their news operations. Time Warner owns Cable News Network (CNN), and Disney owns ABC News. After analyzing the situation, the...
-
Does each of the configurations in Figure Q 41.6 represent a possible electron configuration of an element? If so, (i) identify the element and (ii) determine whether this is the ground state or an...
-
Does Fairmont have any personnel whose last name is similar?
-
Ron Garcia felt good about his first week as a management trainee at Mexicana Wire Winding, Inc. He had not yet developed any technical knowledge about the manufacturing process, but he had toured...
-
2. Please using k-means clustering method to cluster these data points in to 2 clusters. Please provide step by step operations. (10 points) Sample: Feature 1 Feature Step1: 1 1234567 2.5 1.5 2 2.0...
-
Jason Lang operates Jasons Cleaning Service. As the bookkeeper, you have been requested to journalize the following transactions: 2022 Oct. 1 Paid rent for two months in advance, $9,000. 6 Purchased...
-
The equilibrium in a competitive market, where all firms are price takers, requires P = MC. Is it possible for all firms to have the same marginal cost? What happens if MCs are different? Is a...
-
I need some with this practice case, please. I rate The following is a waiting queue simulation model oriented towards service stations. The administration of a service station near a highway wants...
-
Our financial institution has been a leader in providing financial products and services to Canadians for over 100 years. As part of our commitment to meet the evolving needs of our customers, we are...
-
Discuss briefly the three inherent powers of the state, and for each power, give an example on how the state exercises them.
-
Your client traditionally provided free doughnuts and coffee to its employees every Friday morning to help boost morale. Under prior law, the cost of this event was 100 percent tax-deductible as a de...
-
If the price of sunscreen rises, with all other influences on buying plans remaining the same, does the demand for sunscreen change or does the quantity of sunscreen demanded change? A. The quantity...
-
Black Swan Development Co Ltd (Swanco) is a Fiji company. Shares of Swanco are largely owned by Chinese investors. Swanco is a subsidiary of Evergreen Limited a large China company. Both Swanco and...
-
Presented below are income statements prepared on a LIFO and FIFO basis for Kenseth Company, which started operations on January 1, 2024. The company presently uses the LIFO method of pricing its...
-
Cardinality ratios often dictate the detailed design of a database. The cardinality ratio depends on the real-world meaning of the entity types involved and is defined by the specific application....
-
Consider the ER diagram shown in Figure 7.21 for part of a BANK database. Each bank can have multiple branches, and each branch can have multiple accounts and loans. (a) List the strong (nonweak)...
-
Change transaction T 2 in Figure 21.2b to read: read_item(X); X:= X+M; if X > 90 then exit else write_item(X); Discuss the final result of the different schedules in Figure 21.3 (a) and (b), where M...
-
The Pure Food and Drug Act of 1906 is known as Dr. Wileys Law. It is generally regarded by non-economic historians as representing the triumph of consumer interests over producer interests. a. Why...
-
The elasticity of the supply of labor in part determines who bears the burden of Social Security taxes. Those taxes are typically levied in matching 6.2 percent shares on workers wages and wages paid...
-
When the price of ketchup rises by 18 percent, the demand for hot dogs falls by 2 percent. a. Calculate the cross-price elasticity of demand. b. Are the goods complements or substitutes? c. In the...
Study smarter with the SolutionInn App