What is the best way to generate a primary key in the following table structure? Using MySQL 5.6 community.
PosDateTime varchar(24)
Model varchar(5)
Hour Int(11)
Lat double
Lon double
Wind Int(11)
Pres Int(11)
There will be many instances of each of these fields containing the same value throughout the table, but there will not be a record that is exactly identical (at least one field will be different). So if I'm not mistaken, I can't use any of these fields as a Primary Key because of duplicates, right??
This table will have up to about 50,000 records. Currently, before I insert into the table, I check to see if the record already exists, then do the insert if it's not there, it takes a little longer because I do not have a primary key setup. I'll also need to search on the table to get values.
Should I use a composite primary key using all fields?
This table will not relate to other tables in any way. Thanks for your input. Bryan