I am planning on making a generic shopping store website like a smaller version of alibaba.com which could be used by different businesses to list their product in their own version of the shopping store.
Before starting the project I want to be sure about what I am going to do. One thing which I want to ask here is this :
1) Does the shopping store keep track of all the inventory with regards to its original cost of products as well as selling price of product both, or only the latter one? If it keeps track of both then what is the schema going to be like if a particular product is entered in the inventory at different rates at different times for example 100 items of Product1 costing 100$ and priced at 150$ on date1 & on date2 Product1 is again added to the inventory costing 120$ this time and priced at 150$ like before. How am I going to store that information in the database and make calculations of profit and Cost of goods sold(COGS) in this scenario. I am slightly aware of FIFO LIFO inventory management but I am not sure is it going to be a part of the shopping store or is this not the responsibility of the shopping store to keep track of original cost of goods sold vs the profit. If it is, then what should be the schema of the database be like to accomodate these requirements.
2) In typical shopping stores, a single product has different attributes & the shopping store is aware of the current quantity of a product with particular attribute. For example A T-shirt with productId=1 may come in two different colours and the inventory has 10 blue coloured tshirts & 5 black coloured tshirts with productId=1 & attributeId=1 & 2 respectively. How am I going to keep track of the inventory of a same product with differet attributes. I mean there is only one Product table in the database, How is the schema going to accomodate these requirements that the inventory knows about the quantity of different attributed-products with the same productId.
I googled alot before posting a question here. I came acros some database schemas of shopping store, but I am not sure how do they manage the inventory keeping in mind my two above points. Please have a look at it & tell me what would the roadmap be like. And lastly I do want to make my own shopping store & not use prebuilt shopping stores just for learning purposes as well as some other reasons. I am going to use ASP.Net MVC with sqlserver.
Please see attached image of shopping store schemas I found on google.
How am I going to track & maintain inventory if I use a somewhat smaller version of the schema shown in the picture. Where do they specify the quantity of the products becuase the Product table doesnt have it. Also how would I maintain the quantity,cost & price of same product with different attributes.
Thanks.