Property and Properties are both reserved words so be sure not to use them for any names.
I usually call the table Props ... perhaps something like this
- PropID, PK (Primary Key)
- PropName -- however you will refer to the property in lists, ie: address1, city
- st (State is also reserved)
- OwnerID, autonumber, PK (Primary Key)
- PropSaleID, autonumber, PK (Primary Key)
- PropID, Long, FK (Foreign Key) to Props
- DateSold, date of sale
- AmtSale, currency, amount of sale
- PropOwnID, autonumber, PK (Primary Key)
- PropSaleID, Long, FK (Foreign Key) to PropSales
- OwnerID, Long, FK (Foreign Key) to Owners
- pcShare, double, percent of ownership
New Release: free Analyzer for Microsoft Access
~ have an awesome day ~
I have a PROPERTY table and an OWNER table. I want to keep a history of who owned what property, when, and who is the current owner.
I was planning on using a third table with 4 fields. Property, Owner, Date Purchased, Date Sold. With the obvious relationships to the PROPERTY and OWNER tables. I had assumed a blank Date Sold field would allow me to indicate the current owner. However, I want to make sure I don't have active two Property/Owner relationships. That is, the same PROPERTY with an open Date Sold field for two owners.
I am not wedded to this design but I cannot think how I could do a validation for this on data entry.
This has to happen in databases all the time. How would you suggest I design or validate my way out of this?
Posted by: crystal 8 <email@example.com>
|Reply via web post||•||Reply to sender||•||Reply to group||•||Start a New Topic||•||Messages in this topic (2)|