Data Modeling for Special Ecommerce Website and App

modeling
udf

#1

Hello I have just started using Aerospike so I need some details what will be the good data model for my e-commerce platform.

Here are some basic requirements for my e-commerce platform:

  1. User Set(For login & register an basic information of user)
  2. Product Set (For storing product info like name and image and options and color options etc)
  3. Order Set ( To track record of the user order )

The complex requirement for the special Set required for database is as follows:

1.For each product that a user will buy a Share Code will be generated which a user can share with his/her friends and family to get benefits for future.

2.The user who buys a product with somebody’s Share code, then the details that this user bought the “xyz” product must be transferred to the owner of the share code and also a Share code for this user will also be generate which he/she can share with his/her friend.

3.And also the user must be able to know how many persons shared his/her code an also the user’s who buys a product from the share code of the 1st level user’s Share Code.

 4. So I want to keep record of the users 2 level below the current user.

Pagination in Ecommerce website
#2

How many “Share Codes” are expected to be possibly queued for any 1 particular user (thousands/tens of thousands/hundreds of thou…etc)?

Do the share code transfers have to be atomic, or can they happen in two operations?

How much data (bytes) needs to be stored with the users login/basic ID record (how much is available for the PK to UserID)?

How large does a share code need to be (bytes)?


#3

For each order of the user a share code is required , and this share code can be used by 4-5 persons.It depends upon the user that how many orders he/she is going to place so , I guess there is no limit over the no. of share codes

The operations on share code need not be atomic.

I guess the basic record is going to take a max of 1000 bytes , the user id can be generated using UUID and we can attach email id with the UUID to make a PK.

I guess the size required for the share code will be of 7 character string.