Chapter 8. keys and Data Relationships: Thoughtful Table Design
Calling all architects and designers. You’ve been constructing tables without giving them much thought. And that’s fine, they work. You can do all the CRUD operations on them and write SELECT statements that are as elaborate as necessary. But as you get more data, you’ll start seeing things you wish you’d done to make your WHERE clauses simpler. Or perhaps your single table just isn’t big enough anymore, and you need to renovate your floor plans a bit. As your data becomes more complex, the KEY is to make your tables atomic and divide your data into multiple related tables. Who knows? Maybe your optimal blueprints result in plans for an entire skyscraper. Read on to find out.
Do you know the state of San Jose?
Mistakes happen, but luckily, Abby learned about UPDATE in Chapter 5. She can use it to add “CA” as San Jose’s state value:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access