In relational database design, a primary key can uniquely identify each row in a table. A primary key comprises a single column or a set of columns.
0
votes
1answer
23 views
Candidate key = Key = Minimal Superkey?
I got a little confused by all these keys. As I understand
A key of a relational schema =
The minimal subset of a superkey that is still a key =
A candidate key
Is this correct or not?
0
votes
2answers
48 views
Can a surrogate key and a primary key be in the same table?
For example we have:
Surrogate key: ABC123
Primary key: 1
Name: James
Is this legit in a Data Warehouse table?
0
votes
0answers
39 views
is it good to use combined primary key for MySQL InnoDB clustered index?
I'm trying to build a aggregated reader website of multiple forums.
Because most queries are likely to be within same time periods for written_time column,
I'm thinking about taking advantage of ...
0
votes
0answers
26 views
Postgresql Retrieve / Find Primary Key Serial Autonumber field for Audit logs
I need to find the Primary Key field name in each of a number (approx 70) of tables to create audit logs.
All the primary keys are type serial (auto incrementing integer) and all have the name in the ...
0
votes
0answers
113 views
setting timestamp column as pk to prevent concurrent editing of records?
While I was familiarizing myself with all the new data types in MySQL, I noticed the TIMESTAMP data type, and thought "What if I make this TIMESTAMP field and the CustomerID field (the other pk) a ...
-2
votes
1answer
736 views
What are performance benefits when using number type instead of using char/varchar?
From various posts, I have summarized about using number type instead of char/varchar for PK:
If you choose char/varchar type for PK and your values are short (just some alpha numberic codes) then it ...
