Suppliers, Customers, and Orders Data Model for Power Apps App

Data Model for Power Apps App

Question

Your company is a distributor of the machinery equipment.

You need to create a Power Apps app that would provide information about its suppliers, customers, and orders.

A user can see information about the customer and the grid with the order history on the app's customer screen.

If a user clicks on the equipment specification in the order, the app provides data about the equipment's suppliers.

Also, the order details render information about the company's employees handling the order.

You need to create a data model for your new app.

What should be the relationships between the orders and customers and between suppliers and employees who process the orders?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E. F.

Correct Answer: D

Dataverse defines the two types of relationships between tables: One-to-Many (1:N) and Many-to-Many (N:N).

A One-to-Many relationship is a Parent-Child relationship, like between a customer and multiple orders.

One customer can have several equipment orders.

The customer record in a Customers table will be related to the numerous records in the Orders table.

It is a One-to-Many relationship for a customer record.

For the related order record, this relation is Many-to-One (N:1)

A Many-to-Many relationship is when multiple records from one table related to the multiple records in another table and vice versa.

An example of this type is a relationship between suppliers and your company's employees that process the orders: each employee can process the equipment from multiple suppliers.

Each supplier has multiple people who process their equipment.

The person record in an Employees table will be related to the multiple records in the Suppliers table.

And a supplier record in the Suppliers table will be related to the multiple records in an Employee table.

It is a Many-to-Many relationship for a person and a supplier records.

When users create a Many-to-Many relationship, the Dataverse creates a specific hidden intersect matching table between the two tables' records.

After you create an N:N relationship, you cannot edit both tables.

You can avoid this limitation by creating a new custom table and establish two One-to-Many relationships between a new table and each of the other tables.

By introducing the third table, you will avoid the limitation mentioned above.

Another possible solution is connections.

Connections are a particular case for the Many-to-Many relationships.

They are flexible and don't have the limitations of the N:N relationship.

All other options are incorrect.

For more information about the Dataverse types of table relationship, please visit the below URLs:

Based on the requirements provided, the relationships between the entities should be as follows:

  • Orders and Customers: One-to-Many (1:N)

    • This relationship allows for one customer to have multiple orders, but each order is associated with only one customer.
    • This relationship will enable the user to view the order history for a particular customer on the customer screen.
  • Orders and Employees: Many-to-One (N:1)

    • This relationship allows for many orders to be handled by one employee, but each order is handled by only one employee.
    • This relationship will enable the user to see which employees handled a particular order.
  • Orders and Suppliers: Many-to-One (N:1)

    • This relationship allows for many orders to be associated with one supplier, but each order is associated with only one supplier.
    • This relationship will enable the user to view the supplier information for the equipment associated with a particular order.

Therefore, the correct answer is C. One-to-Many (1:N) and Many-to-One (N:1).

Option A (One-to-One (1:1) and Many-to-One (N:1)) is incorrect because a one-to-one relationship between orders and customers would mean that each order is associated with only one customer, which is not the requirement.

Option B (Many-to-One (N:1) and One-to-Many (1:N)) is incorrect because it has the relationship between orders and customers reversed.

Option D (Many-to-One (N:1) and Many-to-Many (N:N)) is incorrect because a many-to-many relationship between orders and suppliers would mean that each order can be associated with multiple suppliers, which is not the requirement.

Option E (Many-to-One (N:1) and One-to-One (1:1)) is incorrect because it does not account for the one-to-many relationship between orders and customers.

Option F (Many-to-Many (N:N) and Many-to-One (N:1)) is incorrect because it suggests that each order can be associated with multiple suppliers, which is not the requirement.