Tables and Data
This chapter covers a range of general recipes for your tables and for working with the data they contain. Many of the recipes contain general advice, with specific PostgreSQL examples.
Some system administrators that we’ve met work only on the external aspects of a database server. They see the data that is actually in the database, its meaning and quality, as someone else’s problem.
Look after your data, and your database will look after you. Keep your data clean, and your queries will run faster and cause fewer application errors. You’ll also gain many friends in the business. Getting called in the middle of the night to fix data problems just isn’t cool.
In this chapter, we will cover the following recipes:
- Choosing good names for database objects
- Handling objects with quoted names
- Identifying and removing duplicates
- Preventing duplicate rows
- Finding a unique key for a set of data ...