Click here to Skip to main content
14,690,608 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
A local boatyard hires out cruising yachts on the river Forth. The season is 20 weeks long. Each week is identified by number: Week 1, Week 2, etc. There are several yachts: each has a unique name (for example, Isobel). The lengths of the yachts are recorded in metres. Groups of people make bookings of a boat for a week. The price of the hire depends on the size of the boat and the week. Each group has a “skipper” and the remainder of the group is the “crew”. There are at least two people in each group. Some people may be in several groups (in different weeks) and the skipper for a booking in one week may be a crew-member in another week. The boatyard firm keeps contact information on all the people in the group, including the skipper, including at least their name, age, and their e-mail address. When booking, the group may request one or more standard “extras” from a predefined list. Each extra is identified by a unique string, e.g. “blankets”, “snacks” etc, and has its own price. The one or more of each extra may be ordered.

Please help.

What I have tried:

entity : Season - > Attribute : weekID (PK)
entity : yacht - > Attribute : Name (PK), Length
entity : Price - > Attribute : weekID (FK), Length (FK), Price
entity : Contact Info - > Attribute : name, age, email (PK)
entity : extras- > Attribute : Name (PK), price
entity : Group - > Attribute : groupID

But that is surely not right.
Posted
Updated 3 days ago
Comments
Gerry Schmitz 3 days ago
   
Your "entity" and "attribute" and "arrows" are just "word noise", and add nothing to other's understanding. Try parsing your "bigger explanation" and come up with some logical "paragraphs". The world could use more paragraphs.
Member 14999025 3 days ago
   
Thanks for the answer Gerry, what i was trying to explain with the "entity" and "attribute" was the structure of the tables i thought about for the scenario.

The bigger explanation you talk about could be the scenario that was given? If so, i was looking for a set of tables with their respective attributes such that:

Season is 20 weeks long, and each week is identified by a number.
Yachts are identified by their unique name and their length.
Different groups of people may book a boat for a week. Each group has at least two people (1 skipper, and at least 1 crew member), but the skipper could not be a skipper in a different week, whereas the crew could be in a several groups.
Each member needs to provide contact info, which are Name, Age and finally email.
Each group is entitled to some extras, which are identified by a unique name and a price.

I need to extract a set of entities and attributes in a tabular way, which i tried to represent using arrows, unfortunately not that effectively. Any advice on how to work from here?
Gerry Schmitz 2 days ago
   
The main thing you're missing is a booking / reservation / excursion; that ties a lot of things together. You need to work on that to progress.

1 solution

Maybe this ER diagram will get you started: Boat Reservation[^]

Here is a reproduction of the diagram: dbdiagram.io - Database Relationship Diagram[^]
You can hover over the diagram relation links to see if they are one-to-one or one-to-many.
Can not tell exactly how this diagram is supposed to work as I did not create it.
   
v2
Comments
Member 14999025 3 days ago
   
Thanks for the Answer Rick, the only issue is that the link seems faulty, could you send it again please? Thanks again.
RickZeeland 2 days ago
   
See the updated solution, I also changed the reservations table as it did not seem right to use a timestamp as the primary key.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900