Question: 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)

 CSE4126: Distributed Database Systems Lab Online 1: Section C2 Marks-10 A

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!