Business & Data Analytics
Topic: Understanding Data Structure
1. What is Data Structure?
● Data can be organized or structured in different ways.
● The way data is structured determines how easily it can be collected, processed,
stored, and analyzed.
There are three main types of data:
2. Types of Data
(A) Unstructured Data
● Definition: Data that is unorganized and lacks a predefined format or model.
● Challenge: Difficult to collect, process, and analyze because it cannot be easily
stored in traditional databases. Computers need extra tools/algorithms to interpret it.
● Examples:
○ Emails
○ Twitter feeds
○ Text messages
○ Photos
○ Videos
(B) Semi-Structured Data
● Definition: Data that has some organizational features (tags, markers, or
metadata) but is not as strictly organized as structured data.
● Key Point:
○ It does not follow the full structure of a relational database.
○ Still, it includes labels and classifications that make grouping possible.
● Example:
○ XML (Extensible Markup Language) – encodes documents in a way that is
both human-readable and machine-readable.
(C) Structured Data
● Definition: Data that is organized in a fixed format, often in rows and columns.
● Key Features:
○ Stored in spreadsheets or relational databases.
○ Clearly segmented into fields (columns) and records (rows).
○ Easily searchable using SQL (Structured Query Language).
● Examples:
○ Excel files
○ SQL databases
○ CSV files
3. Relational Databases (Key Component of Structured
Data)
Relational databases organize data into tables consisting of rows and columns, with
relationships maintained through keys.
(A) Tables
● Definition: Collection of data organized into rows and columns.
● Example: An online bookstore could have separate tables for Customers, Books,
and Orders.
(B) Records (Rows)
● Each row in a table represents one complete record.
● Example: One row in the Customer table = info about a single customer.
(C) Attributes/Fields (Columns)
● Each column in a table represents one attribute or characteristic.
● Example: In the Customer table → First Name, Last Name, Email, Phone Number,
Address.
4. Database Keys
Keys ensure uniqueness and help connect related tables.
(A) Primary Key
● A unique identifier for each record in a table.
● Each table must have one primary key.
● Example:
○ Customer ID in Customers table
○ Book ID in Books table
○ Order ID in Orders table
(B) Foreign Key
● A key that links one table to another.
● It is a Primary Key from another table used as a reference.
● Example:
○ Customer ID in Orders table (Foreign Key) → refers to Customer ID in
Customers table (Primary Key).
(C) Composite Key
● A key created by combining two or more attributes when one alone is not unique.
● Example:
○ Order ID + Book ID (together form a Composite Key in the Order Details
table).
✅ Summary:
● Unstructured Data = No format (emails, videos).
● Semi-Structured Data = Some tags/labels (XML).
● Structured Data = Organized in tables (Excel, SQL).
● Relational Database = Uses tables, records, fields, and keys to organize data
efficiently.
● Keys (Primary, Foreign, Composite) = Maintain uniqueness and relationships.