Lottery number-tracking table structure (1 Viewer)

mergle

Registered User.
Local time
Today, 11:07
Joined
Jan 31, 2003
Messages
54
I am need of tracking previously drawn lottery numbers. Would it be best to have the drawn numbers be entered as separate fields in a given record (i.e., Ball1, Ball2...Ball5), or to create a one-to-many join table between a tblBall.BallID and a tblDrawings.DrawID?

I am vacillating back and forth, as I think I see advantages and disadvantages in both structures...so I am looking for more knowledgeable experience to set me on the right path.
 

bob fitz

AWF VIP
Local time
Today, 16:07
Joined
May 23, 2011
Messages
4,727
IMHO it would be best to create a one-to-many join table between a tblDraws and a tblBallsDrawn. The PK of tblDraws would be the FK of tblBallDrawn.
 
Local time
Today, 08:07
Joined
Feb 25, 2008
Messages
410
I'm a little late to the party but I would definitely agree with bob here.
Since the order of the balls drawn during a draw is not important, there's no need to separate a set of balls into their respective columns.

Unless you wanted to store other information about each drawing you could even get away with a single table with two columns (drawDate datetime, ballNumber int).
 

Users who are viewing this thread

Top Bottom