0% found this document useful (0 votes)
5 views10 pages

Data Structures

The document provides an overview of data structures, categorizing them into structured, semi-structured, and unstructured data. It explains the characteristics, storage methods, and analysis ease of each type, along with key concepts such as fact and dimension tables, slowly changing dimensions, and bridge tables. Additionally, it discusses schema design patterns like star and snowflake schemas, which are important for understanding data organization.

Uploaded by

Nicat Ferzi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views10 pages

Data Structures

The document provides an overview of data structures, categorizing them into structured, semi-structured, and unstructured data. It explains the characteristics, storage methods, and analysis ease of each type, along with key concepts such as fact and dimension tables, slowly changing dimensions, and bridge tables. Additionally, it discusses schema design patterns like star and snowflake schemas, which are important for understanding data organization.

Uploaded by

Nicat Ferzi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Data Structures

1) What is a data structure? (simple meaning)

 A data structure describes how data is organized so it can be stored,


processed, and analyzed.

In CompTIA Data+, you must know three main categories:

1. Structured data

2. Semi-structured data

3. Unstructured data

2) Structured Data

2.1 Definition

Structured data is data that is organized in a strict format, usually:

 rows and columns

 tables

 a consistent schema

✅ Structured data fits perfectly into spreadsheets and relational databases.

2.2 What structured data looks like

Example table: Sales

OrderID CustomerID OrderDate Amount

5001 101 2026-01-20 120.50

5002 102 2026-01-21 45.00

✅ Every row has the same columns.


✅ Every column has a data type (date, number, text).

2.3 Where structured data is stored

Common locations:

 relational databases (SQL)

 CSV files
 Excel tables

 data warehouses

2.4 Why structured data is easy to analyze

Because it has:

 clear columns and meanings

 consistent schema

 rules (data types and constraints)

✅ Structured data is best for reporting and analytics.

3) Semi-structured Data

3.1 Definition

Semi-structured data is not in a strict table format, but it still has:

 structure

 keys / tags

 some organization rules

✅ It is more flexible than structured data.

3.2 The best example: JSON (very important)

Example JSON event record:

"userId": 101,

"eventType": "purchase",

"timestamp": "2026-01-20T10:15:00",

"amount": 120.50}

This is semi-structured because:

 it uses keys: userId, eventType, timestamp

 but it is not a table with fixed columns

3.3 Nested structures (critical exam concept)

Semi-structured data often contains nested objects and arrays.

Example:

{
"orderId": 5001,

"customer": {

"customerId": 101,

"city": "Baku"

},

"items": [

{"productId": 10, "qty": 2, "price": 20.00},

{"productId": 25, "qty": 1, "price": 80.50}

What makes it difficult?

 customer is an object inside the main object

 items is a list (array) inside the record

✅ In analytics, nested data must often be flattened into tables.

3.4 Where semi-structured data is used

 APIs (API responses are often JSON)

 web applications

 logs (some logs are JSON)

 document databases (NoSQL document stores)

4) Unstructured Data

4.1 Definition

 Unstructured data is data that does not have a predefined table format.

 It does not follow a strict schema.

Examples:

 images

 videos

 audio

 emails

 free text comments

 PDF documents (many PDFs are unstructured)


✅ Unstructured data is the hardest to analyze directly.

4.2 Examples (real business unstructured data)

 Call center audio recordings

 Customer reviews written in text

 Scanned invoice images (JPG)

 Email conversations

 Social media posts

To analyze unstructured data, you usually need extra tools:

 OCR for images

 NLP for text

 speech-to-text for audio

📌 Exam level: You just need to understand that it is unstructured and needs special
processing.

5) Structured vs Semi-structured vs Unstructured (Exam Comparison)

Easy to
Type Structure Example formats
analyze?

Structured strict table, schema CSV, Excel tables, SQL tables ✅ Yes

Semi-
keys, flexible fields JSON, XML ⚠️Medium
structured

JPG, PDF, TXT free text,


Unstructured no consistent schema ❌ Hard
audio

✅ Many exam questions are simple classification questions like this.

6) Important structured table roles (Fact table and Dimension table)

This part is inside structured data and is very important for the exam.

6.1 Fact Table (High-yield)

Definition
A fact table stores:

 measurable values (metrics)

 transactions or events

 numeric data that can be aggregated

✅ Fact tables are usually large.

Examples of fact table columns

 SalesAmount

 Quantity

 Discount

 Profit

 Duration

 Cost

Example FactSales table

OrderID DateKey CustomerKey ProductKey SalesAmount Quantity

5001 20260120 101 10 120.50 3

5002 20260121 102 25 45.00 1

✅ Notice: Fact tables often contain keys to dimensions + numeric measures.

6.2 Dimension Table (High-yield)

Definition

A dimension table stores descriptive information (attributes) that provides


context to facts.

✅ Dimension tables answer:

 Who?

 What?

 Where?

 When?

 Which category?
Examples of dimension attributes

 CustomerName, City, Region

 ProductName, Category

 Date, Month, Year

Example DimCustomer table

CustomerKey CustomerName City Segment

101 Customer A Baku Retail

102 Customer B Ganja Corporate

Example DimProduct table

ProductKey ProductName Category

10 Item X Electronics

25 Item Y Grocery

✅ Dimension tables are smaller and used for filtering/grouping.

6.3 Common exam question

Question: Which table usually contains SalesAmount and Quantity?


✅ Answer: Fact table

Question: Which table contains City and ProductCategory?


✅ Answer: Dimension table

7) Slowly Changing Dimension (SCD) (Must know concept)

7.1 What is SCD?

A Slowly Changing Dimension (SCD) is a dimension table where attribute values


change over time, and we need to handle that change.

Example: customer changes city.

 Before: customer city = Baku

 Later: customer city = Sumgait

The question is:


✅ Do we keep the old value?
✅ Do we overwrite it?
✅ Do we keep history?

7.2 Common SCD types (Exam-level)

✅ SCD Type 1 (overwrite)

 Replace old value with new value

 No history is stored

Example:
City changes from Baku → Sumgait
Table keeps only the latest city.

✅ Use when history is not needed.

✅ SCD Type 2 (keep history)

 Store new row for the new version

 Old row remains (history is kept)

 Often uses fields like:

o StartDate, EndDate

o IsCurrent flag

Example:

CustomerKey City StartDate EndDate IsCurrent

101 Baku 2024-01-01 2025-12-31 No

101 Sumgait 2026-01-01 NULL Yes

✅ Use when historical reporting is required.

📌 Exam level: Understand Type 1 vs Type 2.

8) Bridge Table (Important concept)

8.1 Why do we need a bridge table?

A bridge table is used when there is a many-to-many relationship.

Example:

 One product can belong to multiple categories

 One customer can have multiple segments

 One movie can have multiple genres


A normal dimension relationship (one-to-many) is not enough.

8.2 Example (many-to-many)

Products and Tags

A product can have multiple tags:

 “Organic”

 “Imported”

 “Discounted”

Bridge table: ProductTagBridge

ProductKey TagKey

10 1

10 2

25 2

25 3

✅ This bridge connects Product ↔ Tag.

📌 Exam level: understand the purpose:

 bridge table = resolve many-to-many.

9) Schema (Structured design)

9.1 What is a schema?

 A schema is the blueprint of the data structure.

It includes:

 table names

 column names

 data types

 relationships

 rules/constraints

✅ Schema tells you how the database is designed.


9.2 Common schema patterns (exam-friendly)

Star schema (most common)

 One fact table in the center

 Many dimension tables around it

Example:
FactSales → DimCustomer, DimProduct, DimDate

✅ Best for BI reporting and analytics.

Snowflake schema

 Dimensions are normalized into more tables

Example:
DimProduct → DimCategory

✅ More normalized, but can be more complex.

📌 Exam level: know the difference.

 Star = simpler

 Snowflake = more normalized

10) What the exam can ask (high-yield question patterns)

✅ Pattern 1: Identify the data structure type

 “JSON with nested arrays” → semi-structured

 “Table with rows and columns” → structured

 “Image file” → unstructured

✅ Pattern 2: Fact vs Dimension

 “SalesAmount, Quantity” → fact table

 “CustomerCity, ProductCategory” → dimension table

✅ Pattern 4: Bridge table reason

 “Many-to-many relationship exists” → use bridge table

✅ Pattern 5: Schema understanding

 “Analytics model uses a central fact table with surrounding dimensions” → star
schema
✅ Vocabulary (B1+ terms) — English → Azerbaijani (translation)

 data structure → məlumat strukturu

 structured data → strukturlaşdırılmış məlumat

 semi-structured data → yarı-strukturlaşdırılmış məlumat

 unstructured data → strukturlaşdırılmamış məlumat

 schema → sxem / struktur planı

 nested structure → iç-içə struktur

 flatten → düzləndirmək / cədvələ çevirmək

 fact table → fakt cədvəli

 dimension table → ölçü (dimension) cədvəli

 attribute → atribut / təsvir edici sahə

 metric → ölçü / göstərici

 aggregate → cəmləmək/toplamaq

 transaction → əməliyyat

 slowly changing dimension (SCD) → yavaş dəyişən ölçü

 overwrite → üzərinə yazmaq

 history → tarixçə

 current flag → aktiv göstərici

 bridge table → körpü cədvəli

 many-to-many → çoxdan-çoxa əlaqə

 star schema → ulduz sxemi

 snowflake schema → qar dənəsi sxemi

 blueprint → plan / sxem

 context → kontekst / izah mühiti

You might also like