You are here: Re: Correct Schema for this business problem? « MsSQL Server « IT news, forums, messages
Re: Correct Schema for this business problem?

Posted by Blast on 01/18/07 17:49

Well thanks for the reply. BUT. There is a reason why we want things
done the way we want things done. Let me explain.

> I looked at your ER diagram. A good rule of thumb is that when it has
> a cycle in it, you are in trouble. You also defined a lot of MVDs
> which guarantee 5NF problems. You will also have what Tom Johnston
> calls non-normal form redundancies. And the golf courses never appears
> in the diagram.

What are MVD's? We need the cycle. The problem is, we don't book the
golf directly. We're not a golf course. People who are in a reservation
don't always play golf. So, we assign people to a reservation. Some of
those people in the reservation might be playing golf, but they must be
in the reservation to play golf. Also, the tee times need be confirmed.
This isn't automatically done. So, we want to make sure the people
assigned to the golf course have tee times made. If they have no tee
times, then we need to be able to query that information becuase
someone needs to call the golf course and make the tee times.


> >> A reservation will be assigned one or more customers.
> A reservation has one or more golfcourses. <<

No, it has 0 or more.


> Shouldn't a reservation put a group of cusotmers onto the SAME golf
> course? You allow 5 poeple to play as a reservation on 10 different
> courses.

Yeah, some people in the reservation will be playing golf, some won't.
2 people in the reservation might be playing 10 different golf courses.


> >> Golfcourses will be assigned people. <<
>
> Shouldn't that be the other way around? So I do not need a reservation
> at all because I have my own course?

Yeah, we don't have our own course.


> >> These people can only come from those people assigned to the reservation that the golfcourse belongs to.
>> Very convoluted and inside out.<<

Why is this inside out?


> >> GolfCourses have one or more teetimes. <<
>
> No, a golf course has 18 holes with a par for each hole, etc. A
> reservation is an event and events have times; a golf course is an
> eneity and they have existence.

Tee times are made in groups of 3 or 4 typically. So if you have a big
group, lets say 36 players you need many tee times.



> >> TeeTimes will be assigned people. <<
>
> So everyone in a resrevation can tee off at a different time, as well
> as not beingon the same course?

Yes, that's right.


> >> Those people can come from only the people assigned to the golfcourse that the teetime belongs to.<<
>
> Very convoluted and inside out again.

Yes this is right. You see, someone will put people in a reservation.
Weeks later can go by. Then, someone from that group might call in and
say, we want to play 3 different golf courses and we need these tee
times. But we can't give them tee times right away because maybe they
are reserving more then a year in a advance. So, we assign them to the
golf course and eventually make their tee times.


You see, I want to be able to query, how many reservations do we have
with people who aren't playing golf. How many people in reservations do
we have who are playing golf but dont have tee times. How do I answer
these questions with the ER diagram you gave me? I can't!

Let me further explain the business just in case anyone wants to
comment.

People make a reservation with us. We book golf, rental cars, other
activities, and rooms. Some people book and get a room, some people
book and just play golf through us. Some people just play activities
through us etc. So the relationship for these items are zero or more.
Since we don't actually own any of these items we have to first assign
people to the item and then assign them a time in which they are
confirmed for the event. We want to know who's assigned what, and then
who actually has been confirmed by the companies the event time.

So we start off by creating a group of people that belong to the
reservation. Then as they decide what they want to do, we start
assigning them different items. Those items need to have things
confirmed by third party organizations. Does that make sense?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация