How Can I Improve This Database Model?
I'm trying to model the relationship of dvd sales and dvd rentals to a customer. Although I dont think my transction table is correct. If anyone can let me know if I'm goin in the
Solution 1:
Many retail databases model each type of transaction ("Sale of Harry Potter", "Rental of Harry Potter") as different rows in the same table. So you would have "TransactionType", and then you can have Customer->Transaction->LineItem (An instance of a transaction)->TransactionType.
Solution 2:
I would put all the transaction info in one table. Some fields may not be used depending on the type of transaction (P Purchase, R Rental) but so what? Disk space is cheap. The code will be simpler and run faster by having fewer tables.
Post a Comment for "How Can I Improve This Database Model?"