r/DatabaseHelp • • Apr 10 '17

MySQL Primary Keys?

Should Primary Keys always be ID #s? For example, if I have:

 

CREATE TABLE Concerts
Name VARCHAR(30)
Band VARCHAR(30)
Venue VARCHAR(30)
Cost DECIMAL(10,2)?
DateTime DATETIME
PRIMARY KEY(Band, Date)

 

Is Band and Date preferable or should I instead add a column like ConcertID and use that as the Primary Key?

1 Upvotes

8 comments sorted by