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...
How to determine what type of attribute the following attributes are in an Entity-Relationship Model? I...
How to determine what type of attribute the following attributes are in an Entity-Relationship Model? I just want to know if each of these can be considered as a composite attribute, a multi-valued attribute or neither: Suppose we have: 1. Name : A person's full name 2. Address : A residential address 3. Account Balance : A bank account balance 4. Monthly fees: Monthly fees associated with a chequing account, which are unique to each account holder 5. Minimum Balance:...
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....
Identify which cloud computing service model is appropriate to use in each of the following cases:...
Identify which cloud computing service model is appropriate to use in each of the following cases: A company needs to build a web portal for clients all over the world to access web pages. Google allows customers to do computing on their system. A customer does not need to have a powerful computer, just some means to access the Internet. A small business does not want to purchase software, such as visio drawing tools and database.
Entity-relationship data model (ERD)-Business rule, assumptions You are required to develop an ER model to represent...
Entity-relationship data model (ERD)-Business rule, assumptions You are required to develop an ER model to represent the information requirements of company you are working for. You also need to write business rules and assumptions. Task 2: Create the Data Dictionary base on your ERD diagram.
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.
4. Consider the following two alternative ER designs: • a ternary relationship set R that relates...
4. Consider the following two alternative ER designs: • a ternary relationship set R that relates entity sets A, B, and C. • a design in which R is replaced by an entity set E with E related to A, B, and C by 3 binary relationship sets RA, RB and RC , respectively. Explain why, as stated, these two may not be equivalent. Then explain what could be done to make them equivalent by fixing each of RA, RB...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT