Unit 8: Data Base Management Systems - Subjective Questions
DECAP145 • Practice Questions with Detailed Answers
20 questions
Define a database. Explain its key characteristics and why it is preferred over traditional file-based systems.
A database is an organized collection of related data that is stored in a structured manner so that it can be easily accessed, managed, and updated.
Key Characteristics:
- Organized structure: Data is stored in tables, records, and fields in a logical manner.
- Related data: Information stored is logically connected (e.g., customers linked to their orders).
- Shared access: Multiple users can access the same data concurrently.
- Reduced redundancy: Data duplication is minimized through normalization.
- Data integrity: Rules ensure accuracy and consistency of stored data.
Advantages over file-based systems:
- Minimizes redundancy and inconsistency of data.
- Improved data sharing across applications and users.
- Better security through access controls.
- Data independence — changes in storage do not affect applications.
- Efficient querying and reporting through query languages like SQL.
What is a DBMS? Describe its major functions.
A Database Management System (DBMS) is software that enables users to create, store, retrieve, update, and manage data in a database. It acts as an interface between the user/application and the physical database.
Major Functions:
- Data Definition: Allows creation and modification of database structure (tables, schemas) using a Data Definition Language (DDL).
- Data Manipulation: Enables insert, update, delete, and retrieval of data using a Data Manipulation Language (DML).
- Data Security: Controls user access through authentication and permissions.
- Data Integrity: Enforces rules and constraints to keep data accurate.
- Concurrency Control: Manages simultaneous access by multiple users.
- Backup and Recovery: Protects data against loss and restores it after failures.
- Data Dictionary Management: Maintains metadata (data about data).
Examples: Oracle, MySQL, Microsoft SQL Server, MS Access.
Distinguish between a field, a record, and a table in a database with suitable examples.
These are the fundamental building blocks of a relational database.
Field:
- The smallest unit of data representing a single attribute or characteristic.
- Example:
StudentName,RollNumber,Marks.
Record (Row / Tuple):
- A complete set of related fields describing a single entity.
- Example: All details of one student —
(101, "Rahul", 85).
Table (Relation / File):
- A collection of related records arranged in rows and columns.
- Example: A
Studentstable containing records of all students.
Relationship:
- Multiple fields form a record.
- Multiple records form a table.
- Multiple related tables form a database.
Explain the concept of primary key and foreign key. Why are they important in a relational database?
Primary Key:
- A field (or combination of fields) that uniquely identifies each record in a table.
- It cannot contain NULL values and must be unique.
- Example:
RollNumberin aStudentstable.
Foreign Key:
- A field in one table that refers to the primary key of another table.
- It establishes a relationship between two tables.
- Example:
StudentIDin aMarkstable referencingStudentstable.
Importance:
- Primary keys ensure that each record can be uniquely identified, avoiding duplication.
- Foreign keys maintain referential integrity between related tables.
- Together they enable linking of tables and prevent orphan records, keeping the database consistent.
Describe the steps involved in working with a database, from planning to using it.
Working with a database involves several systematic steps:
- Planning and Analysis: Identify the data requirements and how the data will be used.
- Designing the Database: Decide on tables, fields, data types, keys, and relationships (creating the schema).
- Creating the Structure: Use the DBMS to define tables and set constraints.
- Entering Data: Populate tables with actual records through forms or import tools.
- Querying the Data: Retrieve specific information using queries (e.g., SQL SELECT statements).
- Editing and Updating: Modify, insert, or delete records as needed.
- Generating Reports: Present data in a formatted, meaningful way for decision-making.
- Maintaining the Database: Perform backups, ensure security, and optimize performance regularly.
What is a query? Explain how queries are used to retrieve information from a database.
A query is a request made to a database to retrieve, manipulate, or analyze specific data based on certain conditions.
Uses of Queries:
- Retrieving data: Fetch specific records that match given criteria.
- Filtering: Display only relevant data using conditions (e.g., marks > 80).
- Sorting: Arrange results in ascending or descending order.
- Calculations: Perform aggregate functions like SUM, AVG, COUNT.
- Updating/Deleting: Modify or remove records selectively.
Example SQL Query:
SELECT Name, Marks
FROM Students
WHERE Marks > 80
ORDER BY Marks DESC;This retrieves the names and marks of students scoring above 80, sorted in descending order. Queries make data retrieval fast, flexible, and accurate without manually searching records.
Explain the different types of database models with their features.
A database model defines how data is logically organized, stored, and related.
1. Hierarchical Model:
- Data organized in a tree-like structure (parent-child).
- Each child has only one parent.
- Fast for one-to-many relationships but rigid.
2. Network Model:
- Data organized as a graph where records can have multiple parent and child relationships.
- More flexible than hierarchical but complex.
3. Relational Model:
- Data stored in tables (relations) consisting of rows and columns.
- Uses keys to establish relationships.
- Most widely used (e.g., MySQL, Oracle).
4. Object-Oriented Model:
- Data stored as objects similar to object-oriented programming.
- Supports complex data types like images and multimedia.
The relational model is the most popular due to its simplicity and flexibility.
Compare DDL and DML with examples.
SQL commands are broadly divided into two important categories:
Data Definition Language (DDL):
- Defines and modifies the structure of database objects.
- Deals with schema, tables, and constraints.
- Commands:
CREATE— creates tables/databasesALTER— modifies structureDROP— deletes objectsTRUNCATE— removes all records
Data Manipulation Language (DML):
- Deals with manipulation of data stored in tables.
- Commands:
SELECT— retrieves dataINSERT— adds recordsUPDATE— modifies recordsDELETE— removes records
Key Difference:
- DDL affects the structure/schema of the database.
- DML affects the data/content within the tables.
Describe the various data types commonly used in databases.
Data types specify the kind of value a field can store and how much space it occupies.
Common Data Types:
- Text/Character (CHAR, VARCHAR): Stores letters, symbols, and alphanumeric data (e.g., names, addresses).
- Numeric (INT, DECIMAL, FLOAT): Stores whole numbers or fractional values (e.g., quantity, price).
- Date/Time (DATE, TIME, DATETIME): Stores dates and time values (e.g., date of birth).
- Boolean (BOOLEAN): Stores logical values TRUE/FALSE or Yes/No.
- Currency: Stores monetary values with formatting.
- Memo/Text (LONGTEXT): Stores large blocks of text.
- BLOB (Binary Large Object): Stores images, audio, and video.
Importance:
- Ensures data integrity by restricting invalid values.
- Helps in efficient storage and correct processing of data.
Explain the concept of data integrity and describe its types.
Data Integrity refers to the accuracy, consistency, and reliability of data stored in a database throughout its lifecycle.
Types of Data Integrity:
- Entity Integrity: Ensures each table has a unique primary key with no NULL values, so every record is uniquely identifiable.
- Referential Integrity: Ensures foreign key values match existing primary key values in the related table, preventing orphan records.
- Domain Integrity: Ensures values in a column fall within a valid range or set (using data types, constraints, and checks).
- User-Defined Integrity: Enforces specific business rules defined by the user (e.g., salary must be positive).
Importance:
- Prevents entry of invalid or inconsistent data.
- Maintains trustworthiness of the database for decision-making.
What is meant by databases at work? Explain with real-world applications of databases in various fields.
Databases at work refers to the practical use of databases in everyday organizational and business operations to store and manage large volumes of data efficiently.
Real-World Applications:
- Banking: Managing customer accounts, transactions, and loans.
- Education: Storing student records, results, and attendance.
- Healthcare: Maintaining patient histories, prescriptions, and appointments.
- E-commerce: Managing product catalogs, orders, and customer data.
- Airlines/Railways: Handling reservations, schedules, and ticketing.
- Telecommunications: Storing call records and billing information.
- Government: Maintaining census data, tax records, and licenses.
Significance:
- Enables quick data retrieval, accurate reporting, and informed decision-making across industries.
Explain the advantages and disadvantages of using a DBMS.
A DBMS offers many benefits but also has certain limitations.
Advantages:
- Reduced data redundancy and inconsistency.
- Improved data sharing among users and applications.
- Enhanced data security through access control.
- Data integrity enforced via constraints.
- Backup and recovery facilities.
- Data independence — changes in storage do not affect programs.
- Concurrent access supported for multiple users.
Disadvantages:
- High cost of software, hardware, and skilled personnel.
- Complexity in design and management.
- Large size requiring significant memory and processing power.
- Performance overhead for small, simple applications.
- Risk of failure impact — a single failure can affect all users relying on it.
Despite the drawbacks, the advantages make DBMS essential for modern data-driven organizations.
Describe the components of a DBMS environment.
A complete DBMS environment consists of five major components working together:
1. Hardware:
- Physical devices such as servers, storage disks, and computers used to store and access the database.
2. Software:
- The DBMS software itself, the operating system, and application programs that interact with data.
3. Data:
- The most important component — includes actual data and metadata (data about data).
4. Procedures:
- Instructions and rules governing the design and use of the database (login, backup, recovery procedures).
5. People (Users):
- Database Administrators (DBA): Manage and control the database.
- Database Designers: Design the structure.
- Application Programmers: Develop applications.
- End Users: Access data for their tasks.
All components must coordinate for the DBMS to function effectively.
What is a form and a report in a database? Explain their roles.
Forms:
- A form is a user-friendly interface used to enter, edit, and view data in a database.
- It displays fields in an organized, easy-to-use layout instead of raw tables.
- Roles:
- Simplifies data entry for non-technical users.
- Reduces data entry errors through validation.
- Controls which fields users can access.
Reports:
- A report is a formatted presentation of data retrieved from the database, designed mainly for printing or viewing.
- Roles:
- Summarizes and organizes data meaningfully.
- Supports grouping, sorting, and totals.
- Aids decision-making by presenting information clearly.
Difference: Forms are primarily for input and interaction, while reports are for output and presentation of data.
Explain the role and responsibilities of a Database Administrator (DBA).
A Database Administrator (DBA) is a skilled professional responsible for managing and maintaining the database system to ensure it runs efficiently and securely.
Roles and Responsibilities:
- Database Design: Assists in designing the schema and structure.
- Installation and Configuration: Installs and sets up the DBMS software.
- Security Management: Controls user access, permissions, and authentication.
- Backup and Recovery: Ensures regular backups and restores data after failures.
- Performance Tuning: Optimizes queries and storage for speed.
- Data Integrity: Enforces constraints and monitors accuracy.
- User Management: Creates and manages user accounts and privileges.
- Monitoring: Continuously monitors database health and usage.
The DBA plays a critical role in maintaining reliability, security, and availability of organizational data.
Describe the features and comparison of common corporate Database Management Systems such as Oracle, MySQL, and Microsoft SQL Server.
Large organizations rely on powerful, scalable DBMS products. Here is a comparison of three popular ones:
Oracle Database:
- Highly scalable and robust, used by large enterprises.
- Excellent security, reliability, and performance.
- Expensive and complex to manage.
MySQL:
- Open-source and free (with commercial editions).
- Fast, lightweight, and widely used for web applications.
- Owned by Oracle Corporation.
Microsoft SQL Server:
- Developed by Microsoft, integrates well with Windows and .NET.
- User-friendly tools and strong business intelligence features.
- Suitable for medium to large enterprises.
Comparison Summary:
| Feature | Oracle | MySQL | SQL Server |
|---|---|---|---|
| Cost | High | Free/Low | Moderate |
| Platform | Cross-platform | Cross-platform | Mainly Windows |
| Use case | Large enterprises | Web apps | Enterprise apps |
The choice depends on budget, scale, and platform requirements.
Explain the concept of sorting, filtering, and indexing in a database and how they improve data handling.
These techniques help in organizing and accessing data efficiently.
Sorting:
- Arranges records in a specific order (ascending or descending) based on one or more fields.
- Example: Sorting employees by salary.
- Makes data easier to read and analyze.
Filtering:
- Displays only the records that meet specified criteria while hiding the rest.
- Example: Showing only students with marks above 90.
- Helps focus on relevant data.
Indexing:
- Creates a special data structure that allows faster searching and retrieval of records.
- Works like the index of a book pointing to data locations.
- Speeds up queries but requires extra storage.
Benefits:
- Improve speed, efficiency, and usability of the database when working with large volumes of data.
What is normalization? Explain its importance in database design.
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity by dividing large tables into smaller, related tables.
Objectives:
- Eliminate duplicate data.
- Ensure logical data dependencies.
- Reduce data anomalies (insertion, update, deletion problems).
Common Normal Forms:
- First Normal Form (1NF): Eliminates repeating groups; each field contains atomic values.
- Second Normal Form (2NF): Removes partial dependency; all non-key attributes depend on the whole primary key.
- Third Normal Form (3NF): Removes transitive dependency; non-key attributes depend only on the primary key.
Importance:
- Saves storage space.
- Maintains consistency and accuracy.
- Makes the database easier to maintain and update.
Distinguish between a flat-file database and a relational database.
Databases can be structured in different ways depending on complexity and needs.
Flat-File Database:
- Stores data in a single table or file.
- No relationships between different data sets.
- Simple to create and suitable for small amounts of data.
- Leads to redundancy and difficulty in handling complex data.
- Example: A single spreadsheet.
Relational Database:
- Stores data in multiple related tables linked by keys.
- Minimizes redundancy through normalization.
- Handles large, complex data efficiently.
- Supports powerful querying using SQL.
- Example: MySQL, Oracle.
Key Difference:
- A flat-file database keeps all data in one place with no links, whereas a relational database organizes data across multiple connected tables, offering better efficiency and integrity.
Explain the importance of backup, recovery, and security in a database management system.
Protecting data is one of the most critical responsibilities of a DBMS.
Backup:
- The process of creating copies of data to prevent loss due to failures, crashes, or disasters.
- Types include full, incremental, and differential backups.
Recovery:
- The process of restoring the database to a correct state after a failure using backups and transaction logs.
- Ensures minimal data loss and continuity of operations.
Security:
- Protects data from unauthorized access, modification, or theft.
- Techniques include:
- Authentication (usernames and passwords)
- Authorization (access privileges)
- Encryption of sensitive data
Importance:
- Ensures data availability, reliability, and confidentiality.
- Safeguards valuable organizational information and maintains user trust.
Define a database. Explain its key characteristics and why it is preferred over traditional file-based systems.
A database is an organized collection of related data that is stored in a structured manner so that it can be easily accessed, managed, and updated.
Key Characteristics:
- Organized structure: Data is stored in tables, records, and fields in a logical manner.
- Related data: Information stored is logically connected (e.g., customers linked to their orders).
- Shared access: Multiple users can access the same data concurrently.
- Reduced redundancy: Data duplication is minimized through normalization.
- Data integrity: Rules ensure accuracy and consistency of stored data.
Advantages over file-based systems:
- Minimizes redundancy and inconsistency of data.
- Improved data sharing across applications and users.
- Better security through access controls.
- Data independence — changes in storage do not affect applications.
- Efficient querying and reporting through query languages like SQL.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →