Chapter 5 PP Slides
Upcoming SlideShare
Loading in...5
×
 

Chapter 5 PP Slides

on

  • 547 views

 

Statistics

Views

Total Views
547
Views on SlideShare
547
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Chapter 5 PP Slides Chapter 5 PP Slides Presentation Transcript

    • 5- Chapter 5 Database Processing
      • Q1 – What is the purpose of a database?
      • Q2 – What is a database?
      • Q3 – What are the components of a database application system?
      • Q4 – How do database applications make databases more useful?
      • Q5 – How are data models used for database development?
      • Q6 – How is a data model transformed into a database design?
      • Q7 – What is the user’s role in the development of databases?
      • Q8 – What are the responsibilities for database administration?
      5-
      • As a database user, you play a crucial role in developing database applications for your business or organization.
      • A database tracks things involving more than one theme.
        • For example: we may want to track customers by:
          • Customer number or Last name
          • Home address (community tells a lot about a person)
          • Number of sales
          • Items purchased
      5-
      • These are terms you’ll need to know when working with databases.
        • A database is a collection of integrated records.
        • Bytes , characters of data, are grouped into columns which are also called fields .
        • The fields are grouped into rows which are also called records .
        • A table is a group of similar rows or records which is also called a file .
      5-
    • 5-
      • This figure shows the hierarchy of data elements working from the smallest at the bottom to the largest at the top.
    • 5-
      • This diagram shows relationships among rows of different tables.
      • The Student Number value in the first row of the top table,1325, relates to the same Student Number value in a row in the second table.
      • Both that Student Number value and that of 4867 in the second table relate to those in the third.
      • Keys are a column that identifies a unique row in a table. In the Student Table, the primary key is Student Number.
      • A primary key, Student Number, can act as a foreign key in a different table, like the Office Visit Table.
      • A relational database
      • carries data in the
      • form of tables and
      • uses foreign keys
      • to represent relationships
      5-
      • By itself, a database is not very useful because there’s no way to easily manage the data and turn it into useful information.
      • A database application system makes database data more accessible and useful by using forms, formatted reports, queries, and application programs to provide useful information to users.
      5-
      • A DBMS program is used to create, process, and administer a database.
        • Popular DBMS products include:
          • DB2 from IBM
          • Access from Microsoft (for personal computers)
          • SQL Server from Microsoft (for large computer systems)
          • Oracle from Oracle Corporation
          • MySQL, an open-source product that’s license-free
      • It’s easy to confuse a DBMS, which is a software program, with a database, which is a collection of tables, relationships and metadata. But, they are two different concepts.
      5-
      • DBMSs are used to process databases by reading, inserting, modifying, or deleting data.
        • The Structured Query Language (SQL), is an international standard language used by most major DBMS programs for processing databases.
      • A DBMS includes tools to help you administer a database. You can
          • Set up a security system that includes permissions and passwords.
          • Back up the data to prevent it from being lost or compromised.
          • Improve the performance of applications by adding structures.
          • Remove data that’s no longer needed.
      5-
      • A database application includes forms, reports, queries, and applications programs available to one or more users.
      • This figure shows three different applications stemming from a single DBMS and a single database.
      5-
      • Data entry forms are used to read, insert, modify, and delete data.
      • Reports are used to show data in a structured context as the example to the right shows.
      © Pearson Prentice Hall 2009 5-
      • Here’s a comparison of an Enterprise DBMS versus a Personal DBMS.
      5-
        • Enterprise DBMS
          • Large organizational and workgroup databases
          • Thousands of users
          • Many different database applications
          • 24/7 operations
          • DB2, SQL Server, Oracle
        • Personal DBMS
          • Smaller, simpler applications
          • Personal or small workgroup applications
          • Fewer than 100 users
          • Microsoft Access is both a DBMS and application development product as this figure depicts.
      • User involvement is critical for database development for these reasons:
        • A database’s design depends on how users view their business environment and how they do their jobs.
        • Database developers do not and cannot know what to include because they don’t work with the data everyday. They must rely on users to tell them what data are important and how they’re used.
      • A data model is similar to blueprints for a house. It’s a logical representation of database data that describes data and their relationships.
      © Pearson Prentice Hall 2009 5- Fig 5-15 Database Development Process
      • An entity-relationship data model helps developers define things (entities) that will be stored in the database as they are building a data model. It also defines relationships among those entities.
      • Entities are things users want to track. It can be a physical object (inventory items) or a logical transaction (sales order). The names are always singular.
      • Each entity has attributes that describe its characteristics. The entity “Order” has attributes like “OrderNumber” and “OrderDate”.
      • An identifier is an attribute whose value is associated with one and only one entity instance. “OrderNumber” is the identifier for the “Order” entity because there should only be one number for each order.
      © Pearson Prentice Hall 2009 5-
      • Fig 5-16 Student Data Model Entities
      © Pearson Prentice Hall 2009 5-
      • Student, Department, Advisor, Email, and Office_Visit are the entity names in this model.
      • The entity identifiers are StudentNumber, DeptName, and AdvisorName. Not all entities require an identifier.
      • Relationships join one entity to another entity
        • One-to-one – 1:1
        • One-to-many – 1:N
        • Many-to-many – N:M
      • This diagram shows that each Department Entity can have multiple Adviser Entities in a one-to-many relationship. Adviser Entities can have a many-to-many relationship with Student Entities.
      5-
      • The line style between entities describes the type of relationship as shown in the entity-relationship diagram below.
      • This diagram depicts crow’s feet between the entities to describe the relationships. It shows a one-to-many (1:M) relationship between Department and Adviser and a many-to-many (N:M) relationship between Adviser and Student entities.
      5-
    • 5-
      • Converting a poorly structured table into two or more well-structured tables is called normalization.
      • The table below is poorly designed because it includes the DeptName as part of the Employee record, making it difficult to update.
      • It also creates data integrity
      • problems because
      • the DeptName is not
      • consistent throughout
      • the table after the
      • data were updated.
      • Normalizing the tables by splitting the Department data into a separate table, as shown below, allows each table to describe a single topic or theme. The tables have been transformed into a normal form.
      • By eliminating the duplicate data, you eliminate data integrity problems. That’s called
      • normalizing for data integrity.
      • Now, the department
        • name only needs to
        • be updated in one place
        • in the normalized tables.
      5-
      • This chart shows the necessary steps to transform a data model into a relational database design.
      5-
    • 5-
      • The figures below and on the next slide depict the steps used to create a well structured database that will produce useful information.
      • The figure on the left represents the relationship between tables. The figure on the right shows a normalized table for each entity.
    • 5-
      • The figure below shows how relationships are represented using foreign keys. It’s the last step in transforming a data model into a database design.
      • Your role in the database development process is to decide what data should be included and how records should relate to one another.
      • The best time to change a database structure is during the data modeling stage. It’s easier and cheaper to change your mind before anything is actually built. The costs of correcting the database in time and money later on may be very high.
      • Each entity must contain all the data you need to do your job.
      • Each relationship must accurately reflect the appropriate view of your business.
      • You must be the final judge of how well the database will serve your needs. Do not go forward until the data model is accurate.
      5-
      • Databases are an important resource for most businesses.
      • As databases touch more aspects of systems and business functions, the utility of a database increases as do potential problems.
      • Database administration manages the development, operation, and maintenance of databases.
      • Database administration must protect the database and maximize its availability for authorized use.
      © Pearson Prentice Hall 2009 5-
    • © Pearson Prentice Hall 2009 5-
      • Database administration tasks are divided into four categories as shown below and on the next slide.
    • 5-