Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Step 1: You are required to create the following tables in your database (A basic library database): Copy and paste the schema for the tables

Step 1: You are required to create the following tables in your database (A basic library database):

Copy and paste the schema for the tables created

Book(BookId, BookName, Edition)

Member (MemberId, MemberFname, MemberLnameRR, City, Street)

Fines (BookId, MemberId, UnpadFines)

Loan (MemberId, BookId, DateOut, DateReturned)

After the tables are created, please fix the following:

(The SQL statements used should be included in the document) MemberLnameRR should be changed to MemberLname in the Member table. DateDue need to be added between DateOut and DateReturned in the Loan table.

Step 2: Enter some sample data in the database that you created.

You must have at least 10 entries for each table.

Please also ensure that you will get results from the queries in steps 3-10 .

The result of the queries and the SQL statements should be placed in the document to be submitted.

Step 3: Write a query for each table to report all the information in the respective table.

Step 4: Write a query to change the name of a member with a particular MemberId.

Step 5: List all the members (MemberFname, MemberLname) that have unpaid fines.

Step 6: Increase all fines by 5%.

Step 7: List all members who have books with due dates between March 1, 2019 and April 10, 2019.

Step 8: Create a view that shows the members that live in Manchester City.

Step 9: Find the average fines by MemberIds. Step 10: Delete a member with a particular MemberId from your database.

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

More Books

Students also viewed these Databases questions