Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create view bibl_fond as select b_name, a_name, g_name from books join m2m_book_authors on books.b_id = m2m_book_authors.b_id join authors on m2m_book_authors.a_id = authors.a_id join m2m_book_genres on books.b_id = m2m_book_genres.b_id join genres on m2m_book_genres.g_id = genres.g_id;
- use Libary_karagishiev_4216;
- create view reader_books as select s_id, s_name , b_name, sb_start, sb_finish from
- subscriptions join subscribers on subscriptions.sb_subscriber = subscribers.s_id
- join books on books.b_id = subscriptions.sb_book;
- use Libary_karagishiev_4216;
- create view genres_authors as select distinct a_name, g_name from authors
- join m2m_book_authors on authors.a_id = m2m_book_authors.a_id
- join books on books.b_id = m2m_book_authors.b_id
- join m2m_book_genres on books.b_id = m2m_book_genres.b_id
- join genres on genres.g_id = m2m_book_genres.g_id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement