Rik
Rik

Reputation: 59

Difference between Object Identifier(OID) and Primary Key in terms of Object Oriented Design?

Well I know what OID is and means but is it same as Primary Key?In that case, how is it same and what are the differences between the two (if any)?

Upvotes: 1

Views: 2868

Answers (1)

Dzung Nguyen
Dzung Nguyen

Reputation: 71

Not all databases have Object Identifiers (OIDs). If you use PostgreSQL, it is an internal identifier used by PostgreSQL to identify system tables. You do not add OIDs to your user-created tables. The primary key is defined when you create your tables. But of course, you still can use OIDs (if so desired) by specifying WITH OIDS when you create your table. Attached is a link to the PostgreSQL documentation for you to review. https://www.postgresql.org/docs/8.1/static/datatype-oid.html

Upvotes: 2

Related Questions