Question

In: Computer Science

Model the following cases by ER diagrams. Identify the keys, attributes and relationship cardinalities, and convert...

Model the following cases by ER diagrams. Identify the keys, attributes and relationship cardinalities, and convert them into table schemas. Provide necessary assumptions to support your model.

The following descriptions are about the inventory information. a) Each product item has ID, description, quantity in the inventory, unit price and a supplier. b) Suppliers have unique ID, addresses, phone numbers, and names. c) Each address is made up of a street address, a city, and a postcode. d) The purchase order may consist of one or more product items. e) Each purchase order has date, quantity for each items, total value

Solutions

Expert Solution

If you have any doubts, please give me comment...

CREATE TABLE Supplier(

ID INT NOT NULL PRIMARY KEY,

addr_street VARCHAR(50),

addr_city VARCHAR(50),

addr_post_code CHAR(5),

phone_number VARCHAR(15),

name VARCHAR(100)

);

CREATE TABLE Product(

ID INT NOT NULL PRIMARY KEY,

description VARCHAR(30),

quantity INT,

unit_price REAL(5,2),

supplierID INT,

FOREIGN KEY(supplierID) REFERENCES Supplier(ID)

);

CREATE TABLE PRODUCTORDER(

OrderNum INT NOT NULL PRIMARY KEY,

date DATE,

quantity INT,

total_value REAL(10,2)

);

CREATE TABLE ORDERCONSISTS(

ProductID INT,

OrderNum INT,

PRIMARY KEY(ProductID, OrderNum),

FOREIGN KEY(ProductID) REFERENCES Product(ID),

FOREIGN KEY(OrderNum) REFERENCES Order(OrderNum)

);


Related Solutions

Identify the degree and cardinalities of the relationship. - Draw the corresponding E-R diagram. Don’t forget the degree and cardinalities of each relationship.
For each of the following descriptions: - Identify the degree and cardinalities of the relationship. - Draw the corresponding E-R diagram. Don’t forget the degree and cardinalities of each relationship.1 . A book is identified by its ISBN number, and it has a title, a price, and a date of publication. It is written by one or multiple authors. Each author is identified by an author number and has a name and date of birth. Each author has either one...
Instructions: Draw an ER diagram for the following description. Identify the keys and give the cardinality...
Instructions: Draw an ER diagram for the following description. Identify the keys and give the cardinality of all relationships (e.g. 1:1, N:1, N: M). Make sure you note your assumptions. Assume you are creating a database for a library system with the following properties: The library contains one or several copies of the same book. Every copy of a book has a copy number and is located at a specific location on a shelf. A copy is identified by the...
1. Consider the following relations. The primary keys are underlined. All attributes are of type string...
1. Consider the following relations. The primary keys are underlined. All attributes are of type string if not indicated otherwise.  Student(s_ID, s_name, s_degree: integer, advisorID, d_ID)  Lecture(l_ID, l_name,l_degree: integer, p_ID, d_ID)  Register(s_ID,l_ID,score: integer, Semester)  Professor(p_ID,p_name, d_ID)  Department(d_ID, d_name, address) a. Find the names of professors who have taught in every semester. b. List the names of lectures that the CISE department offers but that are taught by a professor whose department is not CISE. c....
Which of the following best illustrates the relationship between entities and attributes?
Which of the following best illustrates the relationship between entities and attributes?  A. The entity CUSTOMER with the attribute ADDRESS   B. The entity PRODUCT with the attribute CUSTOMER   C. The entity CUSTOMER with the attribute PRODUCT   D. The entity ADDRESS with the attribute CUSTOMER   E. The entity PRODUCT with the attribute PURCHASE
1. Using the audit risk model, identify the relationship between the following elements. For each of...
1. Using the audit risk model, identify the relationship between the following elements. For each of the items below, highlight whether the two elements have an inverse relationship, a direct relationship, or no relationship. When considering each item, assume that the other components of the risk model remain constant. Engagement Risk and Acceptable Audit Risk Assessed Inherent Risk and Planned Detection Risk Materiality and Amount of substantive evidence needed Assessed Inherent Risk and Assessed Control Risk Acceptable Audit Risk and...
a. Using appropriate demand and supply diagrams in each of the following cases explain the impact...
a. Using appropriate demand and supply diagrams in each of the following cases explain the impact on the market price and quantity traded. i. Market for second-hand clothing following a high increase on import duties on second- hand clothes ii. The market for tomatoes following a bumper harvest iii. The market for Sanwatt battery following a fall in price of Tiger head battery b. Define market as applied in economics and explain briefly any four types of markets.
Select one of the following schools of economic thought: Keynesian, Chicago, and Austrian. Identify three keys...
Select one of the following schools of economic thought: Keynesian, Chicago, and Austrian. Identify three keys points or beliefs that are held by that particular school. What are the macroeconomic policy implications of those beliefs? Explain your answer. Which school of economic thought do you find to be most convincing? Why? ****I can't use what's already posted and would like to use one besides Austrian.
Select one of the following schools of economic thought: Keynesian, Chicago, and Austrian. Identify three keys...
Select one of the following schools of economic thought: Keynesian, Chicago, and Austrian. Identify three keys points or beliefs that are held by that particular school. What are the macroeconomic policy implications of those beliefs? Explain your answer. Which school of economic thought do you find to be most convincing? Why?
Consider the simple regression model ? = ?0 + ?1? + ?) In the following cases,...
Consider the simple regression model ? = ?0 + ?1? + ?) In the following cases, verify if the ‘zero conditional mean’ and ‘homoscedasticity in errors’ assumptions are satisfied: a. If ? = 9? where ?(?⁄?) = 0, ???(?⁄?) = ? 2 b. If ? = 5.6 + ? where ?(?⁄?) = 0, ???(?⁄?) = 3? 2 c. If ? = 3?? where ?(?⁄?) = 0, ???(?⁄?) = ? 2 2) D. In which of the cases above are we...
For each of the following cases, identify the order with respect to the reactant, A. CASE...
For each of the following cases, identify the order with respect to the reactant, A. CASE (A------------------->PRODUCTS) ORDER The half-life of A is independent of the initial concentration of [A]. Order number___ A twofold increase in the initial concentration of A leads to a fourfold increase in the initial rate. Order number____ A twofold increase in the initial concentration of A leads to a 1.41-fold increase in the initial rate. Order number_____ The time required for [A] to decrease from...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT