When designing tables, you must be familiar with some related
concepts.
Data types and table columns
When you create your table, you must indicate what type
of data each column will store. By thinking carefully about the nature
of the data you are going to be managing, you can set your tables
up in a way that will give you optimal query performance, minimize
physical storage requirements, and provide you with specialized capabilities
for manipulating different kinds of data, such as arithmetic operations
for numeric data, or comparing date or time values to one another.
Generated columns
A generated column is defined in a table where the stored
value is computed using an expression, rather than being specified
through an insert or update operation.
Hidden columns
When a table column is defined with the implicitly hidden
attribute, that column is unavailable unless it is explicitly referenced.
For example, if a SELECT * query is run against a table, implicitly
hidden columns are not returned in the result table. An implicitly
hidden column can always be referenced explicitly wherever a column
name can be specified.
Auto numbering and identifier columns
An identity column provides a way for DB2® to automatically generate a unique numeric
value for each row that is added to the table.
Column data constraints, defaults, and null settings
Data often must adhere to certain restrictions or rules.
Such restrictions might apply to single pieces of information, such
as the format and sequence numbers, or they might apply to several
pieces of information.
Unicode table and data considerations
The Unicode character encoding standard is a fixed-length,
character encoding scheme that includes characters from almost all
of the living languages of the world.