If this table in your database directly referenced by another table, then no. Without the rest of your structure I'm not entirely sure. So I'll provide a general rule of thumb with an example:
Customer Table:
But you wouldn't Query an individual Address, not without linking it to a person. So you have this second table called Address.
- CustomerId
- Street
- City
- Zip
- State
So this one Customer will always have a tied address, so defining a Foreign Key
is acceptable. Now, if a Customer was allowed have more then one Address then yes, you would need a Primary Key
so the structure stands on its own.
If that particular data is always tied to another table, you can just define a Foreign Key
. Obviously your implementation and access to your database may have an impact. So you'll have to be wary. If your utilizing different technologies such as:
So being aware of implementation and design of both your database and application.
However, without a Primary Key
you'll have to define Indexes
so that you can optimize your database. As the Primary Key
is always Indexed
.
The surrogate key with an index will suffice.
Sorry if I misunderstood your question, but hopefully this points you in the right location.