+ All Categories
Home > Documents > Chapter 5 Database Processing. Copyright © 2012 Pearson Education, Inc. Publishing as Prentice...

Chapter 5 Database Processing. Copyright © 2012 Pearson Education, Inc. Publishing as Prentice...

Date post: 26-Dec-2015
Category:
Upload: joella-pearson
View: 233 times
Download: 2 times
Share this document with a friend
Popular Tags:
46
Chapter 5 Database Processing
Transcript
  • Slide 1
  • Chapter 5 Database Processing
  • Slide 2
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall2
  • Slide 3
  • 5-3 What Is the Purpose of a Database? Organize and keep track of things Keep track of multiple themes General rule: Single theme store in a spreadsheet Multiple themes require a database
  • Slide 4
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall 5-4 A List of Student Grades Presented in a Spreadsheet Single Theme
  • Slide 5
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall5 Data Redundancy and Data Inconsistency
  • Slide 6
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall 5-6 Student Data Form With Multiple Themes
  • Slide 7
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall 7
  • Slide 8
  • Why we need databases Size Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall 8 Ease of Updating Accuracy Security Redundancy Importance
  • Slide 9
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall9
  • Slide 10
  • Components of a Database 5-10 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 11
  • Tables 5-11 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall Table or file: A group of records
  • Slide 12
  • Tables (contd) 5-12 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall Each table must have a unique identifier called the Primary Key (PK)
  • Slide 13
  • Relationships among tables are created by using foreign keys Relational databases Formal term for a table Relation More Special Terms 1-13 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 14
  • Relational database Database has multiple tables (one for each theme) Values in one table may relate to records in other tables Primary or Unique key Field(s) that uniquely identify a record in a table Each table must have a key Foreign key A non-primary key in one table that is related to a primary key of a different table Relationships Among Records 5-14 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 15
  • Primary and Foreign Keys 5-15 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 16
  • Database: Self-describing collection of integrated records Metadata Data that describes data Makes databases more useful Makes databases easier to use Describes data by: Data type: text, number, date, etc. Field name Field properties Metadata 5-16 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 17
  • Sample Metadata in Access 5-17 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 18
  • Features of Relational Databases 5-18 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 19
  • Features of Relational Databases (contd) 5-19 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 20
  • 20
  • Slide 21
  • Database management system (DBMS)DBMS Program that creates, processes, and administers databases Examples: What Is a DBMS and What Does It Do? 5-21 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall Database Collection of tables, relationships, and metadata DBMS A software program
  • Slide 22
  • Components of a Database Application System 5-22 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 23
  • 5-23 Processing the Database Four DBMS operations 1.Read 2.Insert 3.Modify 4.Delete data
  • Slide 24
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall 5-24 Structured Query Language (SQL) SQL (see-quell) International standard Used by most popular DBMS
  • Slide 25
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall 5-25 Structured Query Language (SQL)
  • Slide 26
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall26
  • Slide 27
  • Database Applications 5-27 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 28
  • Forms Reports Queries Used to read, insert, modify, and delete data Show data in structured context May compute values such as Totals, within a report Are a means of getting answers from database data Forms, Reports, and Queries 5-28 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 29
  • CE7-29 How Are Database Application Systems Developed?
  • Slide 30
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall CE7-30 How Are Database Application Systems Developed?
  • Slide 31
  • 1-31 Something users want to track Order, customer, salesperson, item, volunteer, donation Entities Describe characteristics of an entity OrderNumber, CustomerNumber, VolunteerName, PhoneNumber Attributes Attribute that uniquely identifies one entity instance from other instances Student_ID_Number Identifier What Are the Components of the Entity-Relationship Data (ERD) Model? Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 32
  • Creating ERDs 5-32 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 33
  • Student Data Model Entities Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall CE7-33
  • Slide 34
  • A department may have many advisers An adviser works in one department 1:N relationships An adviser advises many students A student may have one or more advisers N:M relationships Example of Department, Adviser, and Student Entities and Relationships Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall CE7-34
  • Slide 35
  • Example of Department, Adviser, and Student Entities and Relationships 1:N N:M Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall CE7-35
  • Slide 36
  • Entity Relationship Diagram (ERD) Version 1 Crows Feet 1:NN:M N:M = many-to-many relationships One adviser can have many students and one student can have many advisers 1:N = one-to-many relationships One department can have many advisers, but an adviser is in only one department Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall CE7-36
  • Slide 37
  • Entity Relationship Diagram (ERD) Version 2 1:N = one-to-many relationship A student has only one advisor, but an adviser may advise many students N:M = many-to-many relationship A department has many advisors and an advisor may advise for more than one department Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall CE7-37 Crows Foot
  • Slide 38
  • Defining one-to-many relationships 5-38 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 39
  • CE7-39 How Are Database Application Systems Developed?
  • Slide 40
  • Transforming a Data Model into a Database Design Represent each entity with a table Entity identifier becomes table key Entity attributes become table columns Normalize tables as necessary Represent relationships Use foreign keys Create additional tables for N:M relationships Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall CE7-40
  • Slide 41
  • Representing 1:N Relationships Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall CE7-41
  • Slide 42
  • Exploring many-to-many relationships 5-42 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall
  • Slide 43
  • Representing an N:M Relationship: Strategy for Foreign Keys Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall CE7-43
  • Slide 44
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall CE7-44 How Are Database Application Systems Developed?
  • Slide 45
  • Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall45
  • Slide 46
  • Enterprise DBMS Processes large organizational and workgroup databases Supports many users (thousands plus) Examples: DB2, SQL Server, Oracle, MySQL Personal DBMS Designed for smaller, simpler database applications Supports fewer than 100 users (mostly 110 users) Examples: Access, dBase, FoxPro, R-Base What Is the Difference Between an Enterprise DBMS and a Personal DBMS? 5-46 Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall

Recommended