Lecture 2 - Data and Data Management
DES431 — Big Data Analytics and Machine Learning
Lecture 2: Data and Data Management
- Instructor: Asst. Prof. Dr. Apichon Witayangkurn (apichon@siit.tu.ac.th)
Roadmap
- Data vs Information vs Knowledge
- Four Categories of Data
- Data Files
- Data Management
- Data Life Cycle
- Data Architecture
- Data Modeling
- Data Catalog
- Data Integration
- Master Data
- Data Storage
- Data Security
- Data Governance
- Data Pipeline
What is Data?
Related
- Data is a stream of raw facts representing things or events that have happened.
- Data is raw — it simply exists and has no significance beyond its existence.
- It lacks context and meaning.
- It can exist in any form: text, numbers, symbols.
Think of data like unlabeled ingredients dumped on a kitchen counter — flour, eggs, sugar. On their own they don't tell you anything about what's being made.
Data vs Information vs Knowledge
Data
- Example:
M, F/12, 24, 36, 48, 46, 85/211092, 111180, 862015 - No context, just text and numbers — "What is it?"
Information
- Information is data that has been processed to make it meaningful and useful.
- It's about adding relationships between elements of data, or adding context.
- Information reveals the meaning of data.
- Example: labeling the same raw values as
Gender: M, F,Age: 12, 24, ...,Birthdate: 211092, ...
Knowledge
- Data and information deal with facts and figures.
- Knowing what to do with them requires knowledge.
- Knowledge emerges when humans interpret, analyze, and judge information, and can be used for decision-making and problem-solving.
- Example: A marketing manager uses the labeled data (Information) to decide on a production campaign for each age group/gender based on birth month → that decision-making step is Knowledge.
Data is like scattered dots. Information is grouping the dots by color. Knowledge is realizing that grouping the dots reveals a pattern you can act on.
[Image: hand-drawn "data / information / knowledge" comic — dots, colored dots, and connected dots forming a network]
Data → Information → Knowledge → Wisdom → Decision (Pyramid)
[Image: DIKW pyramid diagram with "given context/meaning/insight/purpose becomes..." labels]
Scenario: Improving Sales in a Retail Chain
| Concept | Example in Big Data Analytics |
|---|---|
| Decision | Launch a targeted campaign: send discount coupons for umbrellas to customers in rainy regions |
| Wisdom | Understanding customer behavior and external factors; company decides promotions based on weather |
| Knowledge | Combining weather data with sales trends reveals that promotions during rainy forecasts increase umbrella sales |
| Information | Analysis shows that sales of umbrellas spike during rainy days in Bangkok |
| Data | Millions of transaction logs: timestamps, product IDs, quantities, prices, customer IDs, etc. |
This is basically the "so what?" ladder: raw logs → a pattern → understanding why the pattern happens → actually acting on it.
Where is the Data From?
- Internal or External
- Internal communication: within the same system/environment.
- External communication: with outside the system or another environment.
- Direct or Indirect
- Direct data: collected for the purpose of the processing being undertaken (e.g., mobile call data for payment).
- Indirect data: originally collected for another purpose, but now processed to provide extra information (e.g., dynamic population calculated from mobile call data).
Direct data is like using a receipt for its intended purpose (proof of purchase). Indirect data is like using that same receipt to estimate how busy a store was that day — a purpose it wasn't originally meant for.
Four Categories of Data/Information
- Nominal — values from an unordered set, e.g., color, profession
- Ordinal — values from an ordered set, e.g., military or academic rank
- Discrete — distinct, countable, finite values, e.g., total students in a class
- Continuous — real numbers, e.g., integer or real numbers
[Image: tree diagram splitting Qualitative (Categorical) → Ordinal/Nominal, and Quantitative → Continuous/Discrete, with examples: Test grade, Nationality, Distance, Cats]
Nominal = labels with no rank (colors). Ordinal = labels with rank (gold/silver/bronze). Discrete = things you count (people). Continuous = things you measure (height, time).
Data Files
Structured Data Files
- CSV (Comma-Separated Values), TSV
- Excel (
.xls,.xlsx) - Fixed-length text
Semi-Structured Data Files
- JSON (JavaScript Object Notation)
- XML (eXtensible Markup Language)
- YAML: human-readable format
Real-Time Data Streams
- Kafka topics
- Flume events
- IoT sensor streams
Unstructured Data Files
- Text files (
.txt) - Log files: system or application logs
- PDFs, Word documents
- Images, Audio, Video files
Big Data-Specific Formats
- Parquet: columnar storage format used in Spark
- ORC (Optimized Row Columnar): efficient for Hadoop
- SequenceFile: used in Hadoop for binary key-value pairs
Fixed-Length Text
- Each field starts and ends at the same place in every record.
[Image: fixed-width text file example showing VariableWidths, VariableNames, DataLine, and DataType annotations for a patient dataset]
Like a form with pre-printed boxes — every "Name" field is always characters 1–10, every "Age" field is always characters 18–20, no matter the row.
Comma-Separated Values (CSV) and Tab (TSV)
- Delimiter:
,(comma) or\t(tab)
[Image: side-by-side CSV and TSV text file examples — Olympic athlete data]
Semi-Structured: XML, JSON
- JSON supports numbers, objects, strings, and Boolean arrays.
- Smaller, faster transmission
- Webservice: REST API
- XML supports all JSON data types plus additional types like Boolean, dates, images, and namespaces.
- Input validation
- Webservice: SOAP
[Image: side-by-side XML vs JSON example representing employee info — James Kirk, Jean-Luc Picard, Wesley Crusher]
JSON is like a lightweight shipping box — quick to pack and ship. XML is like a shipping box with a detailed customs form attached — heavier, but more strictly validated.
Semi-Structure: XML Schema
- XML Schema is used for validation of XML documents.
[Image: side-by-side XML document (shiporder example) and its corresponding XSD schema definition]
The schema is like a template/rulebook that says "orderperson must be text, quantity must be a positive integer" — so bad data gets rejected before it's used.
Data Management
- Data management is the practice of collecting, organizing, and accessing data to support productivity, efficiency, and decision-making.
- In business, data is usually associated with customers, prospects, employees, deals, competitors, and finances. When an organization effectively manages data, they gain insights that drive business decisions.
[Image: word-cloud graphic emphasizing "data," "management," "information," "metadata"]
Importance of Data Management
- Productivity — better organization, employees find/understand/relay info more easily
- Cost Efficiency — avoids unnecessary duplication and repeated research costs
- Operational Nimbleness — companies respond quickly to market changes and competitors
- Security Risks — keeps information secure, protects from theft and attacks
- Reduced Data Loss — data is backed up and retrievable if something happens to originals
- Accurate Decisions — everyone works from the same, most recent, most accurate information
Types of Data Management
- Data Integration
- Data Modeling
- Data Storage
- Data Catalogs
- Data Processing
- Data Governance
- Data Lifecycle Management (DLM)
- Data Pipelines / ETLs
- Data Security
- Data Architecture
Data Lifecycle Management (DLM)
- DLM identifies the different stages that information flows through and creates policies to manage each stage.
- Goal: maximize the useful life of your data.
Stages:
- Acquisition — data may be collected manually or automatically, from internal or external sources
- Storage — data may be stored on-premises or in the cloud; should be backed up regularly
- Processing — cleaning and transforming the data, running analysis on it
- Usage — data is used by the business to make decisions, improve processes, create new products/services
- Disposal — deleting the data, or archiving it if needed for legal/regulatory reasons
Think of it like the life of a physical document: collected → filed away → reviewed/edited → actually used to make a decision → eventually shredded or archived.
Data Architecture
- Data Architecture defines the structure of an organization's logical and physical data assets and data management processes through the data lifecycle.
- Describes how data is managed from collection → transformation → distribution → consumption. It sets the blueprint for data and how it flows through data storage systems.
[Image: diagram — Sources (Legacy Data, OLTP Data, External Data) → Data Management (Data Warehouses, Master Data Repository, Operational Data Store) via ETL → Applications (Analysis, Dashboards, Scorecards, OLAP, Reporting) via Publish]
Data Architecture: Example
[Image: layered architecture diagram — Data Sources (Structured/Semi-structured) → Operational Data Exchange (Raw Data, SQL/Data Lake) → Modern Data Warehouse (Governed Data, Cleansed & Enriched, Historical Records) → Semantic Models (Governed Models by department: Marketing, Sales, Finance, Manufacturing) → BI & Analytics (Self-Service: Power BI, Tableau, Qlik; Advanced Analytics: Data Scientists & Analysts)]
Data Modeling
- A data model is a conceptual framework that defines how data is organized, stored, and accessed across distributed systems to support large-scale analysis. It handles massive volumes of diverse data types, often in real time.
Key Characteristics of Big Data Models
- Scalability
- Designed to handle petabytes of data across distributed systems
- Supports horizontal scaling (adding more machines)
- Flexibility
- Often uses schema-on-read instead of schema-on-write
- Can accommodate structured, semi-structured, and unstructured data
- Performance-Oriented
- Optimized for fast querying, parallel processing, and fault tolerance
Schema-on-write is like designing the filing cabinet before you have any papers. Schema-on-read is like dumping all papers into one big box, and only deciding how to organize/interpret them when you actually need to look something up.
Types of Data Modeling
| Model Type | Description | Common Use |
|---|---|---|
| Relational | Tables with rows and columns | Traditional databases |
| Dimensional | Star/snowflake schemas | OLAP, data warehouses |
| Document | JSON-like documents | MongoDB, Couchbase |
| Key-Value | Simple key-value pairs | Redis, DynamoDB |
| Column-Family | Data stored in columns | Cassandra, HBase |
| Graph | Nodes and edges | Neo4j, social networks |
- Also need to consider Distributed Data Modeling:
- Data is partitioned across multiple nodes.
- Requires careful design for data locality, replication, and fault tolerance.
Data Catalogs
- Data catalogs are inventories of data resources within a business. They usually use metadata to organize these resources.
- A data catalog can make business data more transparent and searchable for users.
[Image: diagram — Data Sources → Data Catalog (stack of documents organized with metadata) → End Users]
[Image: screenshot of a data.gov-style data catalog search interface — dataset search results with topic/location filters, and a detail page for "County-level Data Sets" showing downloads, resources, and metadata]
[Image: screenshot of the same data catalog detail page zoomed into "Additional Metadata" fields (Maintainer, Public Access Level, Data Update Frequency) and an "ISO 8601 Guidance" table mapping terms like Decennial/Quadrennial/Annual/Bimonthly/Semiweekly/Daily/Biweekly to ISO-8601 duration codes]
A data catalog is like a library's card catalog — it doesn't hold the books themselves, but tells you what exists, where it is, who maintains it, and how fresh it is.
Data Integration
Related
- Data integrations combine data from different systems to create a unified data set.
- Data is rarely collected by a single platform. Usually there are several applications in place for specialized processes — separate teams often have their own databases, each gathering a section of the company's data.
[Image: diagram — Data Source 1/2/n → Data Integration (ETL) → Unified View; alongside logos of integration tools: Alteryx, RapidMiner, Apache NiFi, Azure Data Factory, Informatica, Amazon Glue, SAS, Qlik Replicate, IBM Information Server, Oracle Data Integrator, SAP BusinessObjects, Microsoft SQL Server Integration Services, Talend]
Imagine sales, HR, and finance each keeping their own private notebook. Data integration is stitching those notebooks together into one shared notebook everyone can read from.
Data Integration – AWS Glue
- AWS Glue is a managed service (serverless) on the Amazon cloud. It lets users collect, process, and move dataacross data pipelines.
- AWS Glue provides the functionality businesses need to create ETL pipelines.
[Image: AWS Glue architecture diagram — sources (Amazon Redshift, S3, RDS, databases on EC2) → AWS Glue Crawlers/ETL → AWS Glue Data Catalog → consumers (Amazon Athena, Redshift Spectrum, Amazon QuickSight, Amazon EMR), with notes on crawlers auto-populating the catalog, manual population via Glue APIs, and Hive DDL statements]
Data Integration – RapidMiner
- RapidMiner provides data mining and machine learning procedures including data loading and transformation (ETL), data preprocessing and visualization, predictive analytics and statistical modeling, evaluation, and deployment.
[Image: RapidMiner visual workflow screenshot — Read CSV (Thaiwater, TMD) → Select Attributes → Append → Numerical to Polynominal → Filter Examples → Write CSV]
Master Data Management (MDM)
- MDM is the technology, tools, and processes that ensure master data is coordinated across the enterprise.
- MDM provides a unified master data service that provides accurate, consistent, and complete master data across the enterprise and to business partners.
- Three main types: Master Data, Transaction Data, Reference Data
[Image: table of master data domains — Customers (Customers, Employees, Partners, Patients, Suppliers), Products (Products, Bill of Materials, Assets, Equipment, Media), Locations (Agencies, Branches, Facilities, Franchises, Stores), Others (Accounts, Certifications, Contracts, Financials, Policies)]
Types of Data (MDM)
- Master Data — key information that is shared across the enterprise (e.g., Customer, Store, Product, Currency)
- Transaction Data — typically created, stored, and utilized in operational and/or transactional applications (e.g., Order, Order_Product)
- Reference Data — stable and commonly accessed information that categorizes data and correlates it with consistent values
Example: "Customer A buys product B at Store C — total 10 items with price 300 baht (USD conversion)"
- Master Data → Customer, Store, Product, Currency
- Transaction Data → Order, Order_Product
Master data is like your ID card (stable identity info). Transaction data is like a single receipt (a one-time event). Reference data is like the exchange-rate table used to interpret the receipt consistently.
Data Characteristics
- Physical characteristics: Size, Regulation, Ownership, Sensitivity
- Performance requirements: Real time, Near real time, Delayed time
- Volatility: frequency in which the data changes
- Volume: amount of data a system must maintain and process (online, offline)
- Transaction boundaries: a unit of work, determining which points need to store state
- Retention period: how long data must be kept (30 days, 5 years, etc.)
Data Characteristics: Performance
- Real time — sub-second response time (websites typically aim for half-second response or less)
- Near real time — within a second or two ("perceived" real time)
- Delayed time — a few seconds up to batch time frames (daily, weekly, monthly, etc.)
Data Characteristics: Volatility
- Static Data
- Event-driven data occurring in chronological order — write-once, read-many
- Stored over long periods, can consume terabytes
- Examples: web logs, bank debits/credits, point-of-sale purchases, stock trading
- Dynamic Data
- Changes frequently
- Typically a normalized RDBMS (Relational Database Management System)
- Must protect data integrity
- Read/write many times
Static data is like a diary entry — once written, it's never edited, only added to. Dynamic data is like a shared spreadsheet — constantly being read and rewritten by many people.
Roadmap (continued — next lecture)
- Data Storage
- Cloud Storage
- Ephemeral vs. Persistent Storage
- SAN, NAS
- RAID Technology
- Data Security
- Data Governance
- Data Pipeline