design question

design question

am 02.05.2011 18:54:20 von Shawn Wilson

i'm just looking for rough ideas here...

i've got a table that has 31 fields. most of them need to be there
(entry time, exit time, entry lat, etc). however, i've got 4 fields
that i query this db with that should generally be unique... well,
really 3 fields that should be unique, because the 'name' field is
what it sounds like - a spoken word - and two things can have the same
name.

so, i've got three other fields, two 'unsigned big int's and one
varchar(10) that's a callsign. all of these three fields should agree
with each other across entries.... this isn't always the case. there
are data abnormalities.

so, i'm curious of the best way to store and look this data up. my
first thought was just to have 4 separate tables with two fields - the
value and the unique id. however, sense i generally query these things
together, i thought that maybe they should all go into one separate
table with a uid that would differ for bad data types - those could
easily be found and dealt with.

my other thought was to have the separate tables and index the uid's
in the main table together?


i've got scripts that import this data. so, though i've got this data
in a db, i'm just going to rewrite my import script to use the new
schema. so, think of this as a new db with no data issues.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org