Brimrix / abbs-poc

0 stars 0 forks source link

Create system ERD #7

Open Waqar-SE opened 1 month ago

Waqar-SE commented 1 month ago

We need to design a database to cater the needs of system.

Currently the entities are

Please draw an initial ERD for above needs.

SalmanMughal789 commented 1 month ago

This is a simplest ER diagram for the first iteration. It may not be perfect. We shall discuss and improve it later on.

image

Waqar-SE commented 1 month ago

We'd also like to keep a timestamp of all the created records, we want to know when it was created.

Waqar-SE commented 1 month ago

The ERD is also missing constraints, like unique and not_null things. Please update.

SalmanMughal789 commented 1 month ago

I have added timestamps tracking in the ERD as well and have modified it in such a way that It can fulfill the current state of the software product ABBS image

Waqar-SE commented 1 month ago

Each invoice will have multiple line items(rows) and each line item will have an image, how do we make sure with the above ERD that each image is linked with correct line item ??

SalmanMughal789 commented 1 month ago

Each invoice record have multiple lines. I have a line table which is connected to invoice table having one to many relationship. I am storing a key attribute against each line key will allow us to track the line as well the order of it on the frontend. When I render the table from the data (array of objects) in ReactJS I also keep key to track it (in antD).

image