HOURS MCQ 3M 5M lots Total
1. What is database?
Sol: "A database is an organized collection of logically related data so that it can
be easily accessed, managed, and updated
2. What is File System?
Sol: A File System is a method of storing and organizing data in the form of
files on a storage device like hard disk or pen drive.
3. Explain the limitations of File System?
Sol:
1. Difficulty in Access
• No direct method to retrieve specific data from files.
• Developers must write separate programs to access data.
2. Data Redundancy
• Same data is stored in multiple files.
• Wastes storage space and increases chances of inconsistency.
3. Data Inconsistency
• Mismatched data across files if not updated everywhere.
• Leads to confusion and unreliable information.
4. Data Isolation
• Related data is stored in separate files with no links.
• Difficult to combine data from multiple files for analysis.
5. Data Dependence
• Data format is fixed; changing structure affects all programs.
• High maintenance required for small structural changes.
6. Controlled Data Sharing
• No easy way to assign user roles (e.g., read-only access).
• Lacks built-in security or access control features.
4. Explain the database management system?
Sol: A Database Management System (DBMS) is a software system that
enables users and application programs to create, store, manage, update, and
retrieve data from a database efficiently. It helps organize logically related
data and allows for easy access and modification.
Examples MySQL, Oracle, PostgreSQL, SQL Server, Microsoft Access,
and MongoDB.
Some DBMSs offer a Graphical User Interface (GUI), making it user-
friendly, while others require a Command Line Interface (CLI) where users
interact through programming commands.
One of the key advantages of a DBMS is that it hides the technical details of
how data is stored and maintained, offering an abstract view of the data. It
acts as an interface between the database and end users or application
programs, simplifying data management.
The process of retrieving data using special commands is known as
querying the database. In addition to managing data, a DBMS also allows
users to modify the structure of the database as needed.
Overall, a DBMS provides an efficient and reliable way to handle large
amounts of data compared to traditional file systems.
5. What are the functions of DBMS?
1. Data Storage, Retrieval, and Update
o Stores data efficiently and allows users or applications to retrieve and
modify it.
2. User-Friendly Interface
o Provides interfaces (GUI or CLI) for users to easily interact with the
database.
3. Data Security and Authorization
o Controls access to data, ensuring only authorized users can perform
specific actions.
4. Data Integrity and Consistency
o Maintains accuracy and consistency of data by enforcing rules and
constraints.
5. Backup and Recovery
o Automatically backs up data and recovers it in case of failures or
crashes.
6. Data Independence
o Separates data structure from application programs, allowing changes
without affecting existing software.
7. Concurrent Access Control
o Manages simultaneous data access by multiple users without conflicts.
6. Explain the key concepts of DBMS.
(A) Database Schema
The database schema is the design or structure of a database. It defines the
tables, their columns, data types, constraints, and the relationships between
tables.
(B) Data Constraint
Data constraints are rules applied to columns in a table to restrict the type of
data that can be stored, ensuring data accuracy and reliability (e.g., NOT
NULL, UNIQUE).
(C) Meta-data (Data Dictionary)
Meta-data is data about the data. It stores information about the database
schema and constraints within the DBMS.
(D) Database Instance
A database instance is the current state or snapshot of the database at any
specific time, containing the actual stored data.
(E) Query
A query is a request made to the database to retrieve or manipulate data as per
user requirements.
(F) Data Manipulation
Data manipulation includes operations to insert, delete, or update data within
the database.
(G) Database Engine
The database engine is the core part of a DBMS that creates databases and
processes queries for data retrieval and manipulation.
7. Explain relational data model.
A Relational Database Model is a type of database model where data is
organized in the form of tables, also called relations. Each table consists of
rows and columns, where:
Columns represent the attributes or fields, each with a unique name.
Rows represent individual records or tuples that store related data values.
Key Features of the Relational Model:
Tables (Relations):
Data is stored in tables with unique column names.
Rows (Tuples):
Each row in a table stores a set of related data values.
Relationships Between Tables:
Tables are linked to one another through common attributes known as keys.
For instance
The ATTENDANCE table has a RollNumber attribute linking it to the
STUDENT table.
The STUDENT table has a Guardian ID (GUID) attribute linking it to the
GUARDIAN table.
Data Integrity:
These links ensure the database remains consistent and accurate, allowing
retrieval of valid information by connecting related data across table
8. Define the following the terms:
i) ATTRIBUTE:
An attribute is a characteristic or parameter for which data is stored in a
relation. It corresponds to the columns of a table.
Example: GUID, GName, GPhone, and GAddress are attributes of the
GUARDIAN relation.
ii) TUPLE:
A tuple is a single row of data in a relation (table). It represents a set of related
values across the attributes.
Example: Each row in the GUARDIAN table is a tuple.
iii) DOMAIN:
The domain is the set of possible values that an attribute can take. It is usually
defined by the data type.
Example: The domain of the attribute RollNumber in STUDENT relation is
integers; the domain of SName is character strings.
iv) DEGREE:
The degree of a relation is the number of attributes (columns) it has.
Example: The GUARDIAN relation with four attributes has a degree of 4.
v) CARDINALITY:
The cardinality of a relation is the number of tuples (rows) it contains.
Example: If GUARDIAN relation has 5 rows, its cardinality is 5.
9. Explain the three important properties of a Relation
Property 1: Attribute Rules
• Each attribute must have a unique name.
• Order of attributes (columns) does not matter.
Property 2: Tuple Rules
• Each tuple (row) must be unique; no two tuples can have identical data
in all attributes.
• Order of tuples does not matter.
Property 3: State Rules
• All values in an attribute come from the same domain (data type).
• Each data value must be atomic (indivisible).
• No attribute can have multiple values in a single tuple.
• Special value **NULL** is used for unknown or missing data.
10. Explain different types of keys
1. Candidate Key
A candidate key is an attribute (or set of attributes) that can uniquely identify each
tuple (row) in a relation.
• A table can have multiple candidate keys.
• Example: In the GUARDIAN table, both `GUID` and `GPhone` can be
candidate keys.
2. Primary Key
A primary key is the candidate key chosen by the database designer to uniquely
identify tuples in a relation.
• Only one primary key per table.
• Other candidate keys become **alternate keys.
• Example: If `GUID` is selected as the primary key in GUARDIAN, then
`GPhone` is an alternate key.
3. Composite Primary Key
A composite primary key is a primary key formed using two or more attributes when
no single attribute can uniquely identify tuples.
Example: In the ATTENDANCE table,
4. Foreign Key
A foreign key is an attribute in one relation that refers to the primary key of another
relation to establish a relationship.
• It is used to maintain referential integrity between two tables.
• Example: In the STUDENT table, `GUID` is a foreign key referring to the
`GUID` of the GUARDIAN table.
• A foreign key may have NULL values if it is not part of a primary key in
its own table.
MCQ QUESTIONS:
1. What does DBMS stand for?
A. Data Block Management System
B. Database Management System
C. Digital Binary Mapping System
D. Data Backup Management Software
2. Which of the following is an example of a DBMS?
A. Python
B. MySQL
C. Windows
D. Chrome
3. Which of these is a limitation of traditional file systems?
A. Efficient indexing
B. Data redundancy
C. Secure user authentication
D. Schema enforcement
4. In file systems, what does "data isolation" mean?
A. Data is centralized
B. Data is secured by password
C. Related data is stored in separate files
D. Files are backed up automatically
5. Which of the following is not a feature of DBMS?
A. Data retrieval
B. Data isolation
C. Query processing
D. Backup and recovery
6. What is the primary purpose of a DBMS?
A. Encrypt files
B. Manage data efficiently
C. Compress images
D. Increase internet speed
7. Which of the following controls user access to a DBMS?
A. Data dictionary
B. User interface
C. Authorization mechanism
D. Data redundancy checker
8. Which feature of DBMS helps ensure only one user can change a record at
a time?
A. Data sharing
B. Query processing
C. Concurrency control
D. Backup and restore
9. What is data independence?
A. Changing the format of data affects all programs
B. Applications are dependent on the structure
C. Data is stored across multiple computers
D. Structure can be changed without affecting programs
10. Which of the following is not a type of interface provided by DBMS?
A. Graphical User Interface
B. Command Line Interface
C. Compiler Interface
D. Web Interface
11. What does the term "schema" refer to in DBMS?
A. Actual data stored
B. A command
C. Structure/design of the database
D. User login
12. What is a database instance?
A. Number of tables
B. Snapshot of data at a point in time
C. Structure of DBMS
D. User query
13. What is Meta-data in DBMS?
A. Data deleted from the system
B. Data about data
C. Large datasets
D. Database passwords
14. Which operation is not considered data manipulation?
A. Insertion
B. Update
C. Deletion
D. Schema creation
15. A query in DBMS is used to:
A. Encrypt a table
B. Backup the system
C. Retrieve or manipulate data
D. Restore a database
16. The core part of DBMS that processes queries is called
A. Query handler
B. Interface
C. Database engine
D. Transaction log
17. Which of these is not a component of the relational model?
A. Tables
B. Tuples
C. Pages
D. Attributes
18. Which of the following can have NULL values?
A. Primary key
B. Composite key
C. Foreign key
D. Candidate key
19. Which of the following best describes a relation in DBMS?
A. A type of file
B. A table with rows and columns
C. A function
D. A document
20. What is the meaning of the term "atomic" in DBMS?
A. Powerful data
B. Data that can be divided
C. Data that is indivisible
D. Encrypted data
21. What does each row in a table represent?
A. Attribute
B. Schema
C. Tuple
D. Domain
22. What is the domain of an attribute?
A. A database name
B. A set of valid values for the attribute
C. The name of the table
D. The user-defined ID
23. The number of attributes in a relation is called
A. Cardinality
B. Domain
C. Degree
D. Width
24. The number of tuples in a relation is called
A. Height
B. Depth
C. Degree
D. Cardinality
25. Which of the following is a correct property of attributes in a relation?
A. Attribute names can repeat
B. Attribute values must be atomic
C. Columns can have different domains
D. Attribute order determines priority
26. What kind of key uniquely identifies every tuple in a table?
A. Foreign Key
B. Composite Key
C. Primary Key
D. Alternate Key
27. A candidate key is
A. Always the primary key
B. Never chosen as a key
C. A set of attributes that can uniquely identify tuples
D. A non-unique field
28. If a table has more than one candidate key, what happens to the others?
A. Discarded
B. Used as foreign keys
C. Used as alternate keys
D. Stored in memory
29. What is a composite primary key?
A. A primary key with more than one attribute
B. A foreign key
C. A non-unique field
D. A key that repeats values
30. Which of the following defines referential integrity?
A. Primary key uniqueness
B. Data backup
C. Foreign key must match primary key values
D. No duplicate rows allowed
31. Which type of DBMS interface uses commands to interact?
A. GUI
B. Web UI
C. CLI
D. Menu-driven
32. Which constraint ensures a field must have a value?
A. UNIQUE
B. NULL
C. NOT NULL
D. DEFAULT
33. Which key can accept duplicate values?
A. Primary key
B. Candidate key
C. Foreign key
D. Alternate key
34. Which DBMS function allows recovery after a crash?
A. Query optimization
B. Transaction control
C. Backup and recovery
D. Data modeling
35. Which property of a relation prevents repeated rows?
A. Attribute rule
B. Tuple uniqueness
C. Domain constraint
D. Schema rule
36. Which of the following is used to enforce data integrity?
A. Joins
B. Queries
C. Constraints
D. Logs
37. What does the term NULL indicate in databases?
A. Zero
B. Empty string
C. Unknown or missing value
D. Error
38. Which of the following is an example of data inconsistency?
A. Same data format across systems
B. Same value recorded differently in two files
C. Backed up data
D. Indexed table
39. Which key can be made up of multiple fields?
A. Foreign Key
B. Composite Key
C. Simple Key
D. Alternate Key
40. What happens if foreign key constraint is violated?
A. Table is deleted
B. Data is ignored
C. Error is thrown
D. NULL is inserted automatically
---
41. Which of these is a DBMS feature that helps multiple users access data
simultaneously?
A. Metadata
B. Data dictionary
C. Concurrency control
D. Encryption
42. Which tool stores schema information?
A. Index
B. Data Dictionary
C. Table
D. Relation
43. Which language is typically used to query a relational database?
A. Python
B. Java
C. SQL
D. HTML
44. Which key helps create relationships between tables?
A. Alternate Key
B. Composite Key
C. Primary Key
D. Foreign Key
45. Which of these ensures uniqueness within a column?
A. NOT NULL
B. DEFAULT
C. UNIQUE
D. INDEX
46. Which of the following is an example of data manipulation?
A. Creating a table
B. Deleting a row
C. Defining schema
D. Adding constraint
47. Which of these is responsible for managing the internal storage structure?
A. Database engine
B. Metadata
C. Front-end
D. Data schema
48. What is the name given to the rule that each row must be different?
A. Row constraint
B. Tuple uniqueness
C. Column constraint
D. Entity rule
49. Which component processes the SQL commands?
A. Compiler
B. Query Processor
C. Data Mapper
D. Interpreter
50. Which is the best definition of a relational database?
A. Stores data in forms
B. Stores data as rows in tables
C. Stores raw files
D. Uses object programming