Designing an entity relationship diagram (ERD) for invoice printing software

Reza Jaferi 331 Reputation points
2023-11-11T23:55:40.4266667+00:00

The invoice-printing program is depicted in the figure below. I'd like to search for invoices based on the buyer's full name (Natural person/legal entity full name) or the invoice date to find all invoices associated with those two situations. For example, if a user searches for a given person or date, they will obtain a list of invoices, each with an invoice number.

In the future, I may need to search by invoice number, where each invoice number will only display one invoice.

Invoice So, based on the previous description, I require an ERD similar to the one below.

enter image description here It is not necessary to determine the data type of each entity in order to answer the question; what is most important is the relationship between the tables based on my above explanation. I tried to create four tables, but I was unable to establish the necessary relationship between them.

Click to download the database

Thank you for your interest.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,045 questions
SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,291 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.