r/DatabaseHelp • • May 27 '18
Asset Tracking + Accounting Design
So this started with some frustrations with a few different pieces of personal accounting software (Quicken, GNUCash, etc.). I'm completely paperless when it comes to receipts, but I want more functionality than split transactions and just attaching an image. By trade I work with some commercial software that handles assets, ROI, etc., but as a thought experiment I started to work on modeling a database that would do that for personal items. It's ending up being harder than I thought. Some examples:
- "Products" are things that I can buy (cars, computer parts, paper...)
- "Assets" are products that I personally own ('my' car, 'five' reams of paper...)
- Some assets are unique and serialized ('this' Makita drill, S/N XYZ123)
- Some assets are common and not serialized, and are therefore stockable ('6' plain white t-shirts, '3' cases of water)
- Assets are acquired and lost via several means, such as Purchase, Gifts, Sale, and Donations. These events have different financial implications that I want to reflect and relate in bank transactions.
- Bank transactions are purely financial, from some account to another account. Sometimes transactions are to purchase assets, but I also want to account for taxes, shipping, and other non-tangible transactions. Think 'split' transactions for Quicken that would detail out a mortgage payment in principal, interest, and escrow - except with the ability to tie to assets.
In my design approach, this has resulted in a mess of supertypes and subtypes to account for all the different kinds of documentation, invoicing, and asset events. For instance:
- "Asset" is a supertype of "Unique Assets" and "Non-Unique Assets" (one has serial numbers, the other has a quantity that changes over time).
- "Asset" relates to an "Acquisition", which is a supertype of different 'gain' events, such as Purchases, Gifts, Creations, etc.
- Likewise, "Loss" is a supertype for Sales, Donations, Gifts Given, or other damages/EOL situations.
- Purchases and Sales can relate to bank transactions; assets received as gifts don't relate to transactions; donations have tax implications, but don't necessarily relate to bank transactions.
These kinds of event supertypes were the only way I could think of relating the changes of Assets to events over time. That way, if I look up my Makita drill, the purchase details would be related to it (date, price, retailer), and the loss details would be recorded if I donated it to Vietnam Vets of America at a valuation of $30. For a non-unique item, like cases of water, the data I would want to get out of it would be how many I purchase throughout a year, and how much I've been paying for that item (or items of a similar category) over time. I'd also want to see that maybe I've been paying more for those items at one supermarket over another. That'd be the idea, anyway.
The reason I say this has become a thought experiment is because all the supertype/subtypes make me question my approach to normalizing data. I've found it difficult to track down a data model that fits this level of detail for personal use. Have a gone off the deep end here?