- 3
- 0
- 约6.42万字
- 约 58页
- 2018-03-24 发布于江西
- 举报
5.管理Schema对象.ppt
Oracle Database 10g: Administration Workshop I 8-* Oracle Database 10g: Administration Workshop I 8-* Practice 8: Managing Schema Objects Background: You need to create a schema objects for the new inventory application. Tasks: Create tables to store data Ensure referential integrity through the use of constraints Create indexes to improve access to data Modify existing tables Create views that simplify user access to data 1. In the INVENTORY tablespace, create the PRODUCT_MASTER table in the INVENTORY schema. The specifications of the table are: PRODUCT_ID number(5). This is the primary key field. PRODUCT_NAME varchar2(50) with a Not Null constraint. CODE varchar2(20) with a Not Null constraint. REORDER_THRESHOLD number(5) with a check constraint ensuring that the number is always greater than zero. COST number(5,2) PRICE number(5,2) 2. In the INVENTORY tablespace create the PRODUCT_ON_HAND table in the INVENTORY schema. The specifications of the table are: ON_HAND_ID number(5). This is the primary key field. PRODUCT_ID number(5). This field should have a foreign key constraint linking it to the product_id field in the product_master table. QUANTITY number(5) WAREHOUSE_CITY varchar2(30) 3. In the INVENTORY tablespace create the OBSOLETE_PRODUCTS table in the INVENTORY schema. The specifications of the table are: PRODUCT_ID number(5). This is the primary key field. PRODUCT_NAME varchar2(50) with a Not Null constraint. CODE varchar2(20) with a Not Null constraint. COST number(5,2) PRICE number(5,2) 4. In the INVENTORY tablespace, create an index on the PRODUCT_NAME column of the OBSOLETE_PRODUCTS table in the INVENTORY schema. 5. In the INVENTORY tablespace, create an index on the PRODUCT_NAME and CODE columns of the PRODUCT_MASTER table in the INVENTORY schema. 6. In the INVENTORY tablespace, create an index the PRODUCT_ID and QUANTITY column of the PRODUCT_ON_HAND table in the INVENTORY schema. 7. You receive an update for the in
原创力文档

文档评论(0)