Download presentation
Presentation is loading. Please wait.
Published byDenis Crawford Modified over 9 years ago
2
Three-Schema Architecture Three-Schema Architecture Internal Level Internal Level Conceptual Level Conceptual Level External Level External Level Data Independence Data Independence Levels of Data Independence. Levels of Data Independence. Types of Data Independence Types of Data Independence Physical Independence Physical Independence Logical Independence Logical Independence
3
The DBMS architecture describes how data in the database is viewed by the users. It is not concerned with how the data is handled and processed by the DBMS. The database users are provided with an abstract view of the data by hiding certain details of how data is physically stored. This enables the users to manipulate the data without worrying about where it is located or how it is actually stored. The three-schema approach offers three types of schemas with schema techniques based on formal language descriptions: External schema for user views Conceptual schema integrates external schemata Internal schema that defines physical storage structures
4
Back
5
The internal level describes details of how data is stored: files, indices, etc. on the random access disk system. It also typically describes the record layout of files and type of files (hash, b-tree, flat). Early applications worked at this level - explicitly dealt with details. E.g., minimizing physical distances between related data and organizing the data structures within the file (blocked records, linked lists of blocks, etc.) Problem: Routines are hardcoded to deal with physical representation. Changes to data structures are difficult to make. Application code becomes complex since it must deal with details. Rapid implementation of new features very difficult. Back
6
Also referred to as the Logical level Hides details of the physical level. In the relational model, the conceptual schema presents data as a set of tables. The DBMS maps data access between the conceptual to physical schemas automatically. Physical schema can be changed without changing application: DBMS must change mapping from conceptual to physical. Referred to as physical data independence. Back
7
In the relational model, the external schema also presents data as a set of relations. An external schema specifies a view of the data in terms of the conceptual level. It is tailored to the needs of a particular category of users. Portions of stored data should not be seen by some users and begins to implement a level of security and simplifies the view for these users Examples: Students should not see faculty salaries. Faculty should not see billing or payment data. Information that can be derived from stored data might be viewed as if it were stored. GPA not stored, calculated when needed.
8
Applications are written in terms of an external schema. The external view is computed when accessed. It is not stored. Different external schemas can be provided to different categories of users. Translation from external level to conceptual level is done automatically by DBMS at run time. The conceptual schema can be changed without changing application: Mapping from external to conceptual must be changed. Referred to as conceptual data independence. Back
9
Data independence is the type of data transparency that matters for a centralized DBMS. It refers to the immunity of user applications to make changes in the definition and organization of data. Physical data independence deals with hiding the details of the storage structure from user applications. The application should not be involved with these issues, since there is no difference in the operation carried out against the data. The data independence and operation independence together gives the feature of data abstraction. Back
10
First level The logical structure of the data is known as the 'schema definition'. In general, if a user application operates on a subset of the attributes of a relation, it should not be affected later when new attributes are added to the same relation. Logical data independence indicates that the conceptual schema can be changed without affecting the existing schemas.
11
Second level The physical structure of the data is referred to as "physical data description". Physical data independence deals with hiding the details of the storage structure from user applications. The application should not be involved with these issues since, conceptually, there is no difference in the operations carried out against the data. Back
12
Logical data independence: The ability to change the logical (conceptual) schema without changing the External schema (User View) is called logical data independence. For example, the addition or removal of new entities, attributes, or relationships to the conceptual schema should be possible without having to change existing external schemas or having to rewrite existing application programs. Physical data independence: The ability to change the physical schema without changing the logical schema is called physical data independence. For example, a change to the internal schema, such as using different file organization or storage structures, storage devices, or indexing strategy, should be possible without having to change the conceptual or external schemas. Back
13
The logical scheme stays unchanged even though the storage space or type of some data is changed for reasons of optimization or reorganization. In this external schema does not change. In this internal schema changes may be required due to some physical schema were reorganized here. Physical data independence is present in most databases and file environment in which hardware storage of encoding, exact location of data on disk,merging of records, so on this are hidden from user. Back
14
The external scheme may stay unchanged for most changes of the logical scheme. This is especially desirable as the application software does not need to be modified or newly translated. Back
15
Thank You
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.