question archive Suppose your company takes orders for its products, which are supplied to your company by vendors

Suppose your company takes orders for its products, which are supplied to your company by vendors

Subject:AccountingPrice:9.82 Bought3

Suppose your company takes orders for its products, which are supplied to your company by vendors. You want to create a relational database of this information. Discuss the relationship between orders and products and between products and vendors. What tables would you create for this database, and what would you include in these tables? 

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

Vendor Table, Order Table, and Product Table are three entities that will be included in this entity connection diagram. We will also build a data flow diagram.

 

Consider the case where I will order the products multiple times; in this case, there will also be multiple orders for the same products; again, within every order, I will order N variety of products; as a result, the relationship between both the products and orders will be N-N; in the case where I will order the products only once, the relationship between both the products and orders will be N-1; in this case, I have assumed that in that single order, I have ordered a multiple number of products.

 

Now, let us suppose that each vendor has the capability of serving us multiple products, and that I have ordered those products from a single vendor, in which case the relationship between both the products and the vendors would be N-1; however, if I place orders from different vendors, the relationship between both the products and the vendors would be N-N; again, if I place orders from multiple suppliers, the relationship between both the products and the vendors would be N-1.

 

Allow me to explain three tables in more detail.

Purchase Order Tables: The above table will contain all of the details of a specific order or various attributes; for example, the order id, the order date, the product associated with the order, the vendor who supplied the product with the order, and the customer who placed the order, among other things.

 

Various properties such as the Vendor ID, company name, contact information, and address will be included in the Vendor tables.

For example, if I include a vendor connected with this product in the product tables, then perhaps this vendor data is included in the product tables as a foreign key. For example, if I include a vendor associated with the this product, then perhaps this vendor data is included in the product tables.