What Is Data?
Data is simply information represented in a form that computers can store and process.
Examples:
Nam: TheJat
Age: 25Or:
Product: Moto
Price: 10000 RuppeeOr:
Rainfall: 2 cm
Temperature: 32 degree celciusAll of this is data.
What Is Persistence?
Imagine this C++ program:
#include <iostream>
int main()
{
int balance = 1000;
balance += 500;
std::cout << balance;
}Output:
1500Now the program exits.
What happened to the balance?
It disappeared.
Why?
Because it existed only in RAM.
RAM is volatile memory.
When power is removed:
Everything in RAM is lostWe need a way to store information permanently.
This is called: Persistence
Persistence
Persistence means:
Data survives application shutdown, crashes, and reboots.
Example:
Bank Account Balancemust survive:
Application Restart
Server Reboot
Power FailureOtherwise banks would lose all money records.
The Earliest Storage Solution
Before database existed, applications stored data in files.
Example:
users.txtContents:
1,John,john@gmail.com
2,Alice,alice@gmail.com
3,Bob,bob@gmail.comProgram:
Open File
Read File
Parse File
Modify File
Write File
Close FileSimple, Works, Problem solved?
Not really.
The File System Era
Suppose we are building a company
We need to store:
Employees
Departments
Projects
Attendence
PayrollA file-based solution might look like:
employees.txt
departments.txt
projects.txt
payroll.txt
attendance.txtEverything appears manageable.
Then the company grows.
Problem 1: Data Duplication
Suppose:
employees.txt
1,John,Engineering
2,Alice,Engineering
3,Bob,EngineeringAnd:
Databases are built upon several core principles and components that ensure data is stored, managed, and retrieved efficiently. Here are the fundamental concepts that form the backbone of any database system:
Data, Information, and Knowledge
- Data vs. Information:
Data refers to raw, unorganized facts (e.g., numbers, text) that have little meaning on their own. When data is processed and structured, it becomes information, which is meaningful and useful for decision-making. Accumulated information can lead to knowledge. - Importance:
Understanding this hierarchy is critical as it guides how data should be managed to extract actionable insights.
Leave a comment
Your email address will not be published. Required fields are marked *
