2079 1

CSC265 ยท 2079 ยท 10 marks

What is Database Management System? Explain the DBMS architecture with a diagram. What is data independence?

What is Database Management System? Explain the DBMS architecture with a diagram. What is data independence?[10]

Database Management SystemChapter 2: Database System โ€“ Concepts and ArchitectureThree-Schema Architecture and Data Independence

Quick answer

A Database Management System (DBMS) is a collection of the database, its processing methods, and the set of rules and conditions to be followed for managing data. It is the way to store data and also provides a mechanism for manipulation of data. It is basically a computerized record-keeping system.

Database Management System (DBMS) - Model Answer


1. What is a Database Management System? (2 marks)

In simple terms, a DBMS allows users to:

  • Store data in an organized manner
  • Retrieve data efficiently
  • Manipulate data (insert, update, delete, query)
  • Protect data from unauthorized access and system failures

Examples: Oracle, MS SQL Server, DB2, MySQL


2. DBMS Architecture (Three-Schema Architecture) (5 marks)

The most widely accepted architecture for a DBMS is the Three-Schema Architecture (also called the ANSI/SPARC architecture). It separates the user's view of the database from the physical storage of data.

Diagram

+---------------------------+   +---------------------------+   +---------------------------+
|     External View 1       |   |     External View 2       |   |     External View 3       |
|   (End User / App 1)      |   |   (End User / App 2)      |   |   (End User / App 3)      |
+---------------------------+   +---------------------------+   +---------------------------+
           |                               |                               |
           +-------------------------------+-------------------------------+
                                           |
                              [ EXTERNAL LEVEL ]
                         (Multiple External/User Views)
                                           |
                          External / Conceptual Mapping
                                           |
                              [ CONCEPTUAL LEVEL ]
                              (Conceptual Schema)
                                           |
                          Conceptual / Internal Mapping
                                           |
                               [ INTERNAL LEVEL ]
                               (Internal Schema)
                                           |
                              +------------+------------+
                              |      Stored Database    |
                              +-------------------------+

Description of Each Level

a) External Level (View Level)

  • This is the highest level of abstraction.
  • It describes how individual users or groups of users see the data.
  • Different users may have different views of the same database.
  • Each external view is defined by an external schema (also called a subschema).
  • Example: A student may see only their own marks, while a teacher sees all students' marks.

b) Conceptual Level (Logical Level)

  • This is the middle level of abstraction.
  • It describes what data is stored in the database and the relationships among the data.
  • It is defined by a conceptual schema.
  • It hides the details of physical storage and focuses on the logical structure.
  • Example: Tables, attributes, relationships, constraints.

c) Internal Level (Physical Level)

  • This is the lowest level of abstraction.
  • It describes how data is physically stored on the storage medium.
  • It is defined by an internal schema.
  • It deals with storage allocation, indexing, hashing, etc.
  • Example: File structures, B-trees, storage blocks.

Mappings

The process of transforming requests and results between levels is called mappings:

MappingDescription
External / Conceptual MappingTransforms user view requests to the conceptual schema
Conceptual / Internal MappingTransforms conceptual schema requests to physical storage

Note: The three schemas are only descriptions of data. The actual data is stored at the physical (internal) level only. Most DBMSs do not completely separate the three levels but support this architecture to some extent.


3. Data Independence (3 marks)

Data independence is the capacity to change the schema at one level of a database system without having to change the schema at the next higher level.

It is one of the most important advantages of the three-schema architecture.

There are two types of data independence:


a) Logical Data Independence

"It is the capacity to change the conceptual schema without having to change external schemas or application programs."

  • We may change constraints, add new entities, or reduce the database at the conceptual level.
  • Only the view definition and the external/conceptual mapping need to be updated.
  • Application programs that refer to the external schema remain unaffected.
  • Example: Adding a new attribute (column) to a table should not affect existing user views or application programs.

b) Physical Data Independence

  • It is the capacity to change the internal schema without having to change the conceptual schema.
  • Changes in physical storage (e.g., changing file organization, indexing method) do not affect the logical structure.
  • Only the conceptual/internal mapping needs to be updated.
  • Example: Changing from sequential file storage to indexed storage should not affect the conceptual schema or user views.

Summary Table

TypeChange at LevelNo Change Required at
Logical Data IndependenceConceptual LevelExternal Level / Application Programs
Physical Data IndependenceInternal LevelConceptual Level

Key Point: Data independence is achieved through the three-schema architecture and its mappings. It allows the database to evolve without disrupting existing users or applications, making the system flexible and maintainable.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.