Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSE4126: Distributed Database Systems Lab Online 1: Section C2 Marks-10 A database schema is given as follows: Student(SID: integer, sname: string, phone: string, age: integer)

image text in transcribed

CSE4126: Distributed Database Systems Lab Online 1: Section C2 Marks-10 A database schema is given as follows: Student(SID: integer, sname: string, phone: string, age: integer) Borrows (SID: integer, blD : integer, dateBorrowed: date) Book(blD: integer, alD: integer, title: string, genre: string) Author(ald: integer, aname: string, age: integer) A database file(database.sql) containing some preliminary data has been provided. You have to run the sql file first. Then you have to write a solution in PL/SQL that solves the question given as follows: Question: Show the details of the author who has written at least 3 books. If the age of the author is less than 50 , insert 5 rows into the Borrows table for the student 'Rahmatullah Hafiz' for 5 different books[any 5 books]. If not, insert 2 rows into the Student table. Note: Make sure that the foreign key dependency rules are not violated when working with the Borrows table, also that the serial of the sID column is maintained while inserting new rows CSE4126: Distributed Database Systems Lab Online 1: Section C2 Marks-10 A database schema is given as follows: Student(SID: integer, sname: string, phone: string, age: integer) Borrows (SID: integer, blD : integer, dateBorrowed: date) Book(blD: integer, alD: integer, title: string, genre: string) Author(ald: integer, aname: string, age: integer) A database file(database.sql) containing some preliminary data has been provided. You have to run the sql file first. Then you have to write a solution in PL/SQL that solves the question given as follows: Question: Show the details of the author who has written at least 3 books. If the age of the author is less than 50 , insert 5 rows into the Borrows table for the student 'Rahmatullah Hafiz' for 5 different books[any 5 books]. If not, insert 2 rows into the Student table. Note: Make sure that the foreign key dependency rules are not violated when working with the Borrows table, also that the serial of the sID column is maintained while inserting new rows

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_2

Step: 3

blur-text-image_3

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

Master The Art Of Data Storytelling With Visualizations

Authors: Alexander N Donovan

1st Edition

B0CNMD9QRD, 979-8867864248

More Books

Students also viewed these Databases questions

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago