CREATE TABLE courses (course_id INTEGER PRIMARY KEY ASC, name varchar(256), location varchar(256), notes varchar(4096), map_image varchar(256));
TABLE: Courses
course_id
name
location
notes
map_image

CREATE TABLE holes (hole_id INTEGER PRIMARY KEY ASC, course_id INTEGER, par INTEGER, length varchar(256), position varchar(256));
TABLE: Holes
hole_id
course_id (relation)
par
length
position

CREATE TABLE rounds (round_id INTEGER PRIMARY KEY ASC, course_id INTEGER, start_time varchar(256), end_time varchar(256));
TABLE: Rounds
round_id
course_id (relation)
start_time
end_time

CREATE TABLE scores (score_id INTEGER PRIMARY KEY ASC, round_id INTEGER, hole_id INTEGER, score INTEGER);
TABLE: Scores
score_id
round_id (relation)
hole_id (relation)
score


Round table view select statement

SELECT rounds.round_id, rounds.course_id, courses.name, rounds.start_time FROM courses, rounds WHERE courses.course_id=rounds.course_id;

