Presentation is loading. Please wait.

Presentation is loading. Please wait.

Today and Tomorrow 12 th Edition Understanding Computers Chapter 14: Databases and Database Management Systems.

Similar presentations


Presentation on theme: "Today and Tomorrow 12 th Edition Understanding Computers Chapter 14: Databases and Database Management Systems."— Presentation transcript:

1 Today and Tomorrow 12 th Edition Understanding Computers Chapter 14: Databases and Database Management Systems

2 Chapter 14 Understanding Computers, 12th Edition 2 Learning Objectives Explain what a database is, including common database terminology, and list some of the advantages and disadvantages of using databases. Discuss some basic concepts and characteristics of data, such as data hierarchy, entity relationships, data definition, and organization. Describe the importance of data integrity, security, and privacy and how they affect database design.

3 Chapter 14 Understanding Computers, 12th Edition 3 Learning Objectives Identify some basic database classifications and discuss their differences. List the most common database models and discuss how they are used today. Understand how a relational database is designed, created, used, and maintained. Describe some ways databases are used on the Web.

4 Chapter 14 Understanding Computers, 12th Edition 4 Overview This chapter covers: –The definition of a database, including database concepts and vocabulary –Key characteristics about the data in a database –Database classifications and models –The relational database model –How databases are used on the Web

5 Chapter 14 Understanding Computers, 12th Edition 5 What Is a Database? Database: A collection of related data stored in a manner so it can be retrieved as needed Database management system (DBMS): Used to create, maintain, and access computer databases –Includes database engine: Part of the program that stores and retrieves the data –Various tools: Used to perform various tasks A database typically consists of: –Tables: Contain fields and records –Fields (columns): Single category of data to be stored in a database –Records (rows): Collection of related fields in a database

6 Chapter 14 Understanding Computers, 12th Edition 6 What Is a Database? Relational database: Data from several tables is tied together (related) using a field that the tables have in common –The most widely used type of database –Primary key: Specific field that uniquely identifies the records in that table Used to relate tables together –PC DBMSs include: Microsoft Access, Corel Paradox, Lotus Approach –For more comprehensive enterprise databases Oracle Database, IBM DB2

7 Chapter 14 Understanding Computers, 12th Edition 7 A Simple Relational Database Example

8 Chapter 14 Understanding Computers, 12th Edition 88 What Is a Database? Individuals Involved with a DBMS: – Users: Use an interface to enter data, update data, and pull information out of the database –Database designers: Design the database –Database developers: Create the database –Database programmers: Write the programs needed to access the database or tie the database to other programs –Database administrators: Responsible for managing the large databases found within an organization

9 Chapter 14 Understanding Computers, 12th Edition 9 The Evolution of Databases

10 Chapter 14 Understanding Computers, 12th Edition 10 Advantages and Disadvantages of the Database Approach Advantages –Better information –Faster response time –Lower operating costs and storage requirements –Improved data integrity –Better data management Disadvantages –Higher software cost –Increased vulnerability (backup is essential)

11 Chapter 14 Understanding Computers, 12th Edition 11 Data Concepts and Characteristics Data hierarchy –Characters –Fields/columns: Hold single pieces of data –Records/rows: Groups of related fields –Tables: Collection of related records –Database: Contains a group of related tables Entity: Something of importance to the organization –Entities that the organization wants to store data about typically becomes a database table –A relationship typically describes an association between two or more entities

12 Chapter 14 Understanding Computers, 12th Edition 12 Data Concepts and Characteristics Attributes: Characteristics of entities –Attributes typically become fields in the entity’s database table Entity relationships –One-to-one (1:1) entity relationships (not common) –One-to-many (O:M) entity relationships (more common) –Many-to-many (M:M) entity relationships (requires a third table to tie the tables together)

13 Chapter 14 Understanding Computers, 12th Edition 13 Data Concepts and Characteristics Data definition: The process of describing the characteristics of data to be included in a database table –During data definition, each field is assigned Name (must be unique within the table) Data type (such as Text, Number, Currency, Date/Time) Description (optional description of the field) Properties (field size, format of the field, allowable range, if field is required, etc.) Finished specifications for a table become the table structure

14 Chapter 14 Understanding Computers, 12th Edition 14 Data Definition

15 Chapter 14 Understanding Computers, 12th Edition 15 Data Definition

16 Chapter 14 Understanding Computers, 12th Edition 16 Data Concepts and Characteristics Data dictionary: Repository of all data definitions in a database –Includes data about the data in the tables (metadata), such as: Table structures Security information (passwords, etc.) Relationships between the tables in the database Current information about each table, such as the current number of records –Ensures that data being entered into the database does not violate any specified criteria

17 Chapter 14 Understanding Computers, 12th Edition 17 Data Concepts and Characteristics Data integrity: The accuracy of data –Quality of data input determines the quality of retrieved information –Data validation: Ensuring that data entered into the database matches the data definition Helps to increase data integrity Record validation rules: Checks all fields before changes to a record are made Can be enforced on a per transaction basis so the entire transaction will fail if one part is invalid –Database locking Prevents two individuals from changing the same data at the same time

18 Chapter 14 Understanding Computers, 12th Edition 18 Data Validation

19 Chapter 14 Understanding Computers, 12th Edition 19 Data Concepts and Characteristics Data security: Protecting data against destruction and misuse –Prevents access from unauthorized individuals –Protects against data loss –Protects against both intentional and unintentional problems –Should include strict backup and disaster-recovery procedures (disaster-recovery plan) –Database activity monitoring programs can be used to detect possible intrusions Data privacy: Growing concern because of the vast amounts of personal data stored in databases today

20 Chapter 14 Understanding Computers, 12th Edition 20 Data Concepts and Characteristics Data organization: Arranging data for efficient retrieval –Indexed organization uses an index to keep track of where data is stored Index: Small table containing a primary key and the location of the record belonging to that key

21 Chapter 14 Understanding Computers, 12th Edition 21 Data Concepts and Characteristics –Direct organization Uses hashing algorithms to specify the exact storage location Location is based on primary key Algorithms should be designed to limit collisions

22 Chapter 14 Understanding Computers, 12th Edition 22 Database Classifications Single-user database system: Designed to be accessed by one user Multiuser database system: Designed to be accessed by multiple users (most business databases today) Client-server database systems: Has both clients and at least one server

23 Chapter 14 Understanding Computers, 12th Edition 23 Database Classifications N-tier database system: Has more than two tiers –Middle tiers contain one or more programs stored on one or more computers

24 Chapter 14 Understanding Computers, 12th Edition 24 Database Classifications Centralized database system: Database is located on a single computer, such as a server or mainframe Distributed database system: Data is physically divided among several computers connected by a network, but the database logically looks like it is a single database Disk-based databases: Data is stored on disk In-memory databases (IMDBs): Data is stored in main memory –Good backup procedures are essential

25 Chapter 14 Understanding Computers, 12th Edition 25 Database Classifications

26 Chapter 14 Understanding Computers, 12th Edition 26 Database Models Two older models –Hierarchical databases: Store data in the form of a tree, with typically a one-to-many relationship between data entities –Network databases: Show the relationship between data elements usually as either one-to-many or many-to-many Relational database management system (RDBMS) –Data is stored in tables related by common fields –Most widely used database model today

27 Chapter 14 Understanding Computers, 12th Edition 27 Database Models

28 Chapter 14 Understanding Computers, 12th Edition 28 The Relational Database Model Properly designing a relational database before creating it is important Basic design steps: –Identify purpose of the database –Determine the tables and fields –Assign fields to tables and minimize redundancy (normalization) First normal form (1NF), Second normal form (2NF), Third normal form (3NF), etc. –Finalize the table structure (data definition)

29 Chapter 14 Understanding Computers, 12th Edition 29 The Relational Database Model Creating a relational database: –Create the structure of each individual table (in Access, can be performed in either Design or Datasheet view) –Enter data Existing data can be migrated to the new database New data can be added via form or the Design view –Modify table structure, as needed, using the Design view –Relate tables as needed

30 Chapter 14 Understanding Computers, 12th Edition 30 The Relational Database Model

31 Chapter 14 Understanding Computers, 12th Edition 31 The Relational Database Model

32 Chapter 14 Understanding Computers, 12th Edition 32 The Relational Database Model

33 Chapter 14 Understanding Computers, 12th Edition 33 The Relational Database Model Query: A request to see information from a database that matches specific criteria –Specifies which records should be retrieved by specifying criteria –Can specify the fields to be displayed –Often written in structured query language (SQL) –Many programs have wizards or other tools to make it easy to create a query –Must be designed to extract information as efficiently as possible –Queries are saved so they can be retrieved again when needed; proper results are displayed each time the query is run

34 Chapter 14 Understanding Computers, 12th Edition 34 The Relational Database Model

35 Chapter 14 Understanding Computers, 12th Edition 35 The Relational Database Model Report: Formatted means of looking at a database table or the results of a query –Reports can pull data from more than one table –Includes headings, formatting, etc. –Many programs have wizards or other tools to make it easy to create a report –Can be modified and customized using the Design view –Reports are saved so they can be retrieved again when needed; proper results are displayed each time the query is run

36 Chapter 14 Understanding Computers, 12th Edition 36 The Relational Database Model

37 Chapter 14 Understanding Computers, 12th Edition 37 The Relational Database Model Relational databases typically require ongoing maintenance –Modifying the table structure when needed –Adding new indexes to speed up queries –Deleting obsolete data –Upgrading database software, installing patches –Repairing/restoring data that has become corrupt –Continuing to evaluate and improve security

38 Chapter 14 Understanding Computers, 12th Edition 38 The Object-Oriented Database Model Object-oriented database management system (OODBMS): Database system in which multiple types of data are stored as objects along with their related code –Objects consist of related attributes stored with methods associated with the object, similar to object-oriented programs –Objects in an OODBMS can contain virtually any type of data—video clip, photograph with a narrative, text with music, and so on—along with its related code –Objects can be retrieved using queries

39 Chapter 14 Understanding Computers, 12th Edition 39 The Object-Oriented Database Model

40 Chapter 14 Understanding Computers, 12th Edition 40 Hybrid Database Models Hybrid database: A combination of database types or models –Hybrid XML/relational database: Can store and retrieve both XML data and relational data –Both types of data can be retrieved using queries or otherwise manipulated

41 Chapter 14 Understanding Computers, 12th Edition 41 Multidimensional Databases Multidimensional database (MDDB): Type of database in which data can be viewed from multiple dimensions or perspectives –Commonly used with data warehousing –Often used in conjunction with online Analytical Processing (OLAP) MOLAP (Multidimensional OLAP): Data is stored in single structures called data cubes ROLAP (Relational OLAP): Data is stored in an existing relational database using tables to store the summary information HOLAP (Hybrid OLAP): Combination of MOLAP and ROLAP technologies

42 Chapter 14 Understanding Computers, 12th Edition 42 Databases and the Web Databases are commonly used on the Web –Information retrieval –Dynamic Web pages (change based on user input) –E-commerce

43 Chapter 14 Understanding Computers, 12th Edition 43 Databases and the Web How Web databases work –Requests to retrieve or store information from or in a Web database is typically initiated by the Web site visitor –Web server converts the request into a database query and passes it onto the database server, and then sends the results back to the visitor –Middleware is used to connect two otherwise separate applications, such as a Web server and a database management system CGI (common gateway interface) API (application interface) PHP (PHP Hypertext Preprocessor)

44 Chapter 14 Understanding Computers, 12th Edition 44 Databases and the Web

45 Chapter 14 Understanding Computers, 12th Edition 45 Summary What Is a Database? Data Concepts and Characteristics Database Classifications Database Models Databases and the Web


Download ppt "Today and Tomorrow 12 th Edition Understanding Computers Chapter 14: Databases and Database Management Systems."

Similar presentations


Ads by Google