Re: Best way to model hybrid single/multiple logical database
On Sun, 4 Jan 2004 09:52:35 -0000, "Mike MacSween"
<mike.macsween. nospam@btintern et.com> wrote:
[color=blue]
>"David W. Fenton" <dXXXfenton@bwa y.net.invalid> wrote in message
>[color=green]
>> Basic entities: garages, customers, cars
>>
>> The customers park in only one garage at a time (business rule or
>> entity attribute?).[/color]
>
>What do you mean, that a customer is 'allocated' to one garage at any
>particular time?
>[color=green]
>> The cars table lists the cars for each customer, but have
>> attributes that are restricted by which garage the car is parked
>> in.[/color]
>
>So it's one to many, customers to cars? This 'attributes are restricted...'
>thing I can't make sense of. How can the attributes of a car entity be
>governed by where it is parked? Perhaps an example would help.
>[color=green]
>> Is the Garage an attribute of the car or an attribute of the
>> Customer?[/color]
>
>Like Rick says, you probably need a 'Rental' entity.
>[/color]
Clearly need a "Rental" entity, which identifies the car, garage and a
time period. There should be no duplicate amount cars/time periods -
car can only be parked once during a time. If the time period is not
consistent among garages (e.g. monthly), this can cause a problem.
Customers are related to cars ... one to many.
Steven
On Sun, 4 Jan 2004 09:52:35 -0000, "Mike MacSween"
<mike.macsween. nospam@btintern et.com> wrote:
[color=blue]
>"David W. Fenton" <dXXXfenton@bwa y.net.invalid> wrote in message
>[color=green]
>> Basic entities: garages, customers, cars
>>
>> The customers park in only one garage at a time (business rule or
>> entity attribute?).[/color]
>
>What do you mean, that a customer is 'allocated' to one garage at any
>particular time?
>[color=green]
>> The cars table lists the cars for each customer, but have
>> attributes that are restricted by which garage the car is parked
>> in.[/color]
>
>So it's one to many, customers to cars? This 'attributes are restricted...'
>thing I can't make sense of. How can the attributes of a car entity be
>governed by where it is parked? Perhaps an example would help.
>[color=green]
>> Is the Garage an attribute of the car or an attribute of the
>> Customer?[/color]
>
>Like Rick says, you probably need a 'Rental' entity.
>[/color]
Clearly need a "Rental" entity, which identifies the car, garage and a
time period. There should be no duplicate amount cars/time periods -
car can only be parked once during a time. If the time period is not
consistent among garages (e.g. monthly), this can cause a problem.
Customers are related to cars ... one to many.
Steven
Comment