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: Maximize the following: 1.Data redundancy 2.Data isolation 3.Data inconsistency 1.Data security 2.Data integrity 3.Data independence
How is data organized in a DB: Data Hierarchy Field Record File (or table) Database Is a grouping of
Data Hierarchy (continued) Field Record Database Table
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 CustomersData_TypeField Size CustomerIDText5 FirstNameText50 LastNameText100 AddressText150 CityText30 StateText2 PostalCodeTextInput Mask PhoneNumTextInput Mask ProductsData_TypeField Size ProductIDText5 ProductNameText50 CategoryText50 Cost? OrdersData_TypeField Size OrderNo? CustomerID?? ProductID?? OrderDate?
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 CustomerIDFirstNameLastNameAddressCItyStatePostalCodePhoneNumber 1111MichaelJordan123 Anywhere RdWilmingtonNC28401(910) LarryBird456 Somewhere StFrench LickIN47432(812) IrvinJohnson789 Nowhere AveLos AngelesCA90001(213) Products ProductIDProductNameCategoryCost 00001BasketballSporting Goods$ ShortsApparel$ ShoesApparel$75.00 Orders OrderNoCustomerIDProductIDOrderDate /18/ /18/ /18/ /20/2012 autonumber
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?