Description of Database Used in Introduction to Databases Tutorial

advertisement
Description of Database Used in Introduction to Databases Tutorial There are four tables from the db_pvfc9_std database used in the tutorial. The following are descriptions of these four tables. You should be able to interpret the meaning of the other tables and their columns once you understand these four tables. To see the columns of the other tables via SQL Assistant / Web Edition, simply click the mouse on the + next to the table name, then click the + next to Columns. Customer_t (primary key is Customer_ID) Customers of Pine Valley Furniture Company Column Name Description Format Customer_ID Unique value to Integer identify each customer Customer_Name Name of customer Up to 25 characters Customer_Address Street address of Up to 30 customer characters Customer_City City address of Up to 20 customer characters Customer_State State address of Up to 2 characters customer (abbreviation) Postal_Code Postal code of Up to 9 characters customer (just the digits) Foreign Key X‐Ref Other Primary key Order_t (primary key is Order_ID) Orders received from customers by Pine Valley Furniture Company Column Name Description Order_ID Unique value to identify each Order Date order was placed ID of customer placing the order Order_Date Customer_ID Format Foreign Key X‐Ref Integer (only a few digits) Other Calendar date Integer References Customer_ID is Customer_t table Description of Database Used in Introduction to Databases Tutorial Primary key Page 1 Product_t (primary key is Product_ID) Products sold and made by Pine Valley Furniture Company Column Name Description Product_ID Unique value to identify each product Product_Description Brief narrative description of product Product_Finish The exterior appearance of the product (usually a type of wood) Standard_Price The published price of the product Product_Line_ID ID of product line to which this product is assigned Format Foreign Key X‐Ref Primary key Up to 50 characters Up to 20 characters Integer A number with up to 13 digits to left of decimal point, decimal point, and four digits to right of decimal point Integer References Product_Line_ID in Product_Line_t table Other Order_Line_t (primary key is combination of Order_ID and Product_ID) Line items on an order (i.e., indicates how much of a given product is sold on a given order) Column Name Description Order_ID Unique value to identify each Order Unique value to identify each Product The number of units of the product on this order Product_ID Ordered_Quantity Format Foreign Key X‐Ref Integer (only a few References digits) Order_ID in Order_t table Integer References Product_ID in Product_t table Integer Description of Database Used in Introduction to Databases Tutorial Other Primary key Primary key Page 2 Other Tables and Their Meanings Table Does_Business_In_t Employee_Skills_t Employee_t Produced_In_t Product_Line_t Raw_Material_t Salesperson_t Skill_t Supplies_t Territory_t Uses_t Vendor_t Works_in_t Work_Center_t Meaning Each row indicates a territory in which a customer does business Each row indicates a skill possessed by an employee Employees of Pine Valley Furniture Company Each row indicates a work center in which a product is produced/made Categories for grouping products (e.g. Country Look) A raw material used to make products Someone who serves (makes sales in) a territory A skill needed to make products in Pine Valley Furniture Company Each row indicates a vendor who can supply a raw material and at what unit price A geographical area Each row indicates the quantity of a raw material needed to make a product Another company or individual who is able to supply raw materials to Pine Valley Furniture Company Each row indicates a work center in which an employee can work A manufacturing unit/department of Pine Valley Furniture in which one kind of work is done (e.g., painting/staining or final assembly) You can see a diagram (called an entity‐relationship diagram) of the full database (with some of the table columns) in Figure 3‐22 of Modern Database Management 9th Edition, by Hoffer, Prescott, and Topi, published by Prentice Hall. Description of Database Used in Introduction to Databases Tutorial Page 3 
Download