Datamodels & architecture

1,413 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,413
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
59
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Datamodels & architecture

  1. 1. DATA MODELS ANDTHREE SCHEMA ARCHITECTURE OF DBMS
  2. 2. Data Models• Data Model: A set of concepts to describe the structure of a database, and certain constraints that the database should obey.• Data Model Operations: Operations for specifying database retrievals and updates by referring to the concepts of the data model. Operations on the data model may include basic operations and user-defined operations.Slide 2-2
  3. 3. Categories of data models• Conceptual (high-level, semantic) data models: Provide concepts that are close to the way many users perceive data. (Also called entity-based or object-based data models.)• Physical (low-level, internal) data models: Provide concepts that describe details of how data is stored in the computer.• Implementation (representational) data models: Provide concepts that fall between the above two, balancing user views with some computer storage details. (Schema – a description of data in terms of a data model )Slide 2-3
  4. 4. Data ModelsSlide 2-4
  5. 5. Three-Schema Architecture• Proposed to support DBMS characteristics of: • Program-data independence. • Support of multiple views of the data. – Schema – a description of data in terms of a data modelSlide 2-5
  6. 6. Three-Schema Architecture• Defines DBMS schemas at three levels: • Internal schema at the internal level to describe physical storage structures and access paths. Typically uses a physical data model. • Conceptual schema at the conceptual level to describe the structure and constraints for the whole database for a community of users. Uses a conceptual or an implementation data model. • External schemas at the external level to describe the various user views. Usually uses the same data model as the conceptual level.Slide 2-6
  7. 7. Levels of Abstraction in a DBMSExternal Schema 1 External Schema 2 External Schema 3 Conceptual (logical) Schema Physical Schema Secondary Storage 7
  8. 8. Physical Schema• Storage space allocation for data and indexes• Record description for storage (sizes for data items)• Record placement• Data compression and data encryption techniques M.G. Erechtchoukova 8
  9. 9. Conceptual (Logical) SchemaExample:Book (bid: char(2), title: char(50), author: char(20), price: decimal(5,2), av_q: integer)Customer (cid: char(2), l_n: char(25), f_n: char(25), a_c: char(30), phone: char(10))Order (i_n: char(2), bid: char(2), cid: char(2), n_i: integer, d_of_sale: date) M.G. Erechtchoukova 9
  10. 10. External Schema• Multiple external schemas• In relational DBMS, External Schema contains views and relations from conceptual schema• Reduce complexity of DBMS for users• Support data security• Support data independence M.G. Erechtchoukova 10
  11. 11. Data IndependenceWhen a schema at a lower level is changed, only the mappings between this schema and higher-level schemas need to be changed in a DBMS that fully supports data independence. The higher-level schemas themselves are unchanged. Hence, the application programs need not be changed since they refer to the external schemas.Slide 2-11
  12. 12. Data IndependenceExternal Schema 1 External Schema 2 External Schema 3 Logical data independence Conceptual Schema Physical data independence Physical Schema Secondary Storage 12
  13. 13. Data Independence (cont…)• Logical data independence – the immunity of the external schemas to changes in the conceptual schema• Physical data independence – the immunity of the conceptual schema to changes in the physical schema M.G. Erechtchoukova 13

×