Data basics
Distinguish structured, semi-structured, and unstructured data. Choose storage types that match the way each workload reads and writes.
Data, information, and the data engineer's job
Data is raw recorded facts: a sensor reading, a click, an order row. Information is data that has been processed into something useful, such as "revenue per region last week". A data engineer builds and runs the systems that move data from where it is created to where it is useful, reliably, at scale, with governance. Data analysts query the result and data scientists build models on it.
The video's chapters on data basics, models, integrity and sources are reused from an Azure fundamentals course, so the examples name Azure SQL, Azure Data Lake, Synapse Analytics, Stream Analytics, Event Hubs, Cosmos DB and Power BI. The concepts are general. The Databricks equivalents are shown in these modules.
Three shapes of data
| Shape | What it looks like | Examples |
|---|---|---|
| Structured | Fixed schema of rows and columns with types | SQL tables, CSV with a known header, Parquet |
| Semi-structured | Self-describing, flexible, can be nested | JSON, XML, Avro, log lines with key=value pairs |
| Unstructured | No tabular schema | Images, PDFs, audio, video, free text |
Databricks handles all three. Structured and semi-structured data go into Delta tables. Unstructured files usually live in a Unity Catalog volume (Unity Catalog) and can be read with the binaryFile format.
Data sets
A data set is a logical grouping of closely related data that shares a structure. Having a structure does not make data "structured": a set of JSON or XML files is semi-structured. Well-known public data sets include MNIST (handwritten digits), COCO (labelled images, JSON annotations) and the IMDb reviews set (sentiment analysis). For practice in Databricks, use the built-in samples catalog (for example samples.nyctaxi.trips) and the files under /databricks-datasets.
Data types
A data type tells the engine how a single value is meant to be used: how it is stored, compared and computed. Names differ by language, so map them:
| General concept | Spark SQL type |
|---|---|
| 32-bit integer (int32) | INT |
| 64-bit integer (int64) | BIGINT |
| Float (approximate decimal) | FLOAT, DOUBLE |
| Exact decimal | DECIMAL(p,s) |
| Character / string | STRING (also CHAR(n), VARCHAR(n)) |
| Array, hash/dictionary, record | ARRAY, MAP, STRUCT |
| Enumeration (enum) | No enum type. Use a STRING with a CHECK (col IN (...)) constraint. |
Spark SQL types you will meet: STRING, INT, BIGINT, DOUBLE, DECIMAL(p,s) (exact, use for money), BOOLEAN, DATE, TIMESTAMP, BINARY, and the complex types ARRAY<T>, MAP<K,V>, STRUCT<a:T,...>. Databricks also has a VARIANT type for storing semi-structured JSON efficiently.
Schemas and schemaless stores
A schema is the formal description of the structure of data: the blueprint of tables, columns, types, views and other objects. Schemaless stores (key-value, document, wide-column, graph) still have structure, but each record can hold different fields and types, so you skip upfront modeling and interpret structure when reading (schema on read). In Databricks, Delta tables enforce a schema on write; semi-structured payloads can be kept flexible with the VARIANT type or a JSON string column, and Auto Loader can capture unexpected fields in a rescued data column (Auto Loader, COPY INTO, and Lakeflow Connect).
Storage systems
| System | Optimized for | Weakness |
|---|---|---|
| Relational database (OLTP) | Many small, fast reads and writes; transactions. Example: an e-commerce order system. | Not built for scanning billions of rows for analytics |
| Data warehouse (OLAP) | Analytical SQL on structured, cleaned data; BI | Expensive, proprietary formats, poor for unstructured data and ML |
| Data lake | Cheap storage of any file in cloud object storage (S3, ADLS, GCS) | No transactions, no schema enforcement, easily becomes a "data swamp" |
| Lakehouse | Lake storage costs plus warehouse reliability and performance | Needs a table format layer such as Delta Lake |
Keep data in open file formats in your own cloud storage, and add a transaction log on top (Delta Lake) so that you get ACID transactions, schema enforcement, versioning, and fast queries. One copy of data then serves BI, data engineering, streaming and ML. This is Databricks' core architectural claim.
OLTP vs OLAP
- OLTP (online transaction processing): row-oriented, normalized, many concurrent small transactions, current state.
- OLAP (online analytical processing): column-oriented, denormalized for reads, large scans and aggregations, history.
Column-oriented storage (Parquet, Delta) is fast for analytics because a query reads only the columns it needs and similar values compress well.
Scale words
The "3 Vs" (sometimes 5): Volume (how much), Velocity (how fast it arrives), Variety (how many shapes), plus Veracity (how trustworthy) and Value. Spark was built for volume, Structured Streaming for velocity, and Delta for veracity.
Classify a dataset
A delivery service receives order totals as decimals, changing JSON payloads from drivers, and JPEGs of signed packages. Where would you store each, and why?
Check your reasoning
Order totals fit typed table columns. Store a raw JSON payload before parsing the fields you need. Keep image files in a volume and reference their paths from a table.
Product reference
Data basics quiz
Answer 5 questions. Check each answer for an explanation.