Database System Concepts And Architecture - TINMAN

Transcription

Chapter 2DatabaseSystemConcepts andArchitectureCopyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Chapter 2 Outline Data Models, Schemas, and Instances Three-Schema Architecture and DataIndependence Database Languages and Interfaces The Database System Environment Centralized and Client/Server Architecturesfor DBMSs Classification of Database ManagementSystemsCopyright 2011 Ramez Elmasri and Shamkant Navathe

Database System Conceptsand Architecture Basic client/server DBMS architecture Client moduleServer moduleCopyright 2011 Ramez Elmasri and Shamkant Navathe

Data Models, Schemas, andInstances Data abstraction Suppression of details of data organization andstorageHighlighting of the essential features for animproved understanding of dataCopyright 2011 Ramez Elmasri and Shamkant Navathe

Data Models, Schemas, andInstances (cont'd.) Data model Collection of concepts that describe thestructure of a databaseProvides means to achieve data abstractionBasic operations Specify retrievals and updates on the database Dynamic aspect or behavior of a databaseapplication Allows the database designer to specify a set ofvalid operations allowed on database objectsCopyright 2011 Ramez Elmasri and Shamkant Navathe

Categories of Data Models High-level or conceptual data models Close to the way many users perceive data Low-level or physical data models Describe the details of how data is stored oncomputer storage media Representational data models Easily understood by end usersAlso similar to how data organized in computerstorageCopyright 2011 Ramez Elmasri and Shamkant Navathe

Categories of Data Models(cont'd.) Entity Represents a real-world object or concept Attribute Represents some property of interestFurther describes an entity Relationship among two or more entities Represents an association among the entitiesEntity-Relationship modelCopyright 2011 Ramez Elmasri and Shamkant Navathe

Categories of Data Models(cont'd.) Relational data model Used most frequently in traditional commercialDBMSs Object data model New family of higher-level implementation datamodelsCloser to conceptual data modelsCopyright 2011 Ramez Elmasri and Shamkant Navathe

Categories of Data Models(cont'd.) Physical data models Describe how data is stored as files in thecomputerAccess path Structure that makes the search for particulardatabase records efficient Index Example of an access path Allows direct access to data using an index term ora keywordCopyright 2011 Ramez Elmasri and Shamkant Navathe

Schemas, Instances, andDatabase State Database schema Description of a database Schema diagram Displays selected aspects of schema Schema construct Each object in the schema Database state or snapshot Data in database at a particular moment in timeCopyright 2011 Ramez Elmasri and Shamkant Navathe

Schemas, Instances, andDatabase State (cont'd.)Copyright 2011 Ramez Elmasri and Shamkant Navathe

Schemas, Instances, andDatabase State (cont'd.) Define a new database Specify database schema to the DBMS Initial state Populated or loaded with the initial data Valid state Satisfies the structure and constraints specifiedin the schemaCopyright 2011 Ramez Elmasri and Shamkant Navathe

Schemas, Instances, andDatabase State (cont'd.) Schema evolution Changes applied to schema as applicationrequirements changeCopyright 2011 Ramez Elmasri and Shamkant Navathe

Three-Schema Architectureand Data Independence Internal level Describes physical storage structure of thedatabase Conceptual level Describes structure of the whole database for acommunity of users External or view level Describes part of the database that a particularuser group is interested inCopyright 2011 Ramez Elmasri and Shamkant Navathe

Three-Schema Architectureand Data Independence (cont'd.)Copyright 2011 Ramez Elmasri and Shamkant Navathe

Data Independence Capacity to change the schema at one levelof a database system Without having to change the schema at thenext higher level Types: LogicalPhysicalCopyright 2011 Ramez Elmasri and Shamkant Navathe

DBMS Languages Data definition language (DDL) Defines both schemas Storage definition language (SDL) Specifies the internal schema View definition language (VDL) Specifies user views/mappings to conceptualschema Data manipulation language (DML) Allows retrieval, insertion, deletion, modificationCopyright 2011 Ramez Elmasri and Shamkant Navathe

DBMS Languages (cont'd.) High-level or nonprocedural DML Can be used on its own to specify complexdatabase operations conciselySet-at-a-time or set-oriented Low-level or procedural DML Must be embedded in a general-purposeprogramming languageRecord-at-a-timeCopyright 2011 Ramez Elmasri and Shamkant Navathe

DBMS Interfaces Menu-based interfaces for Web clients orbrowsing Forms-based interfaces Graphical user interfaces Natural language interfaces Speech input and output Interfaces for parametric users Interfaces for the DBACopyright 2011 Ramez Elmasri and Shamkant Navathe

The Database SystemEnvironment DBMS component modules Buffer managementStored data managerDDL compilerInteractive query interface Query compiler Query optimizer PrecompilerCopyright 2011 Ramez Elmasri and Shamkant Navathe

The Database SystemEnvironment (cont'd.) DBMS component modules Runtime database processorSystem catalogConcurrency control systemBackup and recovery systemCopyright 2011 Ramez Elmasri and Shamkant Navathe

Copyright 2011 Ramez Elmasri and Shamkant Navathe

Database System Utilities Loading Load existing data files Backup Creates a backup copy of the databaseCopyright 2011 Ramez Elmasri and Shamkant Navathe

Database System Utilities(cont'd.) Database storage reorganization Reorganize a set of database files into differentfile organizations Performance monitoring Monitors database usage and providesstatistics to the DBACopyright 2011 Ramez Elmasri and Shamkant Navathe

Tools, Application Environments,and Communications Facilities CASE Tools Data dictionary (data repository) system Stores design decisions, usage standards,application program descriptions, and userinformation Application development environments Communications softwareCopyright 2011 Ramez Elmasri and Shamkant Navathe

Centralized and Client/ServerArchitectures for DBMSs Centralized DBMSs Architecture All DBMS functionality, application programexecution, and user interface processingcarried out on one machineCopyright 2011 Ramez Elmasri and Shamkant Navathe

Copyright 2011 Ramez Elmasri and Shamkant Navathe

Basic Client/Server Architectures Servers with specific functionalities File server Maintains the files of the client machines. Printer server Connected to various printers; all print requests bythe clients are forwarded to this machine Web servers or e-mail serversCopyright 2011 Ramez Elmasri and Shamkant Navathe

Basic Client/Server Architectures(cont'd.) Client machines Provide user with: Appropriate interfaces to utilize these servers Local processing power to run local applicationsCopyright 2011 Ramez Elmasri and Shamkant Navathe

Copyright 2011 Ramez Elmasri and Shamkant Navathe

Basic Client/Server Architectures(cont'd.) Client User machine that provides user interfacecapabilities and local processing Server System containing both hardware and softwareProvides services to the client machines Such as file access, printing, archiving, or databaseaccessCopyright 2011 Ramez Elmasri and Shamkant Navathe

Two-Tier Client/ServerArchitectures for DBMSs Server handles Query and transaction functionality related toSQL processing Client handles User interface programs and applicationprogramsCopyright 2011 Ramez Elmasri and Shamkant Navathe

Two-Tier Client/ServerArchitectures (cont'd.) Open Database Connectivity (ODBC) Provides application programming interface(API)Allows client-side programs to call the DBMS Both client and server machines must have thenecessary software installed JDBC Allows Java client programs to access one ormore DBMSs through a standard interfaceCopyright 2011 Ramez Elmasri and Shamkant Navathe

Three-Tier and n-TierArchitectures for WebApplications Application server or Web server Adds intermediate layer between client and thedatabase serverRuns application programs and stores businessrules N-tier Divide the layers between the user and thestored data further into finer componentsCopyright 2011 Ramez Elmasri and Shamkant Navathe

Copyright 2011 Ramez Elmasri and Shamkant Navathe

Classification of DatabaseManagement Systems Data model RelationalObjectHierarchical and network (legacy)Native XML DBMS Number of users Single-userMultiuserCopyright 2011 Ramez Elmasri and Shamkant Navathe

Classification of DatabaseManagement Systems (cont'd.) Number of sites CentralizedDistributed Homogeneous Heterogeneous Cost Open sourceDifferent types of licensingCopyright 2011 Ramez Elmasri and Shamkant Navathe

Classification of DatabaseManagement Systems (cont'd.) Types of access path options General or special-purposeCopyright 2011 Ramez Elmasri and Shamkant Navathe

Classification of DatabaseManagement Systems (cont'd.)Copyright 2011 Ramez Elmasri and Shamkant Navathe

Summary Concepts used in database systemsMain categories of data modelsTypes of languages supported by DMBSsInterfaces provided by the DBMSDBMS classification criteria: Data model, number of users, number of sties,access paths, costCopyright 2011 Ramez Elmasri and Shamkant Navathe

structure of a database Provides means to achieve data abstraction Basic operations Specify retrievals and updates on the database Dynamic aspect or behavior of a database application Allows the database designer to specify a set of valid operations allowed on database objects