Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 26 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
26
Dung lượng
213,72 KB
Nội dung
B Table Descriptions and Data BĆ2 Introduction to Oracle: SQL and PL/SQL Using Procedure Builder Summit Sporting Goods Database Diagram ORD_ID S_ITEM ID PRODUCT_ID S_ORD SALES_REP_ID CUSTOMER_ID * S_INVENTORY PRODUCT_ID ID ID S_PRODUCT ID S_CUSTOMER ID S_WAREHOUSE IMAGE_ID SALES_REP_ID REGION_ID MANAGER_ID ID ID S_IMAGE ID ID S_EMP MANAGER_ID DEPT_ID ID S_DEPT REGION_ID ID ID ID S_REGION * Unique occurrences are identified by PRODUCT_ID and WAREHOUSE_ID Table Descriptions and Data BĆ3 S_CUSTOMER Table SQL> DESCRIBE s_customer Name Null? Type ID NAME PHONE ADDRESS CITY STATE COUNTRY ZIP_CODE CREDIT_RATING SALES_REP_ID REGION_ID COMMENTS NOT NULL NOT NULL NUMBER(7) VARCHAR2(50) VARCHAR2(25) VARCHAR2(400) VARCHAR2(30) VARCHAR2(20) VARCHAR2(30) VARCHAR2(75) VARCHAR2(9) NUMBER(7) NUMBER(7) VARCHAR2(255) Note: The data on the pages to follow has been formatted Use the provided table descriptions for accurate column names BĆ4 Introduction to Oracle: SQL and PL/SQL Using Procedure Builder S_CUSTOMER Table continued SQL> SELECT * FROM s_customer; Continued on Next Page Table Descriptions and Data BĆ5 S_CUSTOMER Table BĆ6 continued Introduction to Oracle: SQL and PL/SQL Using Procedure Builder S_DEPT Table SQL> DESCRIBE s_dept Name Null? Type ID NAME REGION_ID NOT NULL NUMBER(7) NOT NULL VARCHAR2(25) NUMBER(7) SQL> SELECT * FROM s_dept; Table Descriptions and Data BĆ7 S_EMP Table SQL> DESCRIBE s_emp BĆ8 Name Null? Type ID LAST_NAME FIRST_NAME USERID START_DATE COMMENTS MANAGER_ID TITLE DEPT_ID SALARY COMMISSION_PCT NOT NULL NUMBER(7) NOT NULL VARCHAR2(25) VARCHAR2(25) NOT NULL VARCHAR2(8) DATE VARCHAR2(255) NUMBER(7) VARCHAR2(25) NUMBER(7) NUMBER(11,2) NUMBER(4,2) Introduction to Oracle: SQL and PL/SQL Using Procedure Builder S_EMP Table continued SQL> SELECT * FROM s_emp; Table Descriptions and Data BĆ9 S_IMAGE Table SQL> DESCRIBE s_image Name Null? Type ID FORMAT USE_FILENAME FILENAME IMAGE NOT NULL NUMBER(7) VARCHAR2(25) VARCHAR2(25) VARCHAR2(25) LONG RAW SQL> SELECT * FROM s_image; BĆ10 Introduction to Oracle: SQL and PL/SQL Using Procedure Builder S_INVENTORY Table continued SQL> SELECT * FROM s_inventory; Continued on Next Page BĆ12 Introduction to Oracle: SQL and PL/SQL Using Procedure Builder S_INVENTORY continued Continued on Next Page Table Descriptions and Data BĆ13 S_INVENTORY continued Continued on Next Page BĆ14 Introduction to Oracle: SQL and PL/SQL Using Procedure Builder S_INVENTORY Table Descriptions and Data continued BĆ15 S_ITEM Table SQL> DESCRIBE s_item BĆ16 Name Null? Type ORD_ID ITEM_ID PRODUCT_ID PRICE QUANTITY QUANTITY_SHIPPED NOT NULL NUMBER(7) NOT NULL NUMBER(7) NOT NULL NUMBER(7) NUMBER(11,2) NUMBER(9) NUMBER(9) Introduction to Oracle: SQL and PL/SQL Using Procedure Builder S_ITEM Table continued SQL> SELECT * FROM s_item; Continued on Next Page Table Descriptions and Data BĆ17 S_ITEM Table continued Continued on Next Page BĆ18 Introduction to Oracle: SQL and PL/SQL Using Procedure Builder S_ITEM Table Table Descriptions and Data continued BĆ19 S_ORD Table SQL> DESCRIBE s_ord BĆ20 Name Null? Type ID CUSTOMER_ID DATE_ORDERED DATE_SHIPPED SALES_REP_ID TOTAL PAYMENT_TYPE ORDER_FILLED NOT NULL NUMBER(7) NOT NULL NUMBER(7) DATE DATE NUMBER(7) NUMBER(11,2) VARCHAR2(6) VARCHAR2(1) Introduction to Oracle: SQL and PL/SQL Using Procedure Builder ... REGION_ID ID ID ID S_REGION * Unique occurrences are identified by PRODUCT_ID and WAREHOUSE_ID Table Descriptions and Data BĆ3 S_CUSTOMER Table SQL> DESCRIBE s_customer Name Null? Type ID NAME PHONE... SELECT * FROM s_customer; Continued on Next Page Table Descriptions and Data BĆ5 S_CUSTOMER Table BĆ6 continued Introduction to Oracle: SQL and PL/SQL Using Procedure Builder S_DEPT Table SQL>... NUMBER(11,2) NUMBER(4,2) Introduction to Oracle: SQL and PL/SQL Using Procedure Builder S_EMP Table continued SQL> SELECT * FROM s_emp; Table Descriptions and Data BĆ9 S_IMAGE Table SQL> DESCRIBE s_image