Databases Serve Transactions, Warehouses Serve Analysis, Lakes Keep Raw Data
Data passes through a lifecycle (generated or ingested, stored, analysed, archived or deleted) and no single store is good at every stage. An operational database is built for many small reads and writes from an application; a data warehouse for large analytical queries over cleaned, structured history; a data lake for keeping everything, in its original format, until someone knows how to use it. Which one fits depends first on how structured the data is.
Three Shapes of Data
| Type | Organisation | Examples |
|---|---|---|
| Structured | fixed schema: rows and columns | transactions, inventory, sales figures |
| Semi-structured | no fixed schema, but tags or keys mark the parts | JSON, XML, key-value records |
| Unstructured | no predefined model | emails, PDFs, images, audio, video, social media posts |
Structured data is easy to query with SQL. Unstructured data is most of what organisations now produce and the hardest to use; extracting value from it (sentiment in emails, objects in images) is a main reason to bring in machine learning.
Three Stores for Three Jobs
| Store | Optimised for | Data |
|---|---|---|
| Operational database | transactions: the current state of an application | structured, normalised |
| Data warehouse | analytical queries across large history (BigQuery is Google Cloud's) | structured, consolidated from many sources |
| Data lake | cheap storage of raw data until it is needed | any shape, in its native format |
Governance Closes the Gap Between Having Data and Using It
The course calls the distance between collecting data and getting value from it the data-value gap. Closing it needs data governance: the rules and processes that keep data
- secure: protected from unauthorised access;
- accessible: available to the people and systems that need it, across team silos;
- compliant: handled according to law and regulation.
References
- Exploring Data Transformation with Google Cloud - The Value of Data - the module these ideas come from.
- Cloud Computing MOC - hub for cloud and data notes.
- Google Cloud: What is a data lake? - lakes compared with warehouses.
Review cards
Flashcard Which store fits each job: an app's current orders, five years of sales analysis, raw clickstream kept for later?
An operational database (many small transactions), a data warehouse (analytical queries over consolidated history) and a data lake (raw data in its native format until it's needed).
Quiz Which of the following is true about semi-structured data?
- It has a fixed schema like structured data.
- It has no fixed schema but uses tags or keys to mark parts.
- It is the easiest type of data to query with SQL.
- It is the same as unstructured data.
Semi-structured data, such as JSON or XML, has no fixed schema but uses tags or keys to mark parts, making it more flexible than structured data but harder to query with SQL.
Flashcard What does data governance ensure in terms of data management?
Data governance ensures that data is secure, accessible, and compliant with laws and regulations.