Question: Kindly assist with this assignment: INTRODUCTION / OVERVIEW - STRUCTURED QUERY LANGUAGE ( SQL ) SQL is a standard programming language used for managing and
Kindly assist with this assignment:
INTRODUCTIONOVERVIEW STRUCTURED QUERY LANGUAGE SQL
SQL is a standard programming language used for managing and manipulating relational databases. It allows users to query, insert, update, and delete data within a database.
INSTRUCTIONS
Provide the SQL code for the questions below This should be done using MySQLOneUnit Numbers Structured Query Language
Assignment Title Structured Query Language Academic Year
Compiler. Show the results for each question
SCENARIOSQUESTIONS
Given the LIBRARY relational database schema shown below, which is usedtokeeptrackof books, borrowers, and book loans. Referential integrity constraints are shownasdirected arcs in the diagram. Provide the SQL code for the questions belowThis shouldbedone using MySQL One Compiler. Show the results for each question
BOOK
BookId Title PublisherName
C How to Program Prentice Hall
C How to Program Prentice Hall
The Complete C Training Course Prentice Hall PTG
Internet and World Wide Web How to Program Prentice Hall
Computer Networking Prentice Hall
The Complete Java Training Course Prentice Hall PTG
Software Engineering Addison Wesley
Using Z Prentice Hall
BOOKAUTHORS
BookId AuthorName
Paul Deitel
Harvey Deitel
Deitel & Deitel
Carey Hamil
Rowe Schuch
Deitel & Deitel
Sommerville
Wood cock Davis
PUBLISHER
PublisherName Address Phone
Prentice Hall Carolina Street California USA
Prentice Hall
PTG Hendricks Street Florida USA
Addison Wesley Caper Street Los Angeles USA
BOOKCOPIES
BookId BranchId NoOfCopies
BOOKLOANS
BookId BranchId CardNo DateOut DueDate
LIBRARYBRANCH
BranchId BranchName Address
Tom Redcam Kingston
National Library of Jamaica Clarendon
Si Catherine Parish Library St Catherine
BORROWER
CardNo Name Address Phone
Adrian Hendrikson Cauper Drive Kingston
Jack Daniels Harbour View Drive Kingston
Jim Sandricks Hagley Park Road Kingston
Carol Drakes Clarendon Park Road Clarendon
Jeliza Phillips Maud Road, Clarendon
Carey Satchell Melbourne Road, St Catherine
Geraldine Hakes Spanish Town Road, St Catherine
Yetzi Cornwall Harper Road, Clarendon
Kaye Francis Lepert Avenue
For each of the following provide the SQL code This should be done using MYSQL One Compiler display theresultsfor each question below.
Create each table clearly identifying the primary key and the Foreign Keys. NB A table can have more than one foreign keys.
Populate each table with the data given. Show the script used to populate the tables
How many copies of the book titled C How to program are owned by the Library branch whose nameisTomRedcam.
Retrieve the names of all borrowers who do not have any books checked out.
For each library branch, retrieve the branch name and the total number of books loaned out from that branch.
Delete the Borrower tuple where the name is Kaye Francis.
Modify the Telephone attribute of the Publisher table from to
Retrieve all Borrowers whose card numbers begins with
Find the names of each borrower who borrowed books from to
Add an attribute to the Borrower table for keeping track of the number of borrowers
Find the total number of books on loan.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
