Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSIS 115 Database Design and Applications for Business Dr. Meg Fryling “Dr. Meg” Fall #csis115.

Similar presentations


Presentation on theme: "CSIS 115 Database Design and Applications for Business Dr. Meg Fryling “Dr. Meg” Fall #csis115."— Presentation transcript:

1 CSIS 115 Database Design and Applications for Business Dr. Meg Fryling “Dr. Meg” Fall 2012 @SienaDrMeg #csis115

2 Agenda Questions? –Syllabus, Course Schedule, etc. Homework Spreadsheet vs Database revisited (cont.) Chapter 1(Briefly) Chapter 2

3 Homework Homework P1 –Was due at the beginning of class! –Let’s finish intros. Homework 1 –Due Wednesday (9/12) by beginning of class Project – Part I –Due Monday (9/17) by beginning of class Finish Reading Chapter 1, 2 (Skip 48-56 and 63-82), & Appendix A (Online) –http://wps.prenhall.com/bp_kroenke_database_12/http://wps.prenhall.com/bp_kroenke_database_12/ Start Reading Chapters 5 and 3 (100-105 only) 1-3

4 Vet Clinic Spreadsheet Why is this not a good solution? 1-4

5 Database Benefits Databases allow us to organize data in a structured way Eliminate (or at least significantly reduce) data duplication Database user interfaces help Prevent Data Errors 1-5

6 Components of a Database System with SQL KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-6 Homework 1

7 Applications, the DBMS, and SQL Applications are the computer programs that users work with. The Database Management System (DBMS) creates, processes, and administers databases. Structured Query Language (SQL) is an internationally recognized standard database language that is used by all commercial DBMSs. KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-7

8 Structure of the Vet Database Assignments > In-Class Activities > DB vs SS > Vet Clinic DB 1-8

9 The Tables Where the data is stored 1-9 Students – Refer to the database relationships as I advance through the next 3 slides.

10 ClientID is a… A.Table B.Field C.Huh? 1-10

11 ClientID in the CLIENTS table is… A.A primary key B.A surrogate key C.A foreign key D.An alternate key E.What? 1-11

12 AnimalID in the VISITS table is… A.A primary key B.A surrogate key C.A foreign key D.An alternate key E.No clue 1-12

13 What type of relationship exists between the CLIENTS and ANIMALS tables? A.One-to-one (1:1) B.One-to-Many (1:N) C.Many-to-Many (M:N) D.None of the above E.Does she really expect us to know this stuff?? 1-13

14 Data in Tables KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-14 What is the relationship between STUDENT and CLASS?

15 The Key Characteristic of Databases: Related Tables KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-15

16 Naming Conventions in this Textbook Table names are written with all capital letters: –STUDENT, CLASS, GRADE –Typically singular not plural Column names are written with an initial capital letter, and compound names are written with a capital letter on each word: –Term, Section, ClassNumber, StudentName KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-16

17 Databases Create Information Data = recorded facts and figures Information = knowledge derived from data Databases record data, but they do so in such a way that we can produce information from the data. –The data on STUDENTs, CLASSes, and GRADEs could produce information about each student’s GPA. KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-17

18 Components of a Database System with SQL KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-18

19 Applications, the DBMS, and SQL Applications are the computer programs that users work with. The Database Management System (DBMS) creates, processes, and administers databases. Structured Query Language (SQL) is an internationally recognized standard database language that is used by all commercial DBMSs. KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-19

20 Components of a Database System with SQL KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-20

21 Database Applications KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-21

22 The Startup Screen: Switchboard Main Menu 1-22

23 The Registration Screen 1-23

24 DB – Data Validation Add yourself as new client with the following info: –Zip Code: 02569 –Phone Number: 518 459 87765 –Give each animal (pet) at least one visit date. –For the appointment dates try: 12/35/2004 and 6/10/1905. –For the cost of the visit make one entry of over $500. 1-24

25 Which of these did you observe while entering data? A.Impossible date was detected B.Too many digits in a phone number was detected C.Unlikely bill amount was detected D.Leading zero kept in zip code E.All of the above 1-25

26 Which is true about entering a new client, pets, and vet visits? A.Client data had to be duplicated for each pet. B.Pet data had to be duplicated for each visit. C.Data did not need to be duplicated. D.Data was automatically entered for each pet. E.None of the above 1-26

27 What difference did you observed between entering data into a Spreadsheet vs. a Database? A.Database automatically corrected the data entered. B.Spreadsheet applied no required format checks, but the Database did. C.Database did not prevent possible errors, while the Spreadsheet did. D.There were no real differences between them. E.None of the above 1-27

28 In order to prevent errors in data entry, what must be true for the database? A.Each data field has to have a proper data. B.The database must hold additional data about each field telling what constitutes correct format for that field. C.The database has to have the ability to undo the entered data D.The database has to have a way of storing correct data. E.I have no idea! 1-28

29 Database Applications: Queries and Reports “Cats only” Query –Design View –SQL View –How can we make this query better? “Clients with Cats” Report –Where is this data coming from? –Advantages over a spreadsheet? 1-29

30 Components of a Database System with SQL KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-30

31 The DBMS KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-31

32 1-32 Database Contents KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

33 Typical Metadata Tables KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-33 Note: These types of tables are hidden in Microsoft Access but you would see them in databases created with other DBMS

34 1-34 Personal Database Systems: Microsoft Access KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

35 1-35 Microsoft Access Low-end product intended for individual users and small workgroups. Hides much of the underlying database technology from the user. A good strategy for beginners, but not for database professionals. NOTE: Microsoft Access 2007 is discussed in detail in Appendix A of your textbook. –http://wps.prenhall.com/bp_kroenke_database_12/http://wps.prenhall.com/bp_kroenke_database_12/ KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

36 1-36 What Is Microsoft Access? Microsoft Access is a DBMS Creates, processes, and administers Microsoft Access databases. PLUS an application generator –The application generator includes query (QBE), form, and report components. KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

37 1-37 Enterprise-Class Database Systems KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

38 1-38 Prominent DBMS Products Microsoft Access Microsoft SQL Server 2008 Oracle Corporation Oracle Database 11g MySQL 5.1 IBM DB2 What is OpenOffice.org? KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

39 1-39 DBMS Power vs. Ease of Use KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

40 What You Need To Learn KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-40

41 A Brief History of Database Processing KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-41

42 A Brief History of Database Processing KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-42

43 The Relational Database Model The dominant database model is the relational database model—all current major DBMS products are based on it. It was created by IBM engineer E. F. Codd in 1970. It was based on mathematics called relational algebra. This text examines and explains the relational database model. KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-43

44 Three Types of Database Design KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-44

45 Database Design from Existing Data KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-45

46 Database Design from Existing Data KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-46 Vet Clinic Spreadsheet Vet Clinic Database

47 Data Import: One or Two Tables? This is an important decision, and based on a set of rules known as normalization (which is covered in Chapter 3). KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-47

48 Database Design from New Systems Development Entity-Relationship data modeling is covered in Chapter 5, and data model transformations to database designs are covered in Chapter 6. KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-48 ER DiagramDatabase

49 Chapter 2 Let’s take a look at the “language” we use to “talk” with relational databases Chapter 2 (skip 48-56 and 63–82) 1-49

50 Components of a Database System with SQL KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall 1-50

51 3-51 Structured Query Language Acronym: SQL Pronounced as “S-Q-L” [“Ess-Que-El”] –Also pronounced as “Sequel” Originally developed by IBM as the SEQUEL language in the 1970s SQL-92 is an ANSI national standard adopted in 1992 Newer versions exist, and incorporate XML and some object-oriented concepts.

52 SQL as a Data Sublanguage Not a full featured programming language –C, C#, Java Data sublanguage for creating and processing database data and metadata Ubiquitous in enterprise-class DBMS products A critical skill! KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall 2-52

53 SQL DDL and DML SQL statements can be divided into two categories: –Data definition language (DDL) statements Used for creating database structures –tables, relationships (constraints), and other structures. Covered in Chapter 7. –Data manipulation language (DML) statements Used for data retrieval and modification queries. These are the type of queries you used in CSIS114! Covered in this chapter (Chapter 2). KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall 2-53

54 The SQL SELECT Statement The fundamental framework for SQL query states is the SQL SELECT statement. –SELECT{ColumnName(s)} –FROM{TableName(s)} –WHERE{Conditions} All SQL statements end with a semi-colon (;). KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall 2-54

55 Let’s Explore the Cape Codd Retail Sales Data Mart Database Cape Codd Outdoor Sports is a fictitious company based on an actual outdoor retail equipment vendor. The Cape Codd marketing department needs an analysis of in-store sales. The entire database is not needed for this, only an extraction of retail sales data. The data is extracted by the IS department from the operational database into a separate, off- line database for use by the marketing department. –Data Mart –Data Warehouse KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall 2-55

56 In-Class Activity: SQL Basics Assignments > In-Class Activity > SQL Basics Download the “SQL Basics.docx” and “Cape-Codd.accdb” files to your CSIS115 folder on the CS Server (Z Drive). Open SQL Basics.docx –We will use shortly Open the Cape-Codd.accdb database 1-56

57 Retail Sales Extract Tables KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall 2-57 Note: your DB has more than 3 tables

58 SQL Basics In-Class Activity Part I Only Open “SQL Basics.docx” 1-58


Download ppt "CSIS 115 Database Design and Applications for Business Dr. Meg Fryling “Dr. Meg” Fall #csis115."

Similar presentations


Ads by Google