Defining tables in a Microsoft Office Access 2007 desktop database (.accdb file) is incredibly easy. This chapter shows you how it’s done. You’ll learn how to
Create a new database application using a database template
Create a new empty database for your own custom application
Create a simple table by entering data directly in the table
Get a jump start on defining custom tables by using table templates
Define your own tables from scratch by using Design view
Select the best data type for each field
Define the primary key for your table
Set validation rules for your fields and tables
Tell Access 2007 what relationships to maintain between your tables
Optimize data retrieval by adding indexes
Set options that affect how you work in Design view
Print a table definition
All the screen images in this chapter were taken on a Microsoft Windows Vista system using the Blue color scheme.
|Inside Out-Take Time to Learn About Table Design|| |
You could begin building a database in Access 2007 much as you might begin creating a simple single-sheet solution in a spreadsheet application such as Microsoft Excel-by simply organizing your data into rows and columns and then inserting formulas where you need calculations. If you’ve ever worked extensively with a database or a spreadsheet application, you already know that this unplanned approach works in only the most trivial situations. Solving real problems takes some planning; otherwise, you end up building your application over and over again. One of the beauties of a relational database system such as Access is that it’s much easier to make midcourse corrections. However, it’s well worth spending time up front designing the tasks you want to perform, the data structures you need to support those tasks, and the flow of tasks within your database application.
To teach you all you might need to know about table design would require another entire book. The good news is Access 2007 provides many examples for good table design in the templates available with the product and online. If you want to learn at least the fundamentals of table and application design, be sure to read Article 1, “Designing Your Database Application,” that you can find on the companion CD.