Deck 5: Database Management
Relational Databases and SQL
ICT 110: IT for Business
Today's Learning Objectives
By the end of this session, you will be able to:
- β
Define what a relational database is and its core components.
- β
Explain how databases support decision-making across ALL business functions (Finance, HR, Operations, etc.).
- β
Understand the basic purpose of SQL for retrieving business-critical information.
- β
Connect database concepts to real-world business applications in Nepal.
The Foundation: From Data to Wisdom
How businesses create value from raw facts.
- Data (Raw Facts): 150 units, Product ID 8B, NRs. 10,000
- Information (Context): 150 units of "Wai Wai Noodles" were sold to "Bhat-Bhateni Supermarket" for NRs. 10,000.
- Knowledge (Insight): Bhat-Bhateni's noodle orders increase by 30% in the first week of every month.
- Wisdom (Actionable Strategy): Proactively increase our production and delivery schedule for Bhat-Bhateni at the end of each month to meet anticipated demand.
Databases are the engine that turns raw data into actionable business wisdom.
Before Databases: The Chaos of Spreadsheets
The Problem π
- Data Redundancy: Same customer info in sales, marketing, AND accounting sheets.
- Data Inconsistency: Customer updates their address on one sheet, but not the others. Which one is correct?
- Security Issues: The entire payroll spreadsheet is shared, instead of just the relevant data.
- Difficult to Query: "How many new clients did we get last quarter who also bought Product X?"... Good luck!
The Database Solution π
- Single Source of Truth: One central, authoritative place for all data.
- Data Integrity: Rules ensure data is consistent and accurate across the system.
- Controlled Access: Users only see the data they are authorized to see.
- Powerful Queries: Complex business questions can be answered in seconds.
The Relational Model: Organizing Data Logically
A relational database stores and provides access to data points that are related to one another. Data is organized in tables.
- Tables (Relations): Like a spreadsheet, but with rules. (e.g., `Employees`, `Departments`, `Payroll`)
- Rows (Records): A single entry in a table. (e.g., Information for one specific employee)
- Columns (Attributes): A specific piece of information. (e.g., `FirstName`, `Salary`, `HireDate`)
- Primary Key π: A unique identifier for each row. (e.g., `EmployeeID`)
- Foreign Key π: A key used to link two tables together. (e.g., `DepartmentID` in the `Employees` table links to the `Departments` table)
Visualizing the Relationship π€
An HR Example: Employees and Departments
Table: DEPARTMENTS
| Dept_ID (PK) π |
Dept_Name |
| 101 |
Finance |
| 102 |
Operations |
Table: EMPLOYEES
| Emp_ID (PK) π |
Name |
Dept_ID (FK) π |
| E451 |
Anjali Sharma |
101 |
| E452 |
Bikram Thapa |
102 |
The `Dept_ID` links an employee to their specific department, ensuring data accuracy and avoiding repetition.
Databases in Action: HR & Finance
Human Resources πΌ
- Employee Records: Storing personal details, salary history, and performance reviews in a central, secure `Employees` table.
- Payroll System: Linking employee data with attendance records and bank details for accurate, automated salary processing.
- Recruitment Tracking: A database of applicants, interview stages, and feedback to streamline the hiring process.
Finance & Accounting π°
- General Ledger: Every single financial transaction (sales, purchases, expenses) is a record in a transaction table.
- Budgeting & Forecasting: Comparing actual spending (from the transaction database) against budgeted amounts.
- Financial Reporting: Generating accurate P&L statements and balance sheets by querying the transaction database.
Databases in Action: Operations & Marketing
Operations & Supply Chain βοΈ
- Inventory Management: Real-time tracking of stock levels, supplier details, and reorder points in a `Products` table.
- Order Fulfillment: Linking customer `Orders` to warehouse `Inventory` and `Shipments` for a seamless process.
- Supplier Management: A database to manage supplier contracts, pricing, and performance history.
Marketing & Sales π―
- Customer Relationship Management (CRM): A database of all customer interactions, purchases, and contact information.
- Campaign Analysis: Tracking marketing campaign effectiveness by linking `Sales` data to specific `Campaigns`.
- Market Segmentation: Grouping customers based on purchase history, location, or demographics stored in the database.
Speaking the Language of Data: SQL π
SQL (Structured Query Language) is the standard language for communicating with and manipulating relational databases.
Think of it as asking a very specific, structured question to get a precise answer from your database.
The four main actions (CRUD):
- SELECT: Retrieve data (Read)
- INSERT: Add new data (Create)
- UPDATE: Modify existing data (Update)
- DELETE: Remove data (Delete)
Asking a Business Question with SQL
The Business Question (from a Sales Manager):
"Show me the names and order amounts for all customers from Pokhara."
SELECT CustomerName, OrderAmount
FROM Customers
JOIN Orders ON Customers.CustomerID = Orders.CustomerID
WHERE Customers.City = 'Pokhara';
- SELECT...FROM: What data do you want and from which tables?
- JOIN...ON: How are the `Customers` and `Orders` tables connected?
- WHERE: What is the condition? (Filter for 'Pokhara' only).
Beyond Traditional Databases: Big Data β‘
When data becomes too large, fast, or complex for traditional databases, we enter the world of Big Data, characterized by the "3 Vs".
Volume
Enormous quantities of data.
e.g., Terabytes of daily transaction data from all Ncell users.
Velocity
High-speed data generation.
e.g., Real-time ride data being generated by Pathao users every second.
Variety
Structured, unstructured, and semi-structured data.
e.g., Daraz's mix of sales tables, customer text reviews, and product images.
Big Data analytics helps businesses find hidden patterns, predict future trends, and make smarter decisions.
Databases Powering Nepali Businesses
eSewa (FinTech)
Manages millions of user accounts, transaction histories, and merchant details. Databases are crucial for security, fraud detection, and generating financial statements required by Nepal Rastra Bank.
Daraz Nepal (E-commerce)
A massive database of products, customers, orders, and sellers. Powers the recommendation engine ("You might also like..."), inventory management for sellers, and sales analytics.
CG Corp Global (Manufacturing)
Uses databases (ERP systems) to manage the entire supply chain: raw material inventory, production schedules for Wai Wai, distribution logistics to thousands of retailers, and sales data.
A Great Responsibility: Data Security & Ethics
Protecting Your Most Valuable Asset
- Confidentiality (Privacy): Ensuring that only authorized personnel can access sensitive data.
(Example: An HR assistant can't see the CEO's salary information).
- Integrity (Accuracy): Maintaining the consistency and trustworthiness of data.
(Example: Preventing an accidental change to a customer's bank account number).
- Availability (Access): Ensuring that data is accessible to authorized users when they need it.
(Example: The sales team can access customer data during a client meeting).
- Ethical Use: Using customer data responsibly and transparently. Are you collecting only what you need? Are you protecting it properly?
Summary & Key Takeaways π
- β
Relational databases provide a structured, reliable way to manage business data, overcoming the chaos of spreadsheets.
- β
Databases are the operational backbone of ALL modern business functionsβfrom finance and HR to operations and marketing.
- β
SQL is the universal language used to ask questions and get powerful insights from your data to drive decision-making.
- β
As data becomes a key asset, its security and ethical management are critical for business success and customer trust.
Thank You!
Any Questions?
Next Topic: Data Storage and Retrieval
Back to Start