Q
Problem solve Get help with specific problems with your technologies, process and projects.

Datatype of ID field for very large database

While designing a database for a very large organization, where the data can reach terabytes and where records need to be kept for years in the database, what type of ID field should be used?

While designing a database for a very large organization, where the data can reach terabytes and where records need to be kept for years in the database, what type of ID field should be used?

I mean, say a table has a field called "TransactionID" which is of type LONG INTEGER. If this is a primary key, or is included in a composite key, to uniquely identify records, how long can it reach? In this situation, when records are not deleted but remain in the database for years, for further reference, in this case what should be the datatype of the "TransactionID" field?

If you have a natural key, use it. For instance, a natural key might be a social security number, an invoice number or an employee number. The natural key is composed of attributes you are storing for the entity. If you do not have a natural key, then you may consider using a synthetic key. A synthetic key is a value which is arbitrarily assigned to a row in the table. In Oracle, we use the SEQUENCE object to generate unique values for a synthetic key.

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close