Presentation on theme: "Chapter 2 CIS Sungchul Hong"— Presentation transcript:
1 Chapter 2 CIS548.101 Sungchul Hong Database EnvironmentChapter 2CISSungchul Hong
2 The Three-Level ANSI-SPARC Architecture ExternalConceptualInternal<fig. 2.1>
3 Separation of Logical and Physical Presentation Each user should be able to access the same data, but have a different customized view of the data.Users should not have to deal directly with physical database storage details.DBA should be able to change the database storage structures without affecting the users’ views.The internal structure of the database should be unaffected by changes to the physical aspects of storage.The DBA should be able to change the conceptual structure of the database without affecting all users.
4 External LevelUsers’ view of the database. This level describes that part of the database that is relevant to each user.External viewsDifferent views may have different representations of the same data.
5 Conceptual LevelThe community view of the database. This level describes what data is stored in the database and the relationships among the data.Logical structure of entire databaseAll entities, their attributes, and their relationshipsThe constraints on the dataSemantic information about the dataSecurity and integrity information
6 Internal LevelThe physical representation of the database on the computer. This level describes how the data is stored in the database.Storage space allocation for data and indexes.Record descriptions for storage.Record placementData compression and data encryption techniques.
7 Schemas Database schema External schemas (subschema) Conceptual schema Different views of the dataConceptual schemaDescribes all the entities, attributes,and relationships together with integrity constraints.Internal schemaComplete description of the internal model, containing the definitions of stored records, the methods of representation, the data fields, and the indexes and hashing schemes used.
9 MappingsThe DBMS is responsible for mapping between these three types of schema.Check consistency.Conceptual/internal mappingFind the actual record of a logical recordExternal/conceptual mappingMap names in the user’s view on to the relevant part of the conceptual schema
11 Database InstanceDatabase schema is not expected to change frequently.Database instanceThe data in the database at any particular point in time.
12 Data IndependenceUpper levels are unaffected by changes to lower level.Logical data independenceRefers to the immunity of the external schemas to changes in the conceptual schema.Physical data independenceRefers to the immunity of the conceptual schema to changes in the internal schema.
13 Data Definition Language A language that allows the DBA or user to describe and name the entities, attributes,and relationships required for the application, together with any associated integrity and security constraints.System catalog (meta data, data dictionary)
14 Data Definition Language (DDL) The DDL us used to define a schema or to modify an existing one.System catalogData dictionary
15 The Data Manipulation Language (DML) A language that provides a set of operations to support the basic data manipulation operations on the data held in the database.Insertion, modification, retrieval, deletion of dataQuery languageProcedural DMLsNon-procedural DML (SQL)
16 Fourth-Generation Languages (4GLs) What v.s. HowForms generatorReport generatorsGraphics generatorsApplication generators
17 Data Models and Conceptual Modeling An integrated collection of concepts for describing and manipulating data,relationships between data, and constraints on the data in a organization.Structural partManipulation partSet of integrity rulesRelational, network, hierarchical, Object-Oriented
21 Conceptual ModelingThe process of constructing a model of the information use in an enterprise that is independent of implementations details such as the target DBMS, application programs, programming languages, or any other physical considerations.
22 Functions of a DBMS Data storage, retrieval, and update A user-accessible catalog (meta data)Transaction support (update salary)Concurrency control servicesRecovery serviceAuthorization serviceSupport for data communication
23 Functions of a DBMS (2) Integrity services Services to promote data independenceUtility serviceImport, monitoring, statistical analysis, index reorganization, garbage collection.
24 Components of a DBMS Query processor Database manager File manager DML preprocessorDDL compilerCatalog managerAuthorization control
25 Components of a DBMS (2) Command processor Integrity checker Query optimizerTransaction managerSchedulerRecovery managerBuffer manager
28 Multi-User DBMS Architectures TeleprocessingFile-ServerThere is a large amount of network trafficA full copy of the DBMS is required on each workstation.Concurrency, recovery, and integrity control are more complex.Client-Server
30 Client-Server It enables wider access to existing databases. Increased performance.Different types of computers works in parallel.Hardware cost are reduced.Communication costs are reduced.Increased consistency – single serverIt maps on to open-systems architecture naturally.