Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Intro to Access and Data Management Announcements • No Class – Monday • Chapter 5 – Wednesday • Access Tutorial & DB Creation - Friday The Database Approach Database management system (DBMS) Minimize the following problems: 1. Data redundancy 2. Data isolation 3. Data inconsistency Maximize the following: 1. Data security 2. Data integrity 3. Data independence How is data organized in a DB: Data Hierarchy Field Is a grouping of Record Is a grouping of File (or table) Is a grouping of Database Data Hierarchy (continued) Field Table Database Record Database Management Systems Database management system (DBMS) Focus of this course: Relational database model Related Tables (Primary Keys Important) Data dictionary How do you request data? Structured Query Language (SQL) - keywords Query by Example (QBE) – forms/templates Relational DB Effectiveness: Normalization Normalization (most streamlined DB) Minimum redundancy Maximum data integrity Best processing performance Normalized data occurs when attributes in the table depend only on the primary key. Exercise #1 – Online Shopping DB Create a new DB called OnlineShopping that will consist of three tables. Customers Orders Products Exercise #1 – Online Shopping DB Customers Data_Type Field Size CustomerID FirstName LastName Address City State PostalCode PhoneNum Text Text Text Text Text Text Text Text 5 50 100 150 30 2 Input Mask Input Mask Products ProductID ProductName Category Cost Data_Type Field Size Text Text Text ? 5 50 50 Orders OrderNo CustomerID ProductID OrderDate Data_Type Field Size ? ? ? ? ? ? Exercise #1 – Online Shopping DB Create the appropriate relationships for the tables in your database. Customers -> Order Products -> Order Exercise #1 – Online Shopping DB Enter information into tables. Customers CustomerID FirstName LastName Address CIty State PostalCode PhoneNumber 1111 Michael Jordan 123 Anywhere Rd Wilmington NC 28401 (910) 555-5555 2222 Larry Bird 456 Somewhere St French Lick IN 47432 (812) 555-5555 3333 Irvin Johnson 789 Nowhere Ave Los Angeles CA 90001 (213) 555-5555 Products ProductID ProductName Category 00001 Basketball Sporting Goods 00002 Shorts Apparel 00003 Shoes Apparel Cost $25.00 $20.00 $75.00 Orders OrderNo CustomerID ProductID 1 1111 00002 2 2222 00001 3 3333 00003 4 1111 00001 autonumber OrderDate 9 /18/2012 9 /18/2012 9 /18/2012 9 /20/2012 Exercise #1 – Online Shopping DB Create a query to answer the following question: What is the total amount spent on all orders by each customer?