Planning Tables

The most efficient way to create a table is to define everything you need in the table at once, including its data restrictions and additional components. However, you could also create a basic table, add some data to it, and then work with it for a while. This approach gives you a chance to see what types of transactions are most common and what types of data are frequently entered ¾ before you commit to a firm design by adding constraints, indexes, defaults, rules, and other objects.

It is a good idea to outline your plans on paper before actually creating a table and its objects.

    To plan a table
  1. Decide what type of data the table will contain.
  2. Decide what columns you need in the table and the datatype (and length, if required) for each column.
  3. Decide which columns should accept null values.
  4. Decide whether to use constraints and/or defaults and rules and, if so, where.
  5. Decide what types of indexes you need, where you need the indexes, and which columns should be the primary and foreign keys.