Bird
0
0

You are designing a database for a library. You want to track books, authors, and the categories each book belongs to. Which design best follows database design best practices?

hard📝 schema Q15 of 15
SQL - Database Design and Normalization
You are designing a database for a library. You want to track books, authors, and the categories each book belongs to. Which design best follows database design best practices?
ASeparate tables for books, authors, and categories with primary keys and foreign keys linking them
BSeparate tables for books and categories only, storing author names as text in books
COne table for books and authors combined, and a separate table for categories
DOne table with columns: book_id, book_title, author_name, category_name
Step-by-Step Solution
Solution:
  1. Step 1: Analyze normalization and relationships

    Best practice is to separate entities into tables and link them with keys to avoid duplication.
  2. Step 2: Evaluate each option's design

    Separate tables for books, authors, and categories with primary keys and foreign keys linking them uses separate tables with keys, which supports clear organization and data consistency.
  3. Final Answer:

    Separate tables for books, authors, and categories with primary keys and foreign keys linking them -> Option A
  4. Quick Check:

    Separate tables + keys = best design [OK]
Quick Trick: Use separate tables and keys for related data [OK]
Common Mistakes:
  • Putting all data in one table causing duplicates
  • Mixing unrelated data in same table
  • Storing related entity names as plain text

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes