Introduction to Databases
Data and Information
Data refers to raw, unprocessed facts and figures—like text, observations, numbers, or symbols—that by themselves hold no specific meaning.
Data refers to known facts that can be recorded and that have implicit meaning—such as names, telephone numbers, and addresses but lacks the context and purpose on its own
Data can be stored but remains meaningless until it’s processed into something usable.
Types of Data
- Qualitative Data : is represented in numerical form. (weight, cost, volume)
- Qualitative Data : Descriptive in nature, not numerical. (name, gender, color)
Information : is what we get after organizing and processing raw data. It gives context to data and enables decision-making. Essentially, Information is data that makes sense to us. We derive information by analyzing and interpreting data.
Database: Key Characteristics
Database is a structured collection of related data stored electronically in a computer system. This collection contains information relevant to an enterprise or a specific purpose.
To utilize data effectively, we rely on Database Management Systems (DBMS). Ex: Online banking system, library management system, etc.
A database has the following implicit properties that defines a database:
Representation of the Real World: A database represents some aspect of the real world, often referred to as the "miniworld" or "universe of discourse" (UoD). Changes occurring in this real-world miniworld are reflected in the database.
Designed for a Specific Purpose (Purpose-Driven Design): A database is explicitly designed, built, and populated with data for a specific purpose. It serves an intended group of users and their predefined applications.
Logical Coherence:
A database is a logically coherent collection of data with inherent meaning. A random or unorganized collection of data is not considered a database.Dynamic Nature: The actual data within a database can change frequently as information is inserted, deleted, or modified to reflect updates in the miniworld.
Database Management System (DBMS)
A database is typically managed by a database management system (DBMS). A DBMS is a computerized system that enables users to create, maintain, manipulate (query, update, generate reports), and share a database among various users and applications. The DBMS, along with the database, forms a database system.
The primary goal of a DBMS is to provide a way to store and retrieve database information that is both convenient and efficient.
Purpose of Database Systems
Database systems were designed as a successor of the file processing system that had many disadvantages like :
- Data redundancy and inconsistency
- Difficulty in accessing data
- Data isolation
- Integrity problems
- Atomicity problems
- Concurrent access anomalies
- Security problems
Core Functions of a DBMS
Defining the Database:
This includes specifying data types, structures, and constraints. The definition or descriptive information (metadata) is stored in a database catalog or data dictionary.Constructing the Database:
This involves storing the data on a storage medium managed by the DBMS.Manipulating the Database:
Operations include:- Querying to retrieve specific data.
- Updating to reflect changes in the miniworld.
- Generating reports or summaries based on the data.
Sharing the Database:
Multiple users and applications can access the database concurrently in a controlled manner.Protection and Maintenance:
System protection against hardware/software failures.
Security protection against unauthorized or malicious access.
Long-term maintenance, as databases often have life cycles spanning many years.
Interaction with the Database
Application programs interact with the database by sending queries and transactions to the DBMS.
A query is a request to retrieve specific data.
A transaction may involve both reading and writing data.
The DBMS processes these requests, ensuring data consistency, integrity, and security.
Database System
A database system consists of:
The database itself.
The DBMS software.
Application programs and user interfaces.
Together, they support the creation, usage, and maintenance of databases.
Database Design Process
Designing a database, whether for a new application or an existing one, involves several stages:
Requirements Specification and Analysis:
Collecting and documenting the data needs of users and applications.Conceptual Design: Creating a high-level data model (e.g., Entity-Relationship model) that can be manipulated using design tools. This stage helps in maintaining and evolving the design.
Logical Design:
Translating the conceptual model into a logical model supported by the DBMS (e.g., relational model).Physical Design:
Defining storage structures, indexing, access methods, and other physical considerations for efficient data access.Implementation and Maintenance:
The database is implemented, populated with real data, and maintained over time to reflect ongoing changes in the miniworld.