var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Car service - domain model?
First of all I know that there is no Car, Model, Manufacture... tables that I probably should make, but that is not a problem right now.
I must say that I have already made database and relational model looks like this (I simplified it, to concentrate on important), but I need to draw a conceptual (domain) model of this:
Client ( clientID, name, surname, telephone)
Address ( , number, street, clientID cityZipCode)
City ( cityZipCode, cityName)
Visit ( , totalPrice) clientID, visitDate
Service ( serviceID, serviceName)
Criteria ( criteriaName, size, measureUnit)
ServicePriceCriteria ( , price) serviceID, criteriaName, size
VisitItem ( , quantity) clientID, visitDate, serviceID, criteriaName, size
My the biggest problem was how to provide that ONE service can have different prices for different criteria.
i. e. Oil Changes for the truck costs 15€. For suv same service costs 8€.... Other example is when price depends on the size of the wheel. For 14 inches wheel some service costs 10€ and the same service for 17 inches wheel costs 15€.
So for the first example I have: Service(123, 'Oil Changes'), Criteria('typeOfVehicle', 'Truck', null), ServicePriceCriteria(123, 'typeOfVehicle', 'Truck', 15)
Service(123, 'Oil Changes'), Criteria('typeOfVehicle', 'SUV', null), ServicePriceCriteria(123, 'typeOfVehicle', 'SUV', 8)
For the second example it looks like this: Service(124, 'Some Service'), Criteria('Size of wheel', '14', inches), ServicePriceCriteria(124, 'Size of wheel', '14', 10)
Service(124, 'Some Service'), Criteria('Size of wheel', '17', inches), ServicePriceCriteria(124, 'Size of wheel', '17', 15)
I hope so you realized what was my idea. I wanna to ask you is this solution acceptable at all? And is it domain model from atachment correct domain model of this database?
Last edited by BojanSM; 10-13-11 at
Reason: I forgot to mark foreign key.
I'm just learning too, so this might not be an appropriate solution. How about using supertype and subtypes with discriminators?
Tags for this Thread