Jump to content

One POS software for many customers, design database


nitiphone2021
 Share

Recommended Posts

Dear friends.

As I would like to create a software like POS on web application.

my question is:

1. Should I create only one Database for all customers?

2. in case I have only one Database, How can I saperate the customer information? by field or table name?

3. if I have new customer. I need to create new table or information for them?

Link to comment
Share on other sites

  1. Yes
  2. Unique customer id identifies the customer in the data
  3. Add new record to customer table

Example

+---------------+
| customer      |
+---------------+
| customer_id   |-------+       +-----------------+                                                +----------------+
| customer_name |       |       |  basket         |                                                |  product       |
| email         |       |       +-----------------+                                                +----------------+
| mobile        |       |       | basket_id       |-------+       +-----------------+      +-------| product_id     |
| etc           |       |       | basket_date     |       |       |  basket_item    |      |       | description    |
+---------------+       +------<| customer_id     |       |       +-----------------+      |       | price          |
                                +-----------------+       |       | item_id         |      |       +----------------+
                                                          +------<| basket_id       |      |
                                                                  | product_id      |>-----+
                                                                  | quantity        |
                                                                  +-----------------+

 

Edited by Barand
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.