5 Database Systems

Introduction to Information Technology · Unit 5

Database Systems

Exam-focused notes for Database Systems (Introduction to Information Technology, BIT101): what the TU syllabus asks and how it has actually been tested, with 9 solved past questions from this unit.

Database Systems in short

Almost every organization stores large amounts of data. This unit explains how a database system keeps data in an organized, shared, and safe way.

Database Systems: notes

Database system definition and components

A database is an organized collection of related data stored so that it can be easily reached, managed, and updated. Example: a college keeps student records in one database.

A database system includes the database, the software that manages it, and the people and hardware around it. Its components are:

  • Data: the actual stored facts.
  • Hardware: computers and storage devices that hold the database.
  • Software: the DBMS, plus the operating system and application programs.
  • Users: database administrator (DBA), application programmers, and end users.
  • Procedures: rules and instructions for using and managing the system.

Database management system and importance

A Database Management System (DBMS) is software that creates, stores, controls, and retrieves data in a database. Examples are MySQL, Oracle, SQL Server, and PostgreSQL.

Why a DBMS is important:

  • It reduces data redundancy (repeated data).
  • It keeps data consistent and correct.
  • It allows many users to share the same data.
  • It gives security through passwords and access rights.
  • It gives backup and recovery after a crash.
  • It allows easy searching with query languages such as SQL.
  • It provides data independence, so changing the storage does not break programs.

A file system stores data in separate files with no common control. This causes repeated data and difficulty in sharing, which a DBMS removes.

What this unit covers

  • Database system definition and components
  • Database management system and importance
  • Data model, schema, and instance
  • Database system architecture levels
  • Data redundancy and data inconsistency
  • Characteristics of database systems
  • Data warehousing and data mining

Database management system and importance

2081 · 10 marks

Define Database management System. What are the advantages of database management system?[10]

Show solved answer

Database Management System (DBMS)

Definition of DBMS

A Database Management System (DBMS) is a collection of interrelated data and a set of programs to access and manage that data. It is software that enables users to define, create, maintain, and control access to a database. The primary goal of a DBMS is to provide a way to store and retrieve database information that is both convenient and efficient.

In other words, a DBMS acts as an interface between the user and the database, allowing users to interact with data without needing to know how data is physically stored.

Examples: Oracle, MySQL, Microsoft SQL Server, PostgreSQL, MongoDB.


Advantages of Database Management System

1. Controlling Data Redundancy

In a traditional file system, the same data may be stored in multiple files, leading to duplication. A DBMS centralizes data storage, which minimizes or eliminates unnecessary duplication of data, saving storage space and maintaining consistency.

2. Data Consistency

By reducing redundancy, a DBMS ensures data consistency. When data is stored in one place and updated, the change is reflected throughout the entire system, avoiding inconsistent data across different files or applications.

3. Data Sharing

A DBMS allows multiple users and applications to access the same database simultaneously. Authorized users across different departments or locations can share data in a controlled manner, improving collaboration and productivity.

4. Data Security

A DBMS provides security mechanisms such as:

  • User authentication (login credentials)
  • Authorization (access control -- who can read, write, or modify data)
  • Encryption of sensitive data

This ensures that only authorized users can access specific portions of the database.

5. Data Integrity

A DBMS enforces integrity constraints (rules) on the data to ensure accuracy and correctness. For example:

  • A student's age cannot be negative.
  • A foreign key must reference an existing primary key.

This prevents invalid data from being entered into the database.

6. Data Independence

DBMS provides two levels of data independence:

  • Physical Data Independence: Changes in physical storage do not affect the logical structure.
  • Logical Data Independence: Changes in the logical schema do not affect application programs.

This makes the system flexible and easier to maintain.

7. Efficient Data Access

A DBMS uses sophisticated query processing and optimization techniques (e.g., indexing, query optimization) to retrieve and store data efficiently, even from very large databases.

8. Backup and Recovery

A DBMS provides automatic backup and recovery mechanisms. In case of system failure, hardware crash, or accidental data loss, the DBMS can restore the database to a consistent state using transaction logs and backup copies.

9. Concurrent Access Control

A DBMS manages concurrent access by multiple users using techniques like locking and transaction management. This ensures that simultaneous operations do not lead to data inconsistency or conflicts.

10. Reduced Application Development Time

Since the DBMS handles data management tasks (storage, retrieval, security, integrity), developers can focus on application logic. This significantly reduces the time and cost of developing and maintaining applications.


Summary Table

AdvantageKey Benefit
Reduced RedundancyLess duplicate data
Data ConsistencyUniform data across the system
Data SharingMultiple users access same data
Data SecurityControlled access to data
Data IntegrityAccurate and valid data
Data IndependenceFlexibility in changes
Efficient AccessFast query processing
Backup and RecoveryProtection against data loss
Concurrency ControlSafe multi-user access
Reduced Development TimeFaster application building

Note: The above answer is based on standard DBMS concepts as taught in BSc CSIT curriculum (supplemented from standard references such as Silberschatz, Korth & Sudarshan -- Database System Concepts, since no specific note context was provided).

Open this answer on its own page →

2077 · 5 marks

Explain Database Management system and its importance. Define Data redundancy and Data inconsistency. [3+2]

A Database Management System (DBMS) is a collection of interrelated data and a set of programs to access and manage that data. It provides an environment that is both convenient and efficient for storing, retrieving, and manipulating data. More formally: - A Database is an organized collection of...

Open this answer on its own page →

Characteristics of database systems

2080 · 5 marks

Explain characteristics of Database system in brief. [5]

Note: Reference notes were not available for this topic; the following answer is based on standard database concepts as taught in BSc CSIT curriculum. --- A Database System is a computerized system that allows users to store, manage, and retrieve data in an organized and efficient manner. It has ...

Open this answer on its own page →

Data warehousing and data mining

2079 · 10 marks

Define data warehousing and data mining.Explain about any two types of language translators.Describe the significance of IoT in smart city with examples.[2+3+5]

Show solved answer

Model Answer


Part A: Define Data Warehousing and Data Mining [2 Marks]

Data Warehousing

A data warehouse is a large, centralized repository of integrated data collected from multiple heterogeneous sources within an organization. It stores historical and current data and is used primarily for reporting, analysis, and decision-making rather than day-to-day transaction processing.

Example: A retail company collecting sales data from all its branches into one central database for yearly analysis.

Data Mining

Data mining is the process of discovering useful patterns, correlations, anomalies, and insights from large datasets using statistical, mathematical, and computational techniques. It transforms raw data into meaningful information.

Example: A bank using data mining to detect fraudulent transactions by identifying unusual spending patterns.


Part B: Two Types of Language Translators [3 Marks]

A language translator is a system software that converts a program written in one programming language into machine-understandable code (binary/machine language).

1. Compiler

  • A compiler translates the entire source program written in a high-level language (e.g., C, C++) into machine code all at once before execution.
  • It scans the whole program, detects all errors, and generates an object file or executable.
  • Advantages: Faster execution since translation is done beforehand; errors are shown all at once.
  • Example: GCC compiler for C language.
Source Code (C) --> [Compiler] --> Object Code --> Execution

2. Interpreter

  • An interpreter translates and executes the source program line by line at runtime.
  • It does not produce a separate object file; each line is translated and immediately executed.
  • Advantages: Easier debugging since errors are reported line by line.
  • Disadvantages: Slower execution compared to compiled programs.
  • Example: Python interpreter, JavaScript engine.
Source Code (Python) --> [Interpreter] --> Line-by-line Execution
FeatureCompilerInterpreter
TranslationWhole program at onceLine by line
SpeedFaster executionSlower execution
Error DetectionAll errors at onceOne error at a time
OutputObject/Executable fileNo separate file

Part C: Significance of IoT in Smart City with Examples [5 Marks]

What is IoT?

The Internet of Things (IoT) refers to a network of physical devices, sensors, and objects embedded with software and connectivity that enables them to collect and exchange data over the internet without human intervention.

What is a Smart City?

A smart city uses digital technology and IoT infrastructure to enhance the quality of life of citizens, improve efficiency of services, and promote sustainable development.


Significance of IoT in Smart City

1. Smart Traffic Management

  • IoT-enabled sensors and cameras monitor real-time traffic flow.
  • Traffic signals are automatically adjusted to reduce congestion.
  • Example: Adaptive traffic signal systems in cities like Barcelona and Singapore that change signal timing based on vehicle density.

2. Smart Waste Management

  • Sensors placed in garbage bins detect fill levels and send alerts to waste collection vehicles.
  • Collection routes are optimized, reducing fuel consumption and costs.
  • Example: Bigbelly smart bins used in cities like Boston that compact waste and notify authorities when full.

3. Smart Energy Management

  • IoT-based smart meters monitor electricity consumption in real time.
  • Street lights automatically dim or brighten based on pedestrian/vehicle presence.
  • Example: Smart street lighting systems that reduce energy usage by up to 50% in cities like Amsterdam.

4. Smart Water Management

  • IoT sensors monitor water pipelines for leaks, pressure, and quality.
  • Helps prevent water wastage and ensures safe drinking water supply.
  • Example: Smart water grids in cities like Songdo (South Korea) that detect pipe leaks automatically.

5. Smart Healthcare and Public Safety

  • IoT devices monitor patients remotely and send health data to hospitals.
  • Surveillance cameras with AI detect suspicious activities and alert police.
  • Example: Emergency response systems that automatically notify ambulances and hospitals during accidents.

Summary Table

AreaIoT ApplicationBenefit
TrafficAdaptive signals, GPS trackingReduced congestion
WasteSmart bins with sensorsEfficient collection
EnergySmart meters, smart lightingEnergy conservation
WaterLeak detection sensorsReduced water loss
HealthcareRemote patient monitoringBetter emergency response

Conclusion

IoT plays a transformative role in building smart cities by enabling real-time data collection, automation, and intelligent decision-making. It improves the quality of urban life, reduces operational costs, and promotes sustainable and efficient use of resources.

Open this answer on its own page →

2077 · 5 marks

Write short notes on: a. IOT Write short notes on: b. Data warehousing and data mining. [2.5+2.5]

Definition: The Internet of Things (IoT) refers to the network of physical devices, vehicles, appliances, and other objects embedded with sensors, software, and connectivity that enables them to collect and exchange data over the internet. Key Components: - Sensors/Devices: Collect data from the ...

Open this answer on its own page →

Database system definition and components

2079 · 5 marks

Define a database system. Briefly explain the components of database system. [5]

A database system (also called a Database Management System or DBMS) is a computerized system that allows users to store, manage, retrieve, and manipulate data in an organized and efficient manner. It provides a way to define, create, maintain, and control access to a database, ensuring data inte...

Open this answer on its own page →

0 · 10 marks

Define a database system.List the components of database system.[2+8]

--- A database system is a computerized system that allows users to store, manage, retrieve, and manipulate data in an organized and efficient manner. It consists of a collection of interrelated data (the database) together with a set of programs (the DBMS) that allow users to access and modify t...

Open this answer on its own page →

Data model, schema, and instance

2078 · 5 marks

Define: Data model, Schema, and Instance. [5]

Note: The reference notes did not provide context for this topic. The following answer is based on standard database concepts as taught in TU BSc CSIT curriculum. --- A data model is a collection of conceptual tools used to describe: - The structure of data - Relationships among data - Semantics ...

Open this answer on its own page →

Database system architecture levels

2081.2 · 10 marks

Discuss three levels of database system architecture in detail.[10]

The three-level database architecture (also called the ANSI/SPARC Architecture) was proposed by the American National Standards Institute (ANSI) Standards Planning and Requirements Committee (SPARC) in 1975. This architecture separates the user's view of the database from the physical storage of ...

Open this answer on its own page →