0

I've a quite simple problem but the litterature I came accross didn't seem to dwell on. Let's say I have an entity OFFER which represents an Offer on a Product, for each product, one offer can be "promoted" as BUY.

We can clearly see that a BUY is an OFFER.

But the odd thing is that there's no new column added so I wonder how I should represent it in Relationnal Database ? A new Table BUY having just the primary keys of OFFER ? A boolean field in OFFER saying whether it's an BUY or not ?

0

1 Answer 1

0

This kind of depends on more specifics to your use case, but generally speaking you probably can be fine with having a column in your Offers table to denote when a specific Offer is a buy, whether that's through a boolean based field e.g. IsBuy or a status field OfferStatus if you needed to cover multiple statuses of an Offer besides just buy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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