Q.1
14 Marks- Schema: the overall design (structure) of the database: the tables, columns, data types, keys and relationships. It is defined once and does not change often. Example: Student(RollNo, Name, Marks).
- Instance: the actual data stored in the database at one moment. It changes whenever data is inserted, updated or deleted. Example: the rows (1, Ravi, 70) and (2, Mita, 82) in Student today.
- Metadata: data about data, that is, the information that describes the database: table names, column names, data types, constraints and indexes. It is kept in the data dictionary (system catalog).
Write down all the advantages of DBMS over traditional file processing systems and explain any one in detail.
Advantages of a DBMS over a file processing system:
- Less data redundancy: the data is stored once, so there are few duplicate copies.
- Data consistency: as there is one copy, an update is seen everywhere.
- Data integrity: constraints (keys, checks) keep the data valid.
- Data security: access rights allow only authorized users.
- Data sharing: many users and programs use the same data at the same time.
- Data independence: programs are not affected if the storage structure changes.
- Easy querying: SQL gives answers to new questions, with no new program.
- Backup and recovery: the DBMS recovers the data after a failure.
Redundancy and consistency, in detail: in a file system, a student's address may be in the library file, the hostel file and the exam file. This wastes space, and when the student moves, each file must be changed. If one is missed, the files disagree. In a DBMS the address is stored once in the Student table, and other tables refer to the roll number. One update is enough.
What is the difference between a Database user and a Database administrator? Explain various functions of a Database Administrator.
| Point | Database user | Database administrator (DBA) |
|---|---|---|
| Role | Uses the database to store and get data | Controls and manages the whole database system |
| Types | Naive (end) users, application programmers, sophisticated users | One person or a team with full authority |
| Access | Limited by the rights given by the DBA | Full access |
| Knowledge | Need not know the internal structure | Needs deep technical knowledge |
| Example | A bank clerk, a student checking a result | The person who creates users and takes the backup |
Functions of the DBA
- Schema definition: designs and creates the database structure (tables, indexes, views).
- Storage structure and access methods: decides how the data is stored on the disk.
- Granting access (security and authorization): creates user accounts and gives rights, so that only allowed users reach the data.
- Backup and recovery: takes regular backups, and restores the data after a crash or a failure.
- Performance tuning: monitors the system, adds indexes and changes the design to make queries fast.
- Integrity maintenance: defines the constraints so that the data stays correct.
- Schema modification: changes the structure when the needs change, with little effect on the users.
- Monitoring users and capacity: watches the use, the disk space, and solves the problems of the users.
database users use the data, with limited rights, while the DBA designs, secures, backs up, tunes and maintains the whole database.