Database Environment Chapter 2 CIS548.101 Sungchul Hong.
-
Upload
bryce-morgan -
Category
Documents
-
view
218 -
download
0
Transcript of Database Environment Chapter 2 CIS548.101 Sungchul Hong.
![Page 1: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/1.jpg)
Database Environment
Chapter 2
CIS548.101
Sungchul Hong
![Page 2: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/2.jpg)
The Three-Level ANSI-SPARC Architecture
• External
• Conceptual
• Internal
• <fig. 2.1>
![Page 3: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/3.jpg)
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.
![Page 4: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/4.jpg)
External Level
• Users’ view of the database. This level describes that part of the database that is relevant to each user.
• External views
• Different views may have different representations of the same data.
![Page 5: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/5.jpg)
Conceptual Level
• The 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 database– All entities, their attributes, and their relationships
– The constraints on the data
– Semantic information about the data
– Security and integrity information
![Page 6: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/6.jpg)
Internal Level
• The 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 placement– Data compression and data encryption
techniques.
![Page 7: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/7.jpg)
Schemas
• Database schema– External schemas (subschema)
• Different views of the data
– Conceptual schema• Describes all the entities, attributes,and relationships together
with integrity constraints.
– Internal schema• Complete 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.
![Page 8: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/8.jpg)
![Page 9: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/9.jpg)
Mappings
• The DBMS is responsible for mapping between these three types of schema.
• Check consistency.• Conceptual/internal mapping
– Find the actual record of a logical record
• External/conceptual mapping– Map names in the user’s view on to the relevant
part of the conceptual schema
![Page 10: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/10.jpg)
![Page 11: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/11.jpg)
Database Instance
• Database schema is not expected to change frequently.
• Database instance– The data in the database at any particular point
in time.
![Page 12: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/12.jpg)
Data Independence
• Upper levels are unaffected by changes to lower level.
• Logical data independence– Refers to the immunity of the external schemas
to changes in the conceptual schema.
• Physical data independence– Refers to the immunity of the conceptual
schema to changes in the internal schema.
![Page 13: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/13.jpg)
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)
![Page 14: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/14.jpg)
Data Definition Language (DDL)
• The DDL us used to define a schema or to modify an existing one.
• System catalog
• Data dictionary
![Page 15: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/15.jpg)
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
data– Query language– Procedural DMLs– Non-procedural DML (SQL)
![Page 16: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/16.jpg)
Fourth-Generation Languages (4GLs)
• What v.s. How
• Forms generator
• Report generators
• Graphics generators
• Application generators
![Page 17: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/17.jpg)
Data Models and Conceptual Modeling
• Data model– An integrated collection of concepts for describing and
manipulating data,relationships between data, and constraints on the data in a organization.
– Structural part
– Manipulation part
– Set of integrity rules
– Relational, network, hierarchical, Object-Oriented
![Page 18: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/18.jpg)
Relational Data Model
![Page 19: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/19.jpg)
Network Data Model
![Page 20: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/20.jpg)
Hierarchical Data Model
![Page 21: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/21.jpg)
Conceptual Modeling
• The 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.
![Page 22: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/22.jpg)
Functions of a DBMS
• Data storage, retrieval, and update
• A user-accessible catalog (meta data)
• Transaction support (update salary)
• Concurrency control services
• Recovery service
• Authorization service
• Support for data communication
![Page 23: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/23.jpg)
Functions of a DBMS (2)
• Integrity services
• Services to promote data independence
• Utility service– Import, monitoring, statistical analysis, index
reorganization, garbage collection.
![Page 24: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/24.jpg)
Components of a DBMS
• Query processor
• Database manager
• File manager
• DML preprocessor
• DDL compiler
• Catalog manager
• Authorization control
![Page 25: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/25.jpg)
Components of a DBMS (2)
• Command processor
• Integrity checker
• Query optimizer
• Transaction manager
• Scheduler
• Recovery manager
• Buffer manager
![Page 26: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/26.jpg)
![Page 27: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/27.jpg)
![Page 28: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/28.jpg)
Multi-User DBMS Architectures
• Teleprocessing• File-Server
– There is a large amount of network traffic– A full copy of the DBMS is required on each
workstation.– Concurrency, recovery, and integrity control
are more complex.
• Client-Server
![Page 29: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/29.jpg)
![Page 30: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/30.jpg)
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 server• It maps on to open-systems architecture naturally.
![Page 31: Database Environment Chapter 2 CIS548.101 Sungchul Hong.](https://reader035.fdocuments.net/reader035/viewer/2022070408/56649e5c5503460f94b547a2/html5/thumbnails/31.jpg)