Book database

Try me

Open In ColabBinder

Problem definition

You need to design a database to represent the information of books and authors. You want to store the title of books has a title, and are identified by a book Id. A book can have different authors. An author entity has a country and a name. Authors are identified by a author Id. An author can have contributed to writing different books.

Solution

The picture below shows the model diagram of a possible solution:

Book shop

Note that there is an M-N relationship between books and authors. To implement this relationship we used the junction table Authorship.

Try it yourself

You can find the database in the following link