Unit 8 Session 1: Databases and Data Concepts | IT 231 BBA Slides

--:-- --
↓ Scroll for more

Unit 8 · Session 1

Databases and Data Concepts

IT 231: IT and Applications (BBA)

Today's focus

  1. An Introduction to Databases
  2. Fundamental Data Concepts: From Characters to Databases

🎯 Learning Objectives

By the end of this session, you will be able to:

  • ✅ Define a database and explain its importance in modern information systems.
  • ✅ Identify the problems of traditional file-based systems and explain how a DBMS solves them.
  • ✅ Recognize the main database models and the concept of Business Intelligence.
  • ✅ Define the levels of the data hierarchy.
  • ✅ Differentiate between data, information, and knowledge using real-world examples.

An Introduction to Databases

The Core of Modern IT

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.

📱 Poll: How Many Databases Know You?

Take 1 minute. List every organisation that holds a record about you in a database. Think about:

  • 📶 Your SIM card (NTC or Ncell keep your ID details)
  • 🏦 Your bank and digital wallet
  • 🎓 Your college and the university exam office
  • 🏥 A hospital or clinic you've visited
  • 📲 Social media, ride-sharing and shopping apps

Hands up if you listed more than 10. Each of those is a database, and each one stores your name in its own way.

The "Old Way": Traditional File Systems

Before databases, data was stored in separate, application-specific files.

Icon of separate file folders

This led to major problems:

  • 🔴 Data Redundancy: Same data duplicated in multiple files.
  • 🔴 Data Inconsistency: Duplicated data becomes out of sync.
  • 🔴 Data Isolation: Difficult to access data from different applications.
  • 🔴 Security Issues: Hard to enforce consistent security policies.

The "New Way": The Database Approach

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.


Diagram showing a central database with multiple applications accessing it

File System vs. Database Approach

File-Based System

  • Decentralized data
  • Data dependent on application
  • High redundancy
  • Low security & integrity

Database Approach

  • Centralized data
  • Data independence
  • Controlled redundancy
  • High security & integrity

The "Brain": Database Management System (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

🎬 What Is a Database?

Key Functions of a DBMS

  • 🎯 Data Definition: Creating and defining the database structure (tables, fields, relationships).
  • 🎯 Data Manipulation: Inserting, updating, deleting, and querying data (CRUD operations).
  • 🎯 Data Security: Enforcing user permissions and preventing unauthorized access.
  • 🎯 Concurrency Control: Managing simultaneous access by multiple users.
  • 🎯 Backup & Recovery: Protecting data from loss or corruption.
  • 🎯 Data Integrity: Enforcing rules to maintain data accuracy and consistency.

Blueprints: Database Models

A database model defines the logical structure of a database. It determines how data is stored, organized, and manipulated.

Relational Model

Data in tables (rows/columns). The most common model. (e.g., MySQL)

Hierarchical Model

Tree-like structure with parent-child relationships.

NoSQL Models

Flexible models for big data. (e.g., Document, Key-Value, Graph)

We will explore these in more detail later in the unit.

From Data to Decisions: Business Intelligence (BI)

🔍 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.

🌍 Real Case: When BI Knows Too Much

  • According to a 2012 New York Times report, the US retailer Target analysed its customers' purchase records.
  • Its analysts found that buying certain everyday products together (for example unscented lotion and some vitamin supplements) could predict that a customer was pregnant.
  • Target used the prediction to send baby-product coupons, sometimes before the customer had told her own family.

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?

Databases in the Real World

Where do you see databases in action?

🇳🇵 Example from Nepal: eSewa

  • User Data: Your profile, name, phone number, KYC details.
  • Transaction Data: Every payment, transfer, and top-up is a record.
  • Merchant Data: Information about businesses you can pay.

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.

Key Takeaways

  • A database is an organized collection of data, solving the problems of old file-based systems.
  • The Database Approach centralizes data, making it a shared, manageable resource.
  • A DBMS is the essential software that manages the database, ensuring security, integrity, and accessibility.
  • Database models provide the blueprint for data structure, while Business Intelligence turns that data into valuable insights.

Fundamental Data Concepts: From Characters to Databases

The Data Hierarchy 📊

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

Level 1 & 2: The Building Blocks

1. Character

The most basic logical element.

  • A single letter: S
  • A single number: 9
  • A single symbol: @

2. Field (Attribute)

A group of related characters representing a characteristic of an entity.

  • First Name: Sita
  • Price: 1500
  • Email: sita@example.com

Level 3: The Entity

Record: A collection of related fields that describe a single entity (a person, place, thing, or event).

Example: A Student Record

Field: StudentID → Value: 10123

Field: FirstName → Value: Anjali

Field: LastName → Value: Gurung

Field: Major → Value: BSc.CSIT

🔑 The Primary Key: A Unique ID for Every Record

A primary key is a field (or a combination of fields) whose value is unique for every record and is never empty.

  • Your college has two students called Sita Rai. Which one passed? A name can't tell them apart.
  • So the college gives each one a StudentID (10123 and 10456). That's the primary key.
  • Good keys are unique, never blank, and don't change. A phone number is a poor key, because people change numbers.

Real-world keys: a citizenship number, a bank account number, a vehicle registration number, or a product SKU.

🧪 Activity: Pick the Primary Key

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.

Level 4 & 5: The Collections

4. File (or Table)

A collection of related records.

Example: A `Students.csv` file would contain the records for all students in the university.

5. Database

An integrated collection of related files (tables).

Example: A `UniversityDB` would contain the `Students` file, `Courses` file, and `Faculty` file, all linked together.

Visualizing the Hierarchy

From a single character to an entire database.

DATABASE: UniversityDB
FILE (TABLE): Students
RECORD: [10123, Anjali, Gurung, BSc.CSIT]
FIELD: FirstName: "Anjali"
CHARACTER: 'A'

🧮 Worked Example: How Big Is a Student Database?

In English text, one character usually takes 1 byte.

One record

  • StudentID 10 + First name 20 + Last name 20
  • Major 20 + Phone 10 + Email 40
  • = 120 bytes per record

The whole file

  • 20,000 students × 120 bytes = 2,400,000 bytes
  • = 2.4 MB, which is smaller than one phone photo!

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.

Beyond Structure: The Value of Data

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

🔍 Data vs. Information vs. Knowledge

Data

Raw, unorganized facts. Meaningless on its own.

45

NPR

Momo

Information

Data organized into a meaningful context.

"The price of one plate of momo is NPR 45."

Knowledge

Actionable insights derived from information.

"By pricing our momos at NPR 45, we are 10% cheaper than competitors, which could increase our sales volume."

Practical Application: A Daraz Seller

Let's apply this to a real-world scenario in Nepal.

Data Point 📊

150, "Laptop Bag", "Pokhara", "2023-11-10"


Information ℹ️

On November 10th, 2023, 150 units of "Laptop Bag" were sold to customers in Pokhara.


Knowledge 💡

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.

🧪 Activity: Data, Information, or Knowledge?

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

⚡ Key Takeaways

  • The Data Hierarchy provides a logical structure:
    Character → Field → Record → File → Database.
  • Data is raw facts, Information is data given context, and Knowledge is actionable insight derived from that information.
  • The ultimate goal of managing data is to transform it into knowledge that drives intelligent, strategic decisions.

💬 Discussion Questions

  1. Your college still keeps attendance in separate Excel files for each teacher. What problems might that cause at exam time?
  2. Why might your citizenship number make a better primary key than your phone number, but a worse one to show on a public result list?
  3. A momo shop records every sale. Give one example of data, information and knowledge it could get from those records.

Exam Practice 📝

Short answer

  1. Define database and DBMS with one example each.
  2. Define field, record, and file with examples.
  3. What is data redundancy? How does it lead to inconsistency?
  4. What is a primary key? Why can a name not be a primary key?

Exam Practice 📝 (continued)

Long answer

  1. “The database approach overcomes the limitations of the traditional file system.” Discuss with a suitable business example.
  2. Explain the data hierarchy with an example of a bank or college database.

Revise the answers in the full notes linked on the last slide.

Image & Video Credits

Images

  • Wooden Card Catalog Furniture: MarkBuckawicki, CC0, via Wikimedia Commons
  • NARA Backstage Pass (2011-08) 06: Jarek Tuszyński, CC BY-SA 3.0, via Wikimedia Commons
  • Grafana screenshot (2018): Joel Kennedy, public domain, via Wikimedia Commons
  • Navy Commissary checkout (2002): U.S. Navy, public domain, via Wikimedia Commons
  • Punch card 80 columns: Harke, CC BY-SA 3.0, via Wikimedia Commons
  • DIKW Pyramid: Longlivetheux, CC BY-SA 4.0, via Wikimedia Commons

Videos (YouTube)

  • IBM Technology, "What is a Database?" (3–68 s)

Thank You

Questions before we wrap this hour?


Next: Unit 8 · Session 2 — File Systems vs Databases and Models

Course Home · Next session

📖 Read the full notes: An Introduction to Databases · Fundamental Data Concepts: From Characters to Databases

📖 Related chapter notes

Read first, then revise with this deck: