Postgres No Primary Key Drawback
PostgresqlPostgresql Problem Overview
Is there any drawback to not having a primary key for a table in Postgres? Since all data is stored unordered in the heap anyway, is the primary key just a way to enforce a unique key and an index at the same time? Or is there a fundamental feature that a primary key provides in a table as opposed to a table that does not have a primary key?
Postgresql Solutions
Solution 1 - Postgresql
Per the Postgres documentation (http://www.postgresql.org/docs/9.2/static/sql-createtable.html):
> Technically, PRIMARY KEY is merely a combination of UNIQUE and NOT > NULL, but identifying a set of columns as primary key also provides > metadata about the design of the schema, as a primary key implies that > other tables can rely on this set of columns as a unique identifier > for rows.
From my experience, I have created plenty of tables without them. But some replication solutions require there be a primary key, or at the single column identifier per row.