Primary Key...Is One Required?
Posted in 1999
I have a question regarding primary keys for tables. Is it necessary to
have a primary key for a table? According to Informix Documentation,
if a primary key does not exist for a table, a primary key is composed
of all columns taken together. Does this mean that Informix
automatically generates a primary key? I do a database dump (dbschema)
and do not see a primary key listed for my table. Also, I recently
attended an Informix Class where the instructor said that Informix does
not automatically generate a primary key. I'm now wondering whether
or not I should create a serial record_num primary key for this table
because if one is automatically generated out of every column (I have a
large number of columns) and because primary keys are automatically
indexed, this will be a very large/inefficient index.
Thanks,
Bonnie Annelin