Discovering Computers Fundamentals 3rd Edition by liamei12345

VIEWS: 5 PAGES: 31

									Chapter 9
Database
Management
    Databases, Data and Information
     •    What is a database?
   Collection of data
                                                                      Database software
     organized so
                                    Database software                also called database
    you can access,
                                      allows you to                  management system
     retrieve, and
                                                                           (DBMS)
          use it
                                                           Create
                         Create                            forms
                        database                            and
                                     Add,         Sort     reports
                                    change,       and
                                   and delete   retrieve
         GIGO                         data        data




p. 332
     The Hierarchy of Data
     •     Database contains files, file contains records, record contains
           fields, field contains characters




Fig. 9-2
     The Hierarchy of Data - Field
     •     Combination of one or more
           characters
     •     Smallest unit of data user accesses
     •     Field name
     •     Field size
     •     Data type specifies kind of data
           field contains



Fig. 9-3
    The Hierarchy of Data – Data Types
     •    What are common data types? Numeric
                Text                                                       AutoNumber
                  (also called                  numbers               unique number automatically
            alphanumeric)—letters,                only                 assigned to each new record
              numbers, or special
                  characters



               Currency                       Date                            Memo
          dollar and cent amounts or   month, day, year, and             lengthy text entries
         numbers containing decimal      sometimes time
                    values


                                                                            Object
                Yes/No                      Hyperlink              photograph, audio, video, or
          only the values Yes or       Web address that links to    document created in other
          No (or True or False)         document or Web page         application such as word
                                                                    processing or spreadsheet



p. 335
     The Hierarchy of Data – Records and Files
     •     Record = group of related fields
           – Key field (primary key)
     •     File = Collection of related records




Fig. 9-4
    Maintaining Data - File maintenance




p. 336
     Maintaining Data – Validating Data
     •     Comparing data with a set of rules
     •     Reduce data entry errors and enhance data integrity
           before program writes data on disk
     •     Check Digit




Fig. 9-8
    File Processing Versus Databases
     •   File processing system
                Each
                              Records in one
           department or
                               file may not
             area within                                    May have
                                  relate to
            organization                                    weaknesses
                              records in any
           has own set of
                                 other file
                files


                                                    Data           Isolated
                                               redundancy—        data—data
                                                 same fields       stored in
                                                  stored in      separate files
                                                multiple files      so it is
                                                                  difficult to
                                                                     access
p. 341
     File Processing Versus Databases
     •     Database approach
     •     Many programs and users can share data in database




Fig. 9-9
    File Processing Versus Databases
     •   Strengths of the database approach?

       Reduced
        data
     redundancy    Improved
                      data
                    integrity
                                Shared
                                 data
                                               Easier
                                               access
                                                          Reduced
                                                        development
                                                            time

p. 342
     File Processing Versus Databases
     •How do they
     store data?




Fig. 9-10
     Database Management Systems




Fig. 9-11
     Database Management Systems
Data
  dictionary
• Contains
  data
  about
  each file
  and each
  field




Fig. 9-12
     Database Management Systems - Query
     •      Query
            Language
            – SQL




Fig. 9-13
     Database Management Systems - QBE
Query by example (QBE)




Fig. 9-14
    Database Management Systems - Forms
•        Window for
         entering or
         changing data in
         database
•        Used to retrieve
         and maintain
         data
•        Can validate
         data


p. 345
    Database Management Systems - Forms
•        Window for
         entering or
         changing data in
         database
•        Used to retrieve
         and maintain
         data
•        Can validate
         data


p. 345
     Database Management Systems
     Report generator
     •     Also called
           report writer
     •     Design a
           report
     •     Categorize
           data,
           subtotals,
           totals, etc.


p. 346 Fig. 9-15
    Database Management Systems
     Backups and logs
     •   Backup is a copy of the entire database
     •   Log is a listing of activities that change database contents
     •   A recovery utility uses the logs and/or backups to restore
         a database




p. 346
Database Management Systems
Data security
                                                  Access
           DBMS provides                        privileges
           means to ensure                   define activities
           only authorized                  that specific user
           users can access                 or group of users
           data at permitted                   can perform
                 times

                                user can
                                                                   user can
                               view data,
                                                                  view and
                               but cannot
                                                                 change data
                                change it
   Relational, Object-Oriented, and Multidimensional
   Databases
     Data model
     •   Rules and standards that define how database
         organizes data
     •   Three popular data models
         – Relational (Oracle, Access, Microsoft SQL Server))
         – Object-oriented
         – Multidimensional

p. 347
Relational Databases

     •      Stores data in tables that consist of rows and columns
     •      Each row has primary key
     •      Each column has unique name
     •      Stores data relationships




Fig. 9-16
Relational Databases

     Relationship between
       tables
     •     Use key fields




p. 348 Fig. 9-17
Relational Databases
     Structured Query Language (SQL)
     •      Allows you to manage, update, and query data
     •      Has special keywords and rules (syntax)




Fig. 9-18
Object-Oriented Databases
     Object-oriented database (OODB)?
     •   Object is item that contains data, as well as actions that
         read or process data
     •   Object query language (OQL)




p. 349
Multidimensional Databases

     •   Dimensions = Time + …………. + ………………



                           Stores data in
                            dimensions

                     Allow users to analyze any
                            view of data




p. 349
Data Warehouse
         Huge database system that stores and manages data
             required to analyze historical and current
                            transactions
         Quick and efficient
         way to access large   Data mart is smaller version of
          amounts of data            data warehouse

                                 Uses
                           multidimensional
                              databases




p. 349
    Web Databases
     •   Database you access through the Web by filling in a form
         on a Web page
     •   Usually resides on a database server




p. 350
    Database Design
         1. Determine
                          •
                         the purpose of the database

         2. Design the tables              3. Design the records and fields
          Design tables on paper first    for each table
          Each table should contain       Be sure every record has a unique
            data about one subject          primary key
                                           Use separate fields for logically
                                            distinct items
                                           Do not create fields for information
                                            that can be derived from entries in
         4. Determine the
                                            other fields
           relationships among             Allow enough space for each field
           the tables                      Set default values for frequently
                                            entered data


p. 351
    Database Administration
     •Roles of the database analyst and administrator
             Database analyst (DA)        Database administrator
              Decides proper placement   (DBA)
               of fields, defines          Creates and maintains data
               relationships, and           dictionary, manages
               identifies users’ access     database security,
               privileges                   monitors database
                                            performance, and checks
                                            backup and recovery
                                            procedures



p. 351

								
To top