Database table design with duplication of data
问题 I was having some problem when trying to design for my firebase database structure. Basically, 1 account can have many receipts, 1 receipts can have many items. Here is the JSON: receipts { accountID1 : { receiptID1 : { date : "07/07/2017" store : { storeName : "store1" storeAddr : "addr1" } currency : { currencyName : "currency1" currentcySymbol : "$" } totalAmount : "50.00" items : { itemID1 : true, itemID2 : true, } } receiptID2 : { date : "08/07/2017" store : { storeName : "store1"