Thanks again,
Doug
David Eisenhart wrote:
I would go along the lines that Stas suggests. You appear to have a two table database here: Table1: tblHole hole_id, hole_no, course_id, par, WH, MH, Trees1, Trees2, Trees3 etc... ------- -------- ---------- ---- ---- ---- ----- ------- ----- 1 1 1 2 2 1 3 3 1 ... .. 18 18 1 19 1 2 20 2 2 21 3 2 (Note the course_id field above acting as the foreign key to the table tblCourse) (You could make the hole_no, course_id pair of fields a unique index - afterall there should never be more than one entry for each hole_no, course_id pair) Table2: tblCourse: Course_id Course_Name State County ---------- -------------- ----- ------- 1 xyz 2 abc ... ... 10 yyy (The use of course_id in your description below is good (you are thinking along the correct lines by introducing the foreign key field that references the course table) However, if I understand it correctly you are proposing to have a separate table for each hole attribute (1 table for par, 1 table for WH etc.. etc..) which is messy and unnecessary.) Good luck David Eisenhart "Doug Parker" <drparker@clam.rutgers.edu> wrote in message 3DFDE875.E63CA03@clam.rutgers.edu">news:3DFDE875.E63CA03@clam.rutgers.edu...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 Tees3 etc... Tees4 Tees5 For every course, I have to enter in all of these variables. It isn'treallykeeping score, it's just a table of all the information for a givencourse -par, wh (women's handicap), mh, etc. What i did was pretty much make atablefor every row. Each table (par, for example) has a course_id that I setin thecourses table (that holds the CourseName, State, County, Street, City,State),and then 18 more fields - one for each hole. So it looks like: "par" table course_id | Hole1 | Hole2 | Hole 3 | ......... | Hole18 165 4 4 5 ..........3Is that alright? it was the most reasonable thing I could think of, buti'mnot too experienced in database design, so i figured i'd ask. Thanks, Doug
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php