Q.1
14 MarksA Database Management System (DBMS) is software that is used to create, store, retrieve, update and manage a database, and it controls how the users and the programs get at the data. Examples are MySQL, Oracle and PostgreSQL.
Purpose of a DBMS:
- To store data in one place, with little duplication, so it stays consistent.
- To give fast access with a query language such as SQL.
- To give security, so only allowed users change the data.
- To keep integrity, with keys and constraints.
- To allow many users at once, and recover the data after a failure.
| Point | Database users | Database Administrator (DBA) |
|---|---|---|
| Role | They use the database to store, retrieve and update data | The person who controls and manages the whole database system |
| Types | Naive (end) users, application programmers, sophisticated users | One person or a team with full authority |
| Work | Run queries, use the applications, write programs | Designs the schema, gives access rights, backup and recovery, tuning |
| Access | Limited, as given by the DBA | Full access to the database |
| Skill | Little or no knowledge of the internal structure | Deep technical knowledge of the DBMS |
| Example | A bank clerk, a student checking the result | The person who creates user accounts and takes the backup |
Database architecture describes how the data is stored and seen. The common one is the three level (ANSI-SPARC) architecture. It keeps the user's view of the data separate from the way it is stored, which gives data independence.
- External level (view level): the highest level. Each user or group sees only the part of the database that is of interest to them, called a view. It hides the rest, and so it gives security and simplicity.
- Conceptual level (logical level): it describes what data is stored and the relationships among the data: tables, attributes, keys and constraints. It is for the whole database, and it is the DBA's view. It does not say how the data is stored.
- Internal level (physical level): it describes how the data is stored on the disk: the file structure, indexes, data compression and the access paths.
Mappings: the DBMS converts a request from one level to the next through two mappings, external / conceptual and conceptual / internal.
Data independence:
- Logical data independence: the conceptual schema can change (a new column, say) with no change in the user views.
- Physical data independence: the internal schema can change (a new index, a new disk) with no change in the conceptual schema.
Application architecture: in practice a DBMS is used in a two tier (client and database server) or a three tier (client, application server and database server) arrangement.
the three level architecture has the external (views), conceptual (logical structure) and internal (physical storage) levels, connected by mappings, and it gives logical and physical data independence.