HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Is a trade-in its own purchase order, or an adjustment on a sales order?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
ordertradeadjustmentitsownpurchasesales

Problem

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?

Solution

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

Context

StackExchange Database Administrators Q#19999, answer score: 6

Revisions (0)

No revisions yet.