Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 Given the following relations of the library system and the database schema with sample data found in the Appendix on page 5 : CLIENT

image text in transcribed

2 Given the following relations of the library system and the database schema with sample data found in the Appendix on page 5 : CLIENT ( ClientNo, ClientName, Address, Phone, Age, Sex ) BOOK ( BookNo, BookName, AuthorName, Publisher) BORROW ( ClientNo, BookNo, StartDate, Period, Fee ) Where the underlined attributes are the primary key attributes. Write SQL statement(s) for each of the following questions: (a) Add a new record to Client table with the following information. [3 marks] (b) Remove the borrowing record of client number 'C003' with book number 'T0212'. [3 marks] (c) Display all the ClientNo, ClientName and their Age in table CLIENT. [2 marks] (d) Display the ClientName and Address for all the clients who live in 'Shatin'. [3 marks] (e) List the ClientName, number of book borrowing of all clients who have borrowed more than one book. [6 marks] (f) Show the BookNo and increase all fee by 10%, display the new fee with a heading New_Fee. [2 marks] (g) List all information about the clients who did not provide their phone number from CLIENT table. [2 marks] (h) List the ClientName, BookName and Fee of all borrowing records made on 30 May 2018. Short the result by ClientName in ascending order. [6 marks] (i) Modify the client record with client number 'C004' who changed his/her phone number to '52665266'. [3 marks]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions

Question

Is conflict always unhealthy? Why or why not? (Objective 4)

Answered: 1 week ago