We require an advanced system for a Sports Centre, you are concerned only with representing the data discussed below about bookings and members. (The complete system may contain other data and other aspects of the organisation, if you think other aspects are relevant to your design of this part include that information in the discussion section.)
There are a range of activities available such as treadmills, rowing machines, weights, static cycles and games rooms such as squash courts, badminton courts, table tennis rooms.
We need to keep names, addresses and contact numbers and each member has a unique id allocated to them. We also need to record how long they have been a member ( additional benefits or discounts may be made available on the basis of length of membership). There are two types of members:
- Basic: who have access to 3 activities that that they have signed up for. Basic membership only allows you to use the facilities at off peak times.
- Full: who can use any facility at any time. These members may have specified particular activities that they are interested in and which they may be offered special promotions in.
Facilities can be booked for hour slots from when the centre opens 8:00 AM till when it closes at 9:00 PM. Assume that we are only concerned with bookings for the next week i.e. Monday to Saturday, shut on Sunday. Peak periods are currently 12:00 to 2:00 and 5:00 to 7:00.
The system should be able to
produce reports such as:
- a listing of all empty badminton courts on Friday.
- when a basic member can book weights.
answer queries such as:
- Who are the full members with an interest in table tennis?
- Who has been a member longer than 3 years and will be in on Friday?
- Who has booked a particular squash court at 4:00 on Saturday?
and perform functions such as
- transfer a member from basic to full status.
For this coursework you may ignore non-essential attributes and other tables/structures that would be present for other uses of the database.
The submission will cover:
- the analysis
- design and implementation in an Object/Relational system
- and issues for implementation in a different type of advanced system. e.g. Object or XML.
The implementation should include appropriate use of the advanced features of PostgreSQL (a normal relational solution is not acceptable). Please discuss with me if you intend to use a system other than PostgreSQL. Because of the practical nature of the work, databases being identifable in screenshots and possible discussion of systems this will not be an anonymous submission. Your submission should include:
- A diagrammatic representation of the entities in the system and their relationships (E/R diagram or UML class diagram).
- Details of the tables/structures etc. that you implemented including suitable types, details of your test data (you should supplement any data given with additional material), and screen shots to show how your system answered the requirements. (This can be from psql (or other simple terminal monitor type interface) you are not required to build any particular interface to the system.)
- Alternative definitions of the entities for an Object or XML based solution and a discussion of the advantages and disadvantages of these and the solution you implemented. One topic to be addressed is whether your solution works if the last query had been "Who is playing on a particuar squash court at 4:00 on Saturday?".
- Any assumptions you have made.