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 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 sitting in his new cubicle and gets an IM from Greg:
Can you write the queries to insert this new person into the database?
As he’s entering the data, Jim realizes that he doesn’t know ...