Question: WRITE IN Mysql yje problem: Databases - nur Homework 2 Group: Name: Consider the following EER diagram: PK le author perre book NTUNSIGNED WROWR258) MARCHAR250)
WRITE IN Mysql yje problem:
Databases - nur Homework 2 Group: Name: Consider the following EER diagram: PK le author perre book NTUNSIGNED WROWR258) MARCHAR250) VARCHAR455) bost publishers PKO INT UNSIGNED Fok INT UNSIONED FK published INTUNCIONED VARCHAR25) pages INTUSIONED date DATE Dilers + PKS TNT UNSIGNED ner WAACHAR enal VARCHAR(255) tehore VARCHAR255 with the following sample data: books id title 1 Poezil 2 The DaVinci Code 3 Inferno author Mihai Eminescu Dan Brown Dan Brown genre poems novel novel publishers id name 1 Editura Nemira 2 Editura Art 3 Editura Paladin email contact@nemira.ro contact@art.ro contact@paladin.ro Telephone 0722123456 0722345678 0723234567 publisher_books id publisher_id 1 1 23 3 3 3 book id 1 2 format paperback paperback hardcover pages 126 540 publishing date 2019-06-16 2016-03-21 2018-04-07 2 565 1. Create a view called book_list which will contain the book title, author and genre, the name and email of the publisher and the format, number of pages and publishing date of each book. The view will have the following header: tiele author genre publisher all format pages publishing date Use the view to display only the books with less than 300 pages published before 2020, ordered by the publishing date in ascending order and by the title in ascending order. (10p) 2. Create a trigger for the INSERT operation on the publisher_books table to check if the number of pages of the new book is at least 20. If not, an error will be raised. Choose the appropriate activation time for the trigger and explain how it works (15p) 3. Create a procedure to publish a book by a published. The procedure will check if the specified book and publisher exist and that the format is either paperback or hardcover, otherwise an error will be raised. Explain how the procedure works (15p)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
