Chapter 1: Database Management System (DBMS) – Class 12 Computer Science Notes
Importantedunotes.com
Back to Computer Notes

Chapter 1: Database Management System (DBMS) – Syllabus

  1. Introduction to data, database, Database system, DBMS
  2. Field, Record, Objects, Primary Key, Alternate key, Candidate key
  3. Advantages of using DBMS
  4. DDL (Data Definition Language) and DML (Data Manipulation Language)
  5. Database Model: Network Model, Hierarchical Model, Relational database model
  6. Concept of Normalization: 1NF, 2NF, 3NF
  7. Centralized Vs. Distributed Database
  8. Database Security

Solved Questions & Answers

1. What is data? 2 Marks
Data is defined as raw facts and figures. It can be any character, including text, numbers, pictures, sound, or video.

2. Define information. 2 Marks
Information is an organized collection of related data which gives a complete sense. It also involves the manipulation of raw data.

3. What is a Database? 2 Marks
A Database is a collection of related data organized in a way that data can be easily accessed, managed, and updated.

4. What is DBMS? Write down the advantages and disadvantages of DBMS. 4 Marks

A DBMS (Database Management System) is the software that allows a computer to perform database functions of storing, retrieving, adding, deleting, and modifying data.

The advantages and disadvantages of DBMS are as follows:

Advantages

Improved data sharing
Improved data security
Data integration
Improved decision making
Reduction of redundancies
Providing backup and recovery

Disadvantages

Cost
Complexity
Technical staff requirement
Database failure
Extra cost of hardware

5. What is a Key? Explain primary key, candidate key, and alternate key. 4 Marks

A key is an attribute or a set of attributes which is used to uniquely identify a record of a table. The three types of keys are as follows:

1) Primary Key

A primary key is an attribute which uniquely identifies each record within a table. It cannot accept null values. We can have only one primary key in a table.

SIDReg-NoNameCourseE-mail
12078001Sagar KCBITSagar@gmail.com
22078002Binod KarkiCEbinod@gmail.com
32078003Darshan DCBITdarshan@gmail.com
42078004Sagar KCBSCCSITSagar12@gmail.com

2) Alternate Key

It is a column or a group of columns in a table that uniquely identifies every row in that table. All the remaining candidate keys which are not selected as a primary key are called alternate keys.

SIDE-mail
1Sagar@gmail.com
2binod@gmail.com
3darshan@gmail.com
4Sagar12@gmail.com

3) Candidate Key

A candidate key is a minimal super key which contains no extra attributes. It is also called a subset of a super key. It is a set of attributes that uniquely identify records in a table.

SIDReg-NoNameE-mail
12078001Sagar KCSagar@gmail.com
22078002Binod Karkibinod@gmail.com
32078003Darshan DCdarshan@gmail.com
42078004Sagar KCSagar12@gmail.com

6. Define SQL. Write the main languages provided by DBMS. 4 Marks

SQL stands for Structured Query Language. SQL is used to communicate with a database. It is the standard language for relational database management systems. SQL statements are used to perform tasks such as updating data in a database, or retrieving data from a database.

The main languages provided by DBMS are:

Data Definition Language (DDL)

Database designers use Data Definition Language (DDL) to define the structure of a database. DDL refers to the set of SQL commands that can create and manipulate the structure of a database. Common DDL statements are:

CREATE — generates a new table
ALTER — alters a table
DROP — removes a table from the database

Data Manipulation Language (DML)

Once a database completes defining the structure of a database (database schema), the database is ready for the entry and manipulation of data. Data Manipulation Language statements are used for managing data in a database.

Data Control Language (DCL)

The DCL component of the SQL language is used to create privileges to allow users access to, and manipulation of, the database. There are two main commands:

GRANT
REVOKE

7. Explain different types of database models with their merits and demerits. 4 Marks

A set of rules and standards that define how the database organizes data is called a database model. Types of Database Models:

a) Hierarchical Model

As its name implies, the hierarchical database model defines hierarchically-arranged data. A hierarchical database consists of a collection of records which are connected to one another through links. A link is an association between precisely two records.

Advantages:

It is easier to view data because data are arranged in a structured manner.
This makes the database more suitable for its purpose.
Speed of access is faster because of the predefined data paths.

Disadvantages:

Database management problems
Programming complexity
Difficult to implement because it does not support many-to-many (N:N) relationships.
It requires a procedural access language.

b) Network Model

A network database is a type of database model where multiple member records or files can be linked to multiple owner files and vice-versa.

Advantages:

The network model is conceptually simple and easy to design.
Ability to handle more relationship types.
Any changes made in the data characteristics do not affect the application program.

Disadvantages:

Complex to design and develop.
Performance is inflexible and difficult to use.
All the records are maintained using pointers, and hence the whole database structure becomes very complex.

c) Relational Database Model

A relational database is a collective set of multiple data sets organized by tables, records, and columns. RDBMS establish a well-defined relationship between database tables.

Advantages:

Flexibility
Ease of use
Avoids data duplication
Easier to maintain security

Disadvantages:

Cost
Developer Expertise
It is more complex than other models.

8. What is normalization? Explain 1NF, 2NF, and 3NF with examples. 4 Marks

The process of arranging data in several simplified database tables in order to reduce data redundancy (i.e., duplication or repetition of data) and to maintain data consistency and integrity.

Advantages:

It enhances faster sorting and index creation.
It avoids loss of data through consistency and integrity.
It solves insertion, deletion, and updating anomalies.
It eliminates data redundancy (duplication of data).
It simplifies the complex structure of a table.
It improves the quality of the system.

Let us consider the un-normalized data attributes:

Teacher NameSubjectAgeAddress
Ramaccount, English27Kathmandu
Shyammaths25Palpa
HariCS28Nuwakot

1) 1NF (First Normal Form)

Once we have un-normalized data sets, we arrange them in First Normal Form by making each attribute atomic, which means in 1NF there should not be repeating data groups.

Teacher NameSubjectAgeAddress
Ramaccount27Kathmandu
RamEnglish27Kathmandu
Shyammaths25Palpa
HariCS28Nuwakot

2) 2NF (Second Normal Form)

After arranging the given data set in 1NF, we eliminate functional dependency attributes. In this case, subject depends upon the teacher, not age and address. Similarly, age and address also depend on the teacher, not the subject. So, in 2NF, we remove such functional dependencies by introducing a primary key and foreign key.

Teacher Table:

Teacher-IDTeacher NameAgeAddress
101Ram27Kathmandu
102Shyam25Palpa
103Hari28Nuwakot

Subject Table:

Teacher-IDSubject
101account
101maths
102CS
103Nepali

3) 3NF (Third Normal Form)

As we normalize till 2NF, now to achieve 3NF we have to overcome some more issues associated with 2NF. Let’s say in the table below, if one teacher left the job, data in this table and functional dependencies are eliminated, it will not affect.

Teacher-IDTeacher NameAgeAddress
101Ram27Kathmandu
102Shyam25Palpa
103Hari28Nuwakot

But in the table below, if a teacher is changed, it will affect. A change in one affecting another is known as transitive functional dependency.

Teacher-IDSubject
101account
101math
102CS
103Nepali

So, to prevent loss of information due to transitive functional dependencies, we assign a separate subject code for each subject, so that even a change in the teacher does not affect the subject.

Subject CodeSubject
A01account
M01maths
C01CS
N01Nepali

9. What is a Centralized Database system? Write down the advantages and disadvantages of a Centralized database system. 4 Marks

Centralized computing is similar to a client/server architecture where one or more client PCs are directly connected to a central server.

Advantages

It is easy to manage and fast.
It is able to provide better security for information.
Suitable for small organizations.
It provides easier data access.

Disadvantages

If the centralized server fails due to some reasons, all database data will be lost.
If the network is slow, then the searching process takes much time.

10. What is a Distributed database system? Write the advantages and disadvantages of a distributed database system. 4 Marks

A distributed database is a collection of multiple interconnected databases, which are spread physically across various locations that communicate via a computer network.

Advantages

In a distributed database, data can be stored in different systems.
Databases can also be accessed over different networks.

Disadvantages

It is more expensive.
It is very difficult to use because it is very large and complex.
A distributed database is more complicated to set up.

11. Difference between centralized database system and distributed database system. 4 Marks
S.N.Centralized Database SystemDistributed Database System
1Stores data in a single location.It stores data in several locations.
2It consists of only one server.It consists of servers in several locations.
3It is cheaper.It is expensive.
4There is less chance of data loss.There is more chance of data hacking and data loss.
5Its maintenance process is easy.Its maintenance process is very difficult.
6Data traffic rate is high.Data traffic rate is low.
7It is suitable for small organizations.It is suitable for large organizations.

12. What is data security? What are the preventive measures used for security of data? 4 Marks

Data security refers to protective digital privacy measures that are applied to prevent unauthorized access to computers, databases, and websites.

The preventive measures used for security of data are:

Authentication
Database Encryption
Backup database
Physical security
Application security
Access Control
Web Application Firewall
Use strong passwords
Database Auditing

13. Define the term DBA. Explain his/her roles. 4 Marks

A Database Administrator (DBA) is a computer specialist who manages, maintains, and secures data in one or more database systems so that users can perform analysis for business operations.

The characteristics / roles of a Database Administrator:

It is important to have the ability to communicate.
Detailed knowledge about the organization.
DBA will have excellent problem-solving skills.
A detailed approach.
Think logically.
Ability to solve problems analytically.

14. Difference between RDBMS and DBMS. 4 Marks
S.N.DBMSRDBMS
1Data is stored in file format.Data is stored in table format.
2Individual access of data elements.Multiple data elements are accessible together.
3No connection between data.Data in the form of a table are linked together.
4There is no normalization.Normalization is achievable.
5No support for distributed databases.Supports distributed databases.
6Data stored is in a small quantity.Data is stored in large amounts.

📄 View / Download Full PDF Notes

If the PDF doesn’t load, click here to open it in Google Drive.

📚 Also Read: NEB Notes

Scroll to Top