Hello,
I’m being a bit confused about a database design I’m working on. It’s a real estate deatabase.
I’m trying to store the transaction mode of a property (rent or sale). I made a lookup table called transactions so I can use Foreign keys. However each mode has additional information. Sales have the price, but rentals have the rate(ie month or semester), the price, down payment and deposit. I couldn’t put them in the lookup table because there will be to much null values. So I thought of making a sales table and a rentals table both with the property id. It’s a one to one relationship (one property has one transaction mode). However I wonder if I should have the rentals id and sales id in the property table, considering the fact that one these two field might be null like this:
or should I not put the ids in the property tab since the rentals and sales tables already have the properties id and just fetch data in a joint query later on:
Or should I design it another way. Thanks for your attention