i am doing a computer project.One part is to propose different functions of a sportsday system, one is to arrange lane for different event. but i don't know how to do it. please help!

Dani AI

Generated

The thread shows the core missing pieces: whether the system must handle heats/finals, how many lanes per track, seeding rules (random, qualifying time, or manual), and team/relay entries. asked for requirements — those answers change the schema and logic. Below is a compact, practical approach that covers most meet types and keeps the database simple to drive the application.

A normalized schema to start with (essential fields only):

CREATE TABLE Event (
  event_id INT PRIMARY KEY,
  name VARCHAR(100) NOT NULL,
  distance INT,
  lane_count INT NOT NULL
);

CREATE TABLE Competitor (
  competitor_id INT PRIMARY KEY,
  first_name VARCHAR(50),
  last_name VARCHAR(50),
  team_id INT
);

CREATE TABLE Entry (
  entry_id INT PRIMARY KEY,
  event_id INT NOT NULL,
  competitor_id INT NOT NULL,
  seed_time DECIMAL(7,2),
  FOREIGN KEY (event_id) REFERENCES Event(event_id),
  FOREIGN KEY (competitor_id) REFERENCES Competitor(competitor_id)
);

CREATE TABLE Heat (
  heat_id INT PRIMARY KEY,
  event_id INT NOT NULL,
  round VARCHAR(20),
  heat_number INT,
  FOREIGN KEY (event_id) REFERENCES Event(event_id)
);

CREATE TABLE LaneAssignment (
  lane_assignment_id INT PRIMARY KEY,
  heat_id INT NOT NULL,
  lane_number INT NOT NULL,
  entry_id INT NOT NULL,
  UNIQUE (heat_id, lane_number),
  UNIQUE (heat_id, entry_id),
  FOREIGN KEY (heat_id) REFERENCES Heat(heat_id),
  FOREIGN KEY (entry_id) REFERENCES Entry(entry_id)
);

CREATE TABLE Result (
  result_id INT PRIMARY KEY,
  lane_assignment_id INT NOT NULL,
  time DECIMAL(7,2),
  position INT,
  FOREIGN KEY (lane_assignment_id) REFERENCES LaneAssignment(lane_assignment_id)
);

Seeding and lane-placement notes (common competition practice):

  • Preferred lanes for 8-lane tracks: [4,5,3,6,2,7,1,8]. For 6-lane: [3,4,2,5,1,6]. Fastest seed to the first item (center) then outward.
  • For multiple heats use serpentine distribution so top seeds are balanced across heats.
  • Simple pseudocode for single-round seeding into heats follows:
sorted = sort(entries by seed_time asc)
for i = 0 to sorted.length-1:
  heat = floor(i / lane_count)
  pos = i % lane_count
  lane = lane_order[pos]
  assign(sorted[i], heat, lane)

Implementation and operational tips:

  • Enforce UNIQUE(heat_id,lane_number) and UNIQUE(heat_id,entry_id) to avoid double-assignments.
  • Enforce lane_count checks in the app or with triggers; CHECK across tables is DBMS-dependent.
  • Support manual override, scratch/late changes, and an audit trail (who changed assignment and when).
  • Provide printable start lists and a simple UI to regenerate heats after scratches.
  • Verify local meet rules (age groups, lane preferences, tie-breaks) before finalizing seeding logic.

This gives a solid DB backbone plus clear seeding patterns to drive the application layer for lane arrangement.

Recommended Answers

All 4 Replies

Nothing is clear from your post . what do you want application design or database design ?

mainly i need a database design.......if can, tell me about the application design....

you need to say what exactly is your requirement.

actually...i need to design a sportsday system...so i need to have a function of lane arrangement of competitors of different events.....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.