I am creating a very simple database table from data provided to me in exel format, and I will be using 4 columns:
Date/time
IP address
Hostname
Vulnerability identified
I usually get one exel sheet per day, with anything between 1000 – 3000 rows. The Date/time field consists of YYYYMMDDHHMM and can be duplicated a number of times, but should have a unique IP address against each same date/time column, e.g. 2012-08-26:16:01, 80.3.3.255, 2012-08-26:16:01, 192.168.0.1. Having reviewed some similar questions, would it be more efficient to generate a unique primary key per record, or join the date/time and IP column to create the primary key?
This depends on at least two angles:
WHEREcriteria used later for selecting: If you plan to select by timestamp and IP independently, I suggest you create non-unique keys for those and a simple (maybeAUTO_INCREMENT) primary for each row.