1 / 36

Data, Databases, and DBMSs

Data, Databases, and DBMSs. Todd S. Bacastow January 2004. Real World. Conceptual Data Model. Physical. A Process of Mapping. Representational (Implementation) Data Model. High level model Comprises Entities Attributes Relationships. Relational Hierarchical Network

Télécharger la présentation

Data, Databases, and DBMSs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data, Databases, and DBMSs Todd S. Bacastow January 2004

  2. Real World Conceptual Data Model Physical A Process of Mapping Representational (Implementation) Data Model • High level model • Comprises • Entities • Attributes • Relationships • Relational • Hierarchical • Network • Object Oriented

  3. Data Models • A data model describes • the structure of a database • data types, relationships, constraints, • a set of basic operations • insert, delete, modify, retrieve • user-defined operations • for more dynamic database applications

  4. Categories of Data Models • Conceptual • concepts: entity, attribute, relationship • Entity-Relationship model (DBMS-independent) • Logical • data represented by record structure • E.g. relational, network, hierarchical • Physical • describes how data is stored in the disk

  5. External Level External Conceptual Level Real World Conceptual Data Model Internal Level Physical DBMS Architecture Logical Data Model

  6. Conceptual Level External Level Internal Level DBMS Architecture External View External View Conceptual Schema Internal Schema

  7. External Level External View External View External Level • Describes a part of the database for a particular user group and hides the rest • Supports multiple views of a database • Same data model as the conceptual schema

  8. Conceptual Level Conceptual Schema Conceptual Level • Data Abstraction • hides unnecessary details • Conceptual Level • hides physical layer • Data types, Constraints, User Operations • Uses both conceptual/logical data models

  9. STORED_EMP BYTES=20 PREFIX BYTES=20, OFFSET=0 EMP# BYTES=20, OFFSET=6, INDEX=EMPX DPET# BYTES=20, OFFSET=12 PAY BYTES=20, OFFSET=16, ALIGN=FULLWORD Internal Schema Internal Level Internal Level • Defines physical storage on the disk • Defines data location • path, blocks, pages, … • Device specific

  10. DB Schema vs. DB State • Database Schema • description of the database • is specified during database design • Database State (extension of the schema) • current state of the database: a snapshot • actual data instances in a DB • changes over time by update • initially, a database is empty state with no data • then, populate (load) the database with data

  11. DB Schema vs. DB State • Valid State • DBMS checks every state of the database • does it satisfy the structure and constraints specified in the schema? • Schema Diagram • Displays database schema

  12. Example Schema

  13. Database Schema • Meta-data • descriptions of the schema constructs and constraints • stored in the database catalog • Schema Evolution • Schema change prompted by the change of application requirements Designer Goal : develop a schema that changes infrequently

  14. DBMS Mapping External View External View Conceptual Schema Internal Schema

  15. DBMS Mapping • Mappings for multi-level DBMS • to transform a request specified at one level into the request at another level • access: external  conceptual  internal  DB • retrieve: DB  internal  conceptual  external • Three-Schema Architecture • advantage: true data independence • disadvantage: overhead cost of mappings

  16. Data Independence • What happens when the schema changes at some level? • Data Independence • the capacity to change the schema at one level without having to change the schema at the next higher level • Two Types of Data Independence • logical and physical data independence

  17. Data Independence (con’t) 1. Logical Data Independence • capacity to change the conceptual schema without having to change the external schema • when: logical reorganization of the database 2. Physical Data Independence • change the internal schema without having to change the conceptual schema • when: physical reorganization of the files

  18. DBMS Languages • Data Definition Language (DDL) • to define DB conceptual schema • Data Manipulation Language (DML) • to specify database requests: update, retrieval • high-level DML: describes which data to retrieve • low-level DML: describes how to retrieve it

  19. DBMS Languages (con’t) • High-level DML: set-oriented, declarative • Low-level DML: record-oriented, procedural • Types of DML • data sublangauge: DML embedded in a general purpose language (for DBAs) • query language: high-level, interactive, stand-alone DML (casual end users) • user-friendly interface for DML (naïve users)

  20. DBMS Interfaces • Menu-based interfaces: pull-down menu • Forms-based interfaces: Access Forms • Graphical User Interfaces (GUI) • Natural language interfaces • interpret requests to high-level queries • Command line

  21. Database System Environment • DBMS Component Modules • Managers, i.e., disk control • Compiler, i.e., query • Processors

  22. System Utilities & Tools • Loading • loads existing data files into the database • DBMS conversion, reformatting the data • Backup • provides a backup copy of the database • incremental backup: updates changes only • File Reorganization • to improve performance

  23. System Utilities & Tools • Performance Monitoring • monitors database usage • provides statistics • Data Dictionary • also called information repository • stores additional information: (catalog) + design decisions, usage standards, user information, application program descriptions

  24. Mainframe/terminal Mainframe Storage Logic Presentation Network Terminal Mainframe/ terminal

  25. Mainframe/terminal • Storage, Logic and Presentation all in same place • No platform specific user interface • Doesn’t take advantage of client machine

  26. Server DBMS Storage Network Client Logic Presentation Client Server without stored procedures

  27. Client/Server w/o stored procedures • Database server handles storage only • Logic and presentation in client • Takes advantage of client cpu • Logic changes require client redistribution • Integrity not maintained if other DB tool used • Each user needs to be a specific database user

  28. Server DBMS Storage Logic Network Client Presentation Client Server with stored procedures

  29. Client/Server with stored procedures • Database handles storage and business logic • Logic changed in one place, no redistribution of client • DBMS dependent code • Each user needs to be specific database user

  30. Server DBMS Storage Logic Network Client Presentation Client Server with 3 tiers

  31. Three Tiered -- what is it? • Storage in database • Logic in Transaction Monitor • Client does presentation only • Authentication and Access control can be done in TP monitor • Each user does NOT have to be a database user

  32. Database Servers DBMS DBMS Storage Storage Network Transaction Monitor Logic Network Client Presentation Client Server with 3 tiers

  33. What is a Transaction Monitor? • A component which sits between the client and the database server to insure reliable updates of information • Used in airline reservation and banking systems

  34. Why 3 Tiers? • Scalability • multiple transaction monitors • load balancing • Flexibility • Complexity • update multiple data stores • Two phase commit with multiple databases

  35. Classifications of DBMSs • Data Model (OO, Relational, hierarchical) • Number of Users ( single vs. multi-user) • Number of Database Sites ( centralized vs. distributed vs. federated) • Special-purpose vs. general-purpose

More Related