basic data modeling

  • Hey guys,

    I'm trying to produce a basic data modeling about all the receipt balance from the stores I made the purchase. Should I have 2 entities, one for stores and one for receipts? Or should I just have one entity called stores and stored everything in there. A little bit of help will be appreciated.:-)

  • pleasehelpme (12/23/2009)


    Should I have 2 entities, one for stores and one for receipts? Or should I just have one entity called stores and stored everything in there.

    It depends. How much data are we talking about? And how big do you expect it to grow? Can you post some sample data?

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • The only information you have mentioned in your description is Stores and Balances. So that sounds like just two columns in a single table. Maybe your actual scenario is more complicated but I wouldn't like to guess without more information, such as a list of the attributes you want to store and the dependencies between them.

    My advice is that you follow standard database design principles such as Normalization to determine what tables you need.

  • I don't think you should be using a database if you will be dealing with 2 entities... there is no need to overcomplicate things, excel would do the job just great.

    However, if I were to model this I'd probably consider the following entities:

    1. Store

    2. Member of staff

    3. Item

    4. Transaction (reciept)

    Store has 1 or many staff

    Store sells 1 or more items

    Member of staff processes 0, 1 or many transactions

    1 Transaction contains 1 or more items

    You can expand on each entity quite a lot, depending on the scope of what you are doing. E.g. Store has address, member of staff has address, item has price and other attributes.

    Hope this helps.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply