3.2: Challenge 2

Now, write a query that generates 3 tables (Library, Member, and Book) with these specifications:

  • The Library table should include the following properties: LibraryId and LocationName.

  • The Member table should include the following properties: MemberId, FirstName, and LastName.

  • The Book table should include the following properties: BookId, Title, Author, CheckOutDate, and DueDate.

You will also need to link the tables with foreign keys to demonstrate these relationships:

  • A member can have many books; a book can have 0 or 1 members.

  • A library can have many books; a book can have only 1 library.

  • A library can have many members; a member can have only 1 library.

For extra practice, map out the table entities using UML notation.

Click here to see the solution for this challenge. Then, continue to Part 3.3 for the next challenge.

Last updated