Answered step by step
Verified Expert Solution
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)
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started