Re: No primary keys
Posted in 2001
In article <93fcnm$rga$1@nnrp1.deja.com>, Joe Celko <71062.1056@compuserve.com> wrote: > > >> What does Informix do if there are no primary key or foreign key > attributes defined in the database schema? << > > Go back to basics. The real problem is that you do not have a table at > all -- no key, no table. You have a multi-set. Access to the data > will be horrible unless you add an index. But that is nothing compared Indexes do not speed up access to a table, they speed up random access to the table. Hash joins have been known to be faster than index joins under the certain conditions. > to the potential logical problems you will ave made for yourself. > > These things should be constructed only as "holding tanks" for data, > used to scrub the data, then move it to a "proper table" that you > actually use for the applications. Or maybe referential integrity can be used to help scrub the data until you throw it into a final table with the attributes you like. > > --CELKO-- > Joe Celko, SQL Guru & DBA at Trilogy > When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc) > which can be cut and pasted into Query Analyzer is appreciated. > > Sent via Deja.com > http://www.deja.com/ > I agree that chances are the original poster's motives for having tables without primary key's are not good. Show me how to create a raw table with a primary key and I will be impressed, but wouldn't create them anyway. If you do not require an index, and the input's to your table's are tightly controlled arguments can sometimes be made for not having a primary key. Will Sent via Deja.com http://www.deja.com/