Session 1: Introduction to Data
1. What is Data?
- Definition: Data is a collection of recorded information that can be analysed for decision-making.
- Examples of Data:
- Fitness trackers: Steps, heart rate, calories burned.
- Measurements: Floor dimensions, furniture sizes.
- Text Data: Word count in a book, occurrences of a word.
2. What is a Database?
- Definition: A structured collection of related data, stored electronically.
- Examples:
- Online to-do lists
- Contact lists (Phone numbers, names, emails)
- Shopping lists (Items, prices, quantities)
3. Why Do Businesses Collect Data?
- Market Analysis: Track trends, compare competitors.
- Product Performance: Monitor product usage, downtime, customer feedback.
- Decision Making: Use facts instead of guesses.
- Customer Understanding: Gather insights via surveys, interactions.
- Risk Management: Identify problems before they happen.
- Business Goals: Data-driven decisions for growth.
Session 2: Introduction to Databases
1. Structured vs Unstructured Data
- Structured Data: Organized, searchable, stored in tables (e.g., Excel sheets).
- Unstructured Data: Unorganized, complex processing required (e.g., emails, social media posts, handwritten notes in hospitals).
2. What is a Relational Database?
- Definition: A database that organizes data into structured tables with relationships between them.
- Tables consist of:
- Rows (Records): Each represents an entity (e.g., an employee).
- Columns (Attributes): Each represents a data type (e.g., name, salary).
3. Relational Database Management System (RDBMS)
- Definition: Software that enables interaction with relational databases.
- Popular RDBMS:
- MySQL (Used in this course)
- Oracle
- PostgreSQL
Session 3: MySQL & DBeaver
1. What is SQL?
- SQL (Structured Query Language): A programming language for communicating with databases.
- Uses of SQL:
- Create, update, delete, and manage databases.
- Perform data queries and manipulations.
2. What is a Server?
- Definition: A computer that provides services (e.g., stores databases).
- SQL Server: A server specifically for managing SQL-based databases.
- Example: MySQL Server (Open-source, relational, cross-platform).
3. Setting up MySQL
- Installation Steps:
- Download MySQL Community Server.
- Choose the correct OS version (Mac/Windows).
- Follow installation prompts.
- Set up a root password (IMPORTANT: Save this).
4. Setting up DBeaver
- DBeaver: A database management tool used to interact with databases visually.
- Installation Steps:
- Download DBeaver Community (free version).
- Install and open the application.
- Connect it to MySQL Server using the saved root password.
Session 4: SQL Basics & Data Types
1. Who Uses SQL?
- Data Analysts (Analyse trends, insights).
- Business Intelligence Professionals (Create reports, dashboards).
- Financial Analysts (Forecasting, budgeting).
- Software Developers (Database management).
2. What is an SQL Query?
- Definition: A command used to retrieve data from a database.
Example:
sql
CopyEdit
SELECT * FROM employees WHERE age = 21;
-
- Retrieves employees aged 21.
3. Data Types in SQL
- Integer (INT): Whole numbers (e.g., 25, 50, 100).
- Decimal (DECIMAL(M,D)): Numbers with decimals (e.g., 99.99).
- Varchar (VARCHAR(N)): Text (e.g., names, descriptions, max 255 characters).
- Boolean (BOOLEAN): True (1) or False (0).
- Date (DATE): Stored as YYYY-MM-DD.
Demo: Creating a Table in MySQL
Steps to Create a Table
Syntax Example:
sql
CopyEdit
CREATE TABLE equipment_maintenance (
equipment_id INT,
maintenance_cost DECIMAL(10,2),
description VARCHAR(255),
task_is_operational BOOLEAN,
last_maintenance_date DATE
);
- Key Takeaways:
- Equipment ID: Uses INT (Whole numbers).
- Maintenance Cost: Uses DECIMAL(10,2) (Max 10 digits, 2 after decimal).
- Description: Uses VARCHAR(255) (Max 255 characters).
- Task Status: Uses BOOLEAN (0 for False, 1 for True).
- Last Maintenance Date: Uses DATE (YYYY-MM-DD format).
Final Notes
- SQL is an essential tool for managing and analysing data.
- Databases help structure large amounts of information efficiently.
- DBeaver provides an easy interface for managing MySQL databases.
- Data types are crucial to storing and retrieving accurate information.
https://www.youtube.com/watch?v=JLSk10rC3p4&ab_channel=CodeFirstGirls
Leave a comment