Question: 1. Write an SQL code to create the VENDOR table. The information about the VENDOR table is provided below. When creating the table, make sure
1. Write an SQL code to create the VENDOR table. The information about the VENDOR table is provided below. When creating the table, make sure to include appropriate constraints defined in the description.
| Attribute | Data Type | Constraints |
| VEND_NUMBER | NUMBER(5) | Primary Key |
| VEND_NAME | VARCHAR2(35) | NOT NULL |
2. Write an SQL code to create the PRODUCT table. The information about the PRODUCT table is provided below. When creating the table, make sure to include appropriate constraints defined in the description.
| Attribute | Data Type | Constraints |
| PROD_CODE | NUMBER(5) | Primary Key |
| PROD_DESC | VARCHAR2(35) |
|
| PROD_DATE | DATE |
|
3. Assuming that each product is manufactured by many vendors and each vendor makes many products, create a bridge table between VENDOR and PRODUCT. When creating the table, make sure to include appropriate constraints (primary key, foreign keys, etc.).
4. Use the ALTER TABLE ADD CONSTRAINT command to add the UNIQUE constraint to the PROD_DESC column in the PRODUCT table.
5. Use the ALTER TABLE ADD CONSTRAINT command to add the CHECK constraint to the PROD_DATE column to check that a product was added to inventory after January 03, 2018.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
