The grid for each course looks like this (excluding CourseName, State, County,
Street, City, State)
Hole1 | Hole2 | Hole 3 | ......... | Hole18
Par 9 4 7 .......... 6
WH 8 4 4 .......... 5
MH 5 4 4 .......... 5
Tees1 4 4 3 .......... 5
Tees2 3 3 2 .......... 5
For every course, I have to enter in all of these variables. It isn't really
keeping score, it's just a table of all the information for a given course -
par, wh (women's handicap), mh, etc. What i did was pretty much make a table
for every row. Each table (par, for example) has a course_id that I set in the
courses table (that holds the CourseName, State, County, Street, City, State),
and then 18 more fields - one for each hole. So it looks like:
course_id | Hole1 | Hole2 | Hole 3 | ......... | Hole18
165 4 4 5 .......... 3
Is that alright? it was the most reasonable thing I could think of, but i'm
not too experienced in database design, so i figured i'd ask.
Stas Trefilov wrote:
> Doug Parker wrote:
> > I'm about to embark on a project where I have to enter many, many fields
> > into a MySQL database, and I don't know how to approach the database
> > structure. The data is statistics for a golf course. There are 18
> > holes, and each hole has a Red Tee Par, White Tee Par, and Blue Tee Par,
> > which is 54 inputs already (18 x 3). Then, there are about 5 more
> > statistics I have to keep for each hole, making the total amount of
> > inputs 144 (18 x 8). There's about 7 more fields pertaining to the
> > Course name, location, etc. How the heck do I approach this? I've
> > successfully done relational databases before, but not to this scale.
> > Does anyone have any suggestions as to how I should approach this?
> > I attached a .jpg of the form I'm using to input, just to clarify things.
> > Any suggestions would be greatly appreciated...
> table could look like this:
> hole_no, rtp, wtp, btp, stat1, stat2, stat3, stat4, stat5
> ------- --- --- --- ----- ----- ----- ----- -----
> what is Course name, location, etc?
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php