Unit-1
Databases Basic Concepts: Data, Database, Database systems, DBMS, Purpose of
Database system, Characteristics of Database, Advantages and Disadvantages of
DBMS, Database Languages, Three level architecture, Various components of a
DBMS
Multiple Choice Questions (MCQs) - 1 Mark Each
1. What is the primary purpose of a Database System?
a) To create spreadsheets
b) To provide a platform for web hosting
c) To manage data, reduce redundancy, and ensure data integrity
d) To increase network speed
Answer: c) To manage data, reduce redundancy, and ensure data integrity
2. Which of the following is a key characteristic of a database?
a) Data is isolated from programs
b) Data redundancy is maximized
c) Data inconsistency is encouraged
d) Data is stored in multiple unrelated files
Answer: a) Data is isolated from programs
3. A set of programs that enables users to create and maintain a database is called:
a) Data
b) DBMS
c) SQL
d) Table
Answer: b) DBMS
4. Which database language is used to define the database structure?
a) DCL (Data Control Language)
b) DML (Data Manipulation Language)
c) DDL (Data Definition Language)
d) TCL (Transaction Control Language)
Answer: c) DDL (Data Definition Language)
5. The level of database architecture that describes how the data is actually stored is
the:
a) Conceptual Level
b) External Level
c) Internal Level
d) Physical Level
Answer: d) Physical Level (Note: The Internal Level is often synonymous with the
Physical Level in the three-tier architecture)
6. Which of the following is an advantage of a DBMS?
a) High initial cost
b) Data redundancy
c) Data Abstraction
d) Complexity
Answer: c) Data Abstraction
7. The command 'GRANT' belongs to which type of database language?
a) DDL
b) DML
c) DCL
d) TCL
Answer: c) DCL (Data Control Language)
8. Which schema defines the logical structure of the entire database for a
community of users?
a) Internal Schema
b) External Schema
c) Conceptual Schema
d) Physical Schema
Answer: c) Conceptual Schema
9. The phenomenon where multiple copies of the same data do not agree with each
other is called:
a) Data Integrity
b) Data Consistency
c) Data Inconsistency
d) Data Redundancy
Answer: c) Data Inconsistency
10. Which of the following is a DISADVANTAGE of using a DBMS?
a) Improved data security
b) Data sharing
c) Enforcement of standards
d) Cost of hardware and software
Answer: d) Cost of hardware and software
3 Marks Questions
1. List any three key characteristics of the database approach.
Answer:
Self-describing nature: A DBMS catalog contains metadata (data about data),
which describes the structure of the database itself.
Insulation between programs and data (Program-Data Independence): The
structure of data files is stored in the DBMS catalog separately from the access
programs. Changes to the data structure do not necessarily require changes to
the application programs.
Support of multiple views of data: Different users can see different views of the
database, tailored to their needs, while the underlying data remains the same.
2. Differentiate between Data Definition Language (DDL) and Data Manipulation
Language (DML) with examples.
Answer:
DDL (Data Definition Language): It is used to define, modify, and delete the
structure of database objects (like tables, indexes). Examples: CREATE
TABLE, ALTER TABLE, DROP TABLE.
DML (Data Manipulation Language): It is used to manipulate (insert, update,
delete, retrieve) the data within those database objects.
Examples: SELECT, INSERT, UPDATE, DELETE.
3. Explain the three levels of the DBMS architecture with a single sentence for each.
Answer:
Internal Level: Describes the physical storage structure of the database and how
the data is actually stored on the storage devices.
Conceptual Level: Describes the logical structure of the entire database for all
users, hiding the physical storage details.
External Level (View Level): Describes the specific part of the database that a
particular user group is interested in, hiding the rest of the database.
4. State any three advantages of using a DBMS.
Answer:
Controls Data Redundancy: DBMS integrates data into a single database, so data
is stored only once, eliminating duplicate data.
Data Sharing: Authorized users from different departments can share the data
concurrently.
Enforces Data Integrity: DBMS allows the definition of rules (constraints) to
ensure the accuracy and consistency of data (e.g., age cannot be negative).
5. What is the purpose of a Database System? Explain briefly.
Answer: The primary purpose of a database system is to provide a convenient and
efficient way to store, retrieve, and manage large amounts of information. It is
designed to overcome the limitations of traditional file-processing systems by
reducing data redundancy, avoiding data inconsistency, facilitating data sharing, and
enforcing standards and security restrictions.
5 Marks Questions
1. Explain the three-level architecture of a DBMS. Also, mention the concept of data
independence achieved through this architecture.
Answer:
The three-level architecture (ANSI-SPARC) aims to separate the user applications from
the physical database.
Internal Level: This is the lowest level closest to physical storage. It defines how
the data is physically stored (e.g., storage structures, access paths, encryption,
compression).
Conceptual Level: This is the community view of the database. It
describes what data is stored and the relationships among those data,
independent of physical storage. It hides the details of the physical storage
structures.
External Level: This is the highest level closest to the users. It consists of many
different external views that describe the part of the database relevant to a
particular user or group of users. It hides the rest of the database from that user.
Data Independence: This architecture provides two types of data independence:
Logical Data Independence: The capacity to change the conceptual schema
without having to change the external schemas or application programs.
(Protection from changes at the logical level).
Physical Data Independence: The capacity to change the internal schema
without having to change the conceptual schema. (Protection from changes at
the physical storage level).
2. Discuss the advantages and disadvantages of a DBMS.
Answer:
Advantages:
1. Reduced Data Redundancy: Integrated data storage minimizes duplicate data,
saving storage space.
2. Improved Data Consistency and Integrity: By controlling redundancy, the risk of
inconsistency is reduced. Integrity constraints ensure accurate and valid data.
3. Enhanced Data Security: DBMS provides mechanisms to control user access to
data, ensuring only authorized users can perform allowed operations.
4. Data Sharing and Concurrent Access: Multiple users can access the database
simultaneously without interfering with each other.
5. Data Standardization: Enforcement of standards like data formats, naming
conventions, documentation, etc., is easier.
6. Backup and Recovery: DBMS provides facilities for automated backup and
recovery from hardware/software failures.
Disadvantages:
1. Complexity: A DBMS is a complex piece of software. Users, designers, and DBAs
require training to use it effectively.
2. Cost: The total cost includes high initial investment in hardware, software, and
trained personnel. There are also ongoing maintenance and licensing costs.
3. Performance Overhead: The DBMS itself uses significant CPU, memory, and disk
resources to provide its generic features, which can impact performance for
specific applications.
4. Vulnerability: Centralizing all data in one system makes it a vulnerable target. A
failure in the DBMS can halt the operations of all applications that rely on it.
5. Conversion Costs: Migrating from a traditional file system to a database system
can be expensive and time-consuming.
3. Explain the different categories of Database Languages.
Answer:
Database languages are used to interact with the database. They are categorized as
follows:
1. Data Definition Language (DDL): These commands are used to define, alter, and
drop the structure of database objects (schema). They work on the description
of the database.
o Examples: CREATE (to create a new table), ALTER (to modify a
table), DROP (to delete a table), TRUNCATE (to remove all records from a
table).
2. Data Manipulation Language (DML): These commands are used for the
manipulation of data present in the database. They are used to query, insert,
update, and delete data.
o Examples: SELECT (to retrieve data), INSERT (to add new data), UPDATE (to
modify existing data), DELETE (to remove data).
3. Data Control Language (DCL): These commands are used to control access to
the data in the database. They deal with permissions, rights, and other controls
of the database system.
o Examples: GRANT (to give user access privileges), REVOKE (to take back
privileges granted).
4. Transaction Control Language (TCL): These commands are used to manage
transactions (a logical unit of work) in the database. They ensure the ACID
properties (Atomicity, Consistency, Isolation, Durability).
o Examples: COMMIT (to save changes permanently), ROLLBACK (to undo
changes), SAVEPOINT (to set a point within a transaction to which you can
later roll back).