Sunteți pe pagina 1din 5

Information Systems

Homework Questions for Database Systems Higher


This publication may be reproduced in whole or in part for educational purposes provided that no profit is derived from the reproduction and that, if reproduced in part, the source is acknowledged.

First published 1999 Perfect Papers Website: http://www.higher-still.co.uk Email: admin@higher-still.co.uk

Perfect Papers

http://www.higher-still.co.uk

DATABASE SYSTEMS - EXTRA QUESTIONS (1) 1. Explain the meaning of following terms: a) data, b) meta-data, c) database, d) DBMS, e) RDBMS. 2. The NBA (NDHU Basketball Association) is in dire need of a database in order to keep track of the activities in their league. The entities in the database are People (with attributes id, name and age), Teams (with attributes team name and manager), and Courts (with attributes court id, address and capacity). Furthermore, people are specialised into Referees and Players. Referees have the extra attribute level and Players have the extra attribute height. Players play in teams, and teams and referees participate in a game that takes place in a court on a certain date. This league is quite violent and very often players are fouled out by referees. This causes bad relationships between teams and referees and some teams disqualify some referees from refereeing their games. Some way of recording each game is also required. This will need to store the home and away teams scores. No player plays for more than one team. Only one game is played on one court on any one day. a) Produce a set of normalised entities to 1NF. Add attributes as you think they are required. b) Create an ER diagram that models the relationships in the system. (6) (6) (5)

Database Systems (H) - Homework 1

Perfect Papers

http://www.higher-still.co.uk

DATABASE SYSTEMS - EXTRA QUESTIONS (1) - SOLUTIONS 1. Explain the meaning of following terms: a) Data, is the raw material that is processed to produce information. Data is the facts and figures that record, on a day-to-day basis, the performance within an organisation or the activities of an individual. b) meta-data, is data about data such as the data stored in a data dictionary. It can consist of field names, data types and field sizes. c) database, A collection of information organised in such a way that a computer program can quickly select desired pieces of data. You can think of a database as an electronic filing system. d) DBMS, To access information from a database, you need a database management system (DBMS). This is a collection of programs that enables you to enter, organise, and select data in a database. e) RDBMS. Short for relational database management system, a type of database management system (DBMS) that stores data in the form of related tables. Relational databases are powerful because they require few assumptions about how data is related or how it will be extracted from the database. As a result, the same database can be viewed in many different ways. An important feature of relational systems is that a single database can be spread across several tables. This differs from flat-file databases, in which each database is self-contained in a single table.

(5)

2. a) Produce a set of normalised entities to 1NF. Add attributes as you think they are required. People does not exist as an entity and is replaced by the two entities: Referees (Referee Id, Name, Age, Level) Players (Players Id, Name, Age, Height) The referees entity must also record if a referee has been banned by a team. This is done by adding a Team Name attribute to the referees. There will be an entry in the referees entity for every referee and for every team that has banned that referee e.g. Id 12 12 12 15 25 27 Name Simon Jones Simon Jones Simon Jones Paul Welsh Ahmed Azak Jason Wong Age 27 27 27 24 34 22 Level Division 3 Division 3 Division 3 Division 1 Division 2 Division 1 Team Name Tigers Johnston Redhats

(6)

Lions

Database Systems (H) - Homework 1

Perfect Papers

http://www.higher-still.co.uk

Note: From this data Paul Welsh and Ahmed Azak are not banned by any teams. Referees (Referee Id, Name, Age, Level, Team Name) Also the Players entity also requires the team that the player plays for: Players (Player Id, Name, Age, Height, Team Name) We also need some way to record the games. This would be done by creating a new entity called Games as follows: Games ( Game Id, Date, Court Id, Referee Id, Home Team, Home Score, Away Team, Away Score) Now we have the primary entities specified (primary keys are underlined): Teams Courts Referees Players Games ( ( ( ( ( Team Name, Manager) Court Id, Address, Capacity) Referee Id, Name, Age, Level, Team Name*) Player Id, Name, Age, Height, Team Name*) Game Id, Date, Court Id*, Referee Id*, Home Team*, Home Score, Away Team*, Away Score)

There is a repeating group in the referee entity. This should be removed so that the entities are all in first normal form. The attribute Team Name and the primary key of Referee Id are removed to a new entity called Banned Referees. Banned Referees ( Referee Id*, Courts ( Court Id Team Name*) Address, Capacity) Referees ( Referee Id, Name, Teams ( Team Name, Age, Manager) Level) Games ( Game Id, Players ( Player Id, Date, Name, Court Id*, Age, Referee Id* Height, Home Team*, Team Name*) Home Score Away Team*, Away Score)

Database Systems (H) - Homework 1

Perfect Papers

http://www.higher-still.co.uk

b) Create an ER diagram that models the relationships in the system.


play away

(6)

Players

play in

Teams

Games

ban

play away attend

Banned Referees

are from

Referees

Database Systems (H) - Homework 1

S-ar putea să vă placă și