Data Flow Diagram Analysis: ERD, Keys, Relationships, and Sample Data

Verified

Added on  2021/09/13

|4
|651
|199
Homework Assignment
AI Summary
This document presents a comprehensive analysis of a data flow diagram, focusing on the attributes and relationships within a dataset related to riders, teams, races, and laps. It begins by identifying the candidate keys for each entity: Team, Rider, Race, and Lap. The document then proceeds to determine the primary keys for each entity, explaining the rationale behind the selection. Following this, it defines the primary and foreign keys, illustrating how the tables are interconnected through relationships. The relationships between the entities are clearly outlined, detailing how each race involves multiple teams, each team belongs to one race, each team has many riders, each rider belongs to one team, each rider rides many laps, and each lap is taken by one rider. Finally, the document provides sample data for each entity, offering a practical illustration of the data structure and its application. This includes team information (teamID, name, category, lapCount, etc.), rider information (riderID, name, age, phoneNumber, teamID), and lap information (lapID, riderID, time, speed).
Document Page
1. Data Flow Diagram
2. Attributes and relationships
rider
o riderID
o name
o age
o phoneNumber
Team
o teamID
o name
o category
o lapCount
o totalTime
o categoryPosition
o overallPosition
race
o lapDistance
o startTime
laps
o lapID
o time
o speed
3. Entity relationship diagram
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
4. Candidate keys- The candidate keys are shown in bold.
Team (teamID, name, category, lapCount, totalTIme, categoryPosition, overallPosition)
Candidate key (teamID)
Rider (riderID, name, age, phoneNumber)
Candidate key (riderID)
Race (lapDistance, startTime)
Candidate key (lapDistance, startTime)
lap (lapID, time, speed)
Candidate key (lapID, time, speed)
5. Primary keys
Team (teamID, name, category, lapCount, totalTIme, categoryPosition, overallPosition)
Primary key (teamID) – This is the best attribute to be the primary key because every team has a
unique teamID.
Rider (riderID, name, age, phoneNumber)
Primary key (riderID)- This is the best attribute for the primary key because every rider has a
unique riderID.
Race (raceID, lapDistance, startTime)
Primary key (raceID)- Every race has should have a unique raceID thus this should qualify to be
the primary key.
lap (lapID, riderID, time, speed)
Primary key (lapID,riderID)- Every lap has a unique lapID thus this qualifies to be the primary key
6. Primary keys and foreign keys
Race (raceID, lapDistance, startTime)
Primary key (raceID)- Every race has should have a unique raceID thus this should qualify to be
the primary key.
Team (teamID, name, category, lapCount, totalTIme, categoryPosition, overallPosition,raceID)
Primary key (teamID) – This is the best attribute to be the primary key because every team has a
unique teamID.
Foreign key (raceID) references race (raceID)
Rider (riderID, name, age, phoneNumber,teamID)
Primary key (riderID)- This is the best attribute for the primary key because every rider has a
unique riderID.
Foreign key (teamID) references team (teamID)
lap (lapID, riderID, time, speed)
Document Page
Primary key (lapID,riderID)- Composite key lapID, riderID is unique for every record thus
qualifies to be the primary key.
Foreign key (riderID) references rider (riderID)
7. Relationships
Each race must have many teams.
Each team must belong to one race
Each team must have many riders.
Each rider must belong to one team
Each rider must ride many laps
Each lap is taken by one rider.
8. Sample data
teamID name category lapCount totalTime categoryPosition overallPosition raceID
2030 JESUSMTBNB TEAM OF
SIX_MALE
20 24:02:48 5 175 1
227 CRANKENSTEINS
MAD BUNCH
TEAM OF
SIX-MALE
20 25:02:44 6 227 1
RiderID name age phoneNumber teamID
1 Ben Edols 35 2030
2 James Geluk 31 2030
3 Rod Post 32 2030
4 Stuart Holman 41 2030
5 Jarold Post 37 2030
6 James Holman 31 2030
7 Liam Ingham 17 2230
8 Noah Hannia 18 2230
9 Jack De Putt 16 2230
10 Dean Ingham 45 2230
11 Jonathan Hannia 42 2230
12 Tom Adams 17 2230
lapID riderID time speed
1 1 1:13:33 15.6
2 2 1:18:10 14.6
3 3 1:02:38 18.4
4 3 1:04:42 17.8
5 5 1:19:16 14.4
6 6 1:07:17 16.5
7 1 0:59:17 19.3
8 3 1:24:50 13.6
Document Page
9 3 1:07:41 17.0
10 4 1:07:24 17.0
11 5 1:36:47 11.9
12 6 1:07:01 17.0
13 1 1:02:18 18.4
14 2 1:27:21 13.1
15 3 1:11:50 16.1
16 4 1:08:14 16.8
17 6 1:13:56 15.6
18 1 1:01:16 18.7
19 3 1:09:18 16.5
20 2 1:19:59 14.4
chevron_up_icon
1 out of 4
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]