Equality of UI input elements vs. database table entities

Reza Jaferi 271 Reputation points

As you can see in the following image, the user interface of my app has a total of 12 text boxes (6 text boxes in each part) in the seller and buyer sections.

Invoice UI

The image below is a part of the ERD relating to this application's database; since the relationship between these two tables is one-to-many, an additional entity (Seller ID) is defined in the Buyer detail table in comparison to the user interface.


When a user enters data from the UI, I want the Seller ID value to be automatically inserted into the database.

Based on the above explanation, is this type of application design (user interface and ERD) correct?

If this approach is not correct, please provide a standard approach that keeps to ERD design principles and clean code.

Click to download the database

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,553 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
11,582 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,208 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,456 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 48,556 Reputation points

    the first question is can a buyer buy from two different sellers? can a buyer have more than one order? it sees like the buyer/seller relationship would be at the order level.

    1 person found this answer helpful.