Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Let's say you're a car dealer, selling cars.

When a customer buys a new car, he often trades in his existing car.

What data model makes more sense?

A) create a sales order record for the sale, and a purchase order record for the trade-in, and link them together (related_order_id)?

B) create a sales order record for the sale, and a sales order adjustment for the trade-in?

C) something else?

share|improve this question
    
+1 for the edit –  JNK Jul 10 '12 at 14:06
add comment

2 Answers

up vote 5 down vote accepted

I would recommend modeling it as a sale with an adjustment for the trade-in, assuming that as a car dealer you accept trade-ins without a related sale of a car.

Therefore within your system you re-use the purchase features, and can later report on metrics like how many sales are linked to trade-ins, what values of sales are linked to trade-ins, whether trade-ins boost sales, etc

share|improve this answer
    
I talked to my friend who is a partner at a big firm and she said a trade-in should be an adjustment on a sales order. so, thanks! –  Neil McGuigan Jul 5 '12 at 2:42
    
@NeilMcGuigan you are welcome –  ssmusoke Jul 5 '12 at 5:02
add comment

I think you should model it as "door number three" - something else. While from a vehicle sale perspective you have a trade-in allowance (dollar figure), that is not where the interest in the event ends.

Each item taken in trade becomes an inventory item that has to be stored and eventually disposed of.

Although it is rare, it could happen that more than one item is taken in trade.

I would model a trade-in as a separate table (optionally?) linked to a sale. This gives you something to link other events and/or items to, such as inventory, valuations, work-orders for repairs and any other activity relating to accepting and disposing of the traded vehicle.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.