Chapter 11. Constraints, Views, and Transactions: Too many cooks spoil the database
Your database has grown, and other people need to use it. The problem is that some of them wonât be as skilled at SQL as you are. You need ways to keep them from entering the wrong data, techniques for allowing them to only see part of the data, and ways to stop them from stepping on each other when they try entering data at the same time. In this chapter we begin protecting our data from the mistakes of others. Welcome to Defensive Databases, Part 1.
Gregâs hired some help
Greg has hired two people to help him manage his growing business. Jimâs going to handle entering new clients into the database, while Frankâs in charge of matching people up to prospective jobs.
Greg has spent some time explaining his database to them and describing what each table does.
Jimâs first day: Inserting a new client
Jimâs sitting in his new cubicle and gets an IM from Greg:
Brain Power
Can you write the queries to insert this new person into the database?
Jim avoids a NULL
As heâs entering the data, Jim realizes that ...
Get Head First SQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.