Professional Documents
Culture Documents
CSCU9B3 Relational Database Assignment 2022
CSCU9B3 Relational Database Assignment 2022
A database type known as a relational database organizes and stores connected data items.
Data is arranged into connected tables depending on common data. They are the most typical
database type utilized by companies today. With a database like this, you may do a single query
that searches over one or maybe more tables.
Diagram
Player
Skills
ID(PK) ID(PK)
DOB
Skills(FK)
Team(FK)
Status
Team
Game
Name(PK)
Venue Room(PK)
Team
Name(FK)
Postcode
Venue
Date
Points
Explanation
Player has a unique ID attribute, so we set it as the primary key and we set team name as foreign key to
connect the player and team tables. As skill is a multivalued attribute it gets its own table which will
have the player ID as primary and foreign key and the skill as a primary key. ID is a foreign key to
connect the players and the skill tables.
Team will have the team name as a primary key because no two teams will have the same name. And
finally we set venues room as the primary key for the game table. We also set player ID as a foreign key
to connect the player and Game table.
Entity relationship diagrams offer a visual starting point for database architecture and may also
be used to assist identify the needs of an organization's information systems.
Explanation
The relationship between player and team is a one to many as one team can have zero or many players.
The relationship between player and skill is one to many as one player can have one or many skills. The
relationship between player and game is one to many as one player can be in one or many games.
Database
SQL queries
(i) SELECT *
FROM data
WHERE DateofBirth>('1990-1-1');
from data;
FROM Data