IT 231: IT and Applications (BBA)
By the end of this session, you will be able to:
What is a Database? 📊
A database is a structured, organized collection of data, stored and accessed electronically. Think of it as a highly efficient digital filing cabinet.
The ability to store, manage, and retrieve data efficiently is critical for any organization, from a small startup to a global enterprise.
Take 1 minute. List every organisation that holds a record about you in a database. Think about:
Hands up if you listed more than 10. Each of those is a database, and each one stores your name in its own way.
Before databases, data was stored in separate, application-specific files.
This led to major problems:
The database approach centralizes data, treating it as a shared organizational resource.
⚡ Key Idea: A single, integrated repository of data is managed by a controlling agent, the DBMS.
What is a DBMS? 🧠
A Database Management System (DBMS) is the software that interacts with users, applications, and the database itself to capture and analyze data.
It's the gatekeeper that manages everything related to the database.
Examples: MySQL, PostgreSQL, Oracle, Microsoft SQL Server, MongoDB
A database model defines the logical structure of a database. It determines how data is stored, organized, and manipulated.
Data in tables (rows/columns). The most common model. (e.g., MySQL)
Tree-like structure with parent-child relationships.
Flexible models for big data. (e.g., Document, Key-Value, Graph)
We will explore these in more detail later in the unit.
🔍 What is Business Intelligence?
BI refers to the technologies, applications, and practices for the collection, integration, analysis, and presentation of business information. The purpose of BI is to support better business decision-making.
Databases are the foundation of BI. They store the raw data that BI tools turn into actionable insights, reports, and dashboards.
Discuss: This is BI working "well". Where is the line between a useful insight and an invasion of privacy? Could a Nepali bank or wallet do something similar?
Where do you see databases in action?
A powerful DBMS manages millions of these transactions securely and instantly.
Other examples: Your university's student information system, Daraz's product catalog, a hospital's patient records.
In computing, data isn't just a random mess. It's organized in a logical pyramid or hierarchy.
Think of it like building with LEGOs: you start with the smallest bricks and build up to a complete structure.
Character → Field → Record → File → Database
The most basic logical element.
S9@A group of related characters representing a characteristic of an entity.
Sita1500sita@example.comRecord: A collection of related fields that describe a single entity (a person, place, thing, or event).
Field: StudentID → Value: 10123
Field: FirstName → Value: Anjali
Field: LastName → Value: Gurung
Field: Major → Value: BSc.CSIT
A primary key is a field (or a combination of fields) whose value is unique for every record and is never empty.
Real-world keys: a citizenship number, a bank account number, a vehicle registration number, or a product SKU.
For each table, which field should be the primary key?
1. Students: Name, Phone, StudentID, Address → StudentID
2. Vehicles: Owner, Colour, Registration number, Model → Registration number
3. Products: Name, Price, SKU code, Brand → SKU code
4. Bank accounts: Holder name, Branch, Account number → Account number
5. Employees: Name, Email, Date of birth, EmployeeID → EmployeeID (people can change their email address)
6. Flights: Flight number, Date, Pilot → Flight number + Date together. The same flight number flies every day, so one field isn't enough. This is a composite key.
A collection of related records.
Example: A `Students.csv` file would contain the records for all students in the university.
An integrated collection of related files (tables).
Example: A `UniversityDB` would contain the `Students` file, `Courses` file, and `Faculty` file, all linked together.
From a single character to an entire database.
In English text, one character usually takes 1 byte.
Nepali twist: Devanagari letters take 3 bytes each in the common UTF-8 encoding. So "सीता" (4 characters) needs 12 bytes, while "Sita" needs only 4.
Organizing data is the first step. The real goal is to create meaning.
This leads us to the crucial difference between three key terms...
Data ➡️ Information ➡️ Knowledge
Raw, unorganized facts. Meaningless on its own.
45
NPR
Momo
Data organized into a meaningful context.
"The price of one plate of momo is NPR 45."
Actionable insights derived from information.
"By pricing our momos at NPR 45, we are 10% cheaper than competitors, which could increase our sales volume."
Let's apply this to a real-world scenario in Nepal.
150, "Laptop Bag", "Pokhara", "2023-11-10"
On November 10th, 2023, 150 units of "Laptop Bag" were sold to customers in Pokhara.
Sales of laptop bags in Pokhara tripled during the Gandaki IT Fair. For the next fair, we should pre-stock inventory in our Pokhara hub and run targeted ads to capitalize on this trend.
1. "2,40,000" Data
2. "Our New Road shop sold Rs 2,40,000 of goods in Dashain week" Information
3. "Dashain week sales are double a normal week, so hire 2 temporary staff next year" Knowledge
4. "Kathmandu, 31, 14:00" Data
5. "Only 12 units of the blue school bag are left in stock" Information
6. "At this rate we run out by Friday, so reorder today" Knowledge
Short answer
Long answer
Revise the answers in the full notes linked on the last slide.
Questions before we wrap this hour?
Next: Unit 8 · Session 2 — File Systems vs Databases and Models
📖 Read the full notes: An Introduction to Databases · Fundamental Data Concepts: From Characters to Databases
Read first, then revise with this deck: