Warehouses, lakes, marts and schemas

Warehouses, lakes, marts and schemas

Published September 28, 2026

Warehouses, lakes, marts and schemas

On this page

Warehouse, lake and mart roles

The data life cycle describes collection, storage, use, and retention. After data is created and collected, an organization chooses how to store and prepare it. The table compares the repository's role, not its size alone.

AttributeData warehouseData lakeData mart
Main purposeEnterprise analysis, reporting, and decision supportFlexible storage and exploration of many kinds of dataAnalysis and reporting for one department, function, or subject
ScopeBroad, organization-wide or cross-functional scopeBroad scope covering data from many sources and usesNarrow, focused scope for a business unit or subject
Data formMostly structured, integrated business dataStructured, semi-structured, and unstructured dataMostly structured data focused on its subject
PreparationCleansed, transformed, and organized before common useOften kept in raw form; structure is applied when the data is usedCleansed and organized for a specific reporting or analysis need
Typical contentIntegrated sales, finance, customer, inventory, or operations historyRaw logs, files, sensor readings, text, images, audio, and source extractsA sales mart, finance mart, marketing mart, or other focused subset
Common usersManagers, analysts, and reporting teams across the organizationData engineers, data scientists, and analysts exploring varied dataA department's analysts and managers
Clue wordsenterprise-wide, integrated, governed, historical reporting, curatedraw, any format, schema on read, exploratory, logs, files, sensor datadepartment, business function, focused subset, sales mart, marketing mart

Notice the deciding contrast: a warehouse is broad and curated, a lake is broad and raw, and a mart is focused and curated. A mart may receive data from a warehouse or directly from source systems.

Star and snowflake table layouts

Relational database structure explains relational tables, integrity rules, the data dictionary, and normalization. Both designs use a central fact table and descriptive dimension tables. The comparison here concerns how those tables are arranged.

AttributeStar schemaSnowflake schema
Core layoutOne central fact table connects directly to dimension tablesOne central fact table connects to dimensions that may connect to other dimension tables
Dimension designDimensions are generally denormalized and kept wideDimensions are normalized and split into related tables
Number of joinsUsually fewer joins from a fact table to descriptive dataUsually more joins because descriptive data is split
Repeated valuesMore repeated descriptive values may be storedLess repeated descriptive data is stored
Query useSimpler queries and direct reporting pathsMore complex queries but more structured dimension relationships
MaintenanceEasy for reporting users to understand; repeated values can require more storage or updatesMore tables and joins to manage; shared dimension details can be maintained in one place
Clue wordsdirectly linked, wide dimension, denormalized, fewer joins, simple reportingnormalized, split dimension, related dimension tables, more joins, less redundancy

Notice that the fact table can hold the same business measures in either design. The deciding feature is the structure of the dimensions.

Scope, preparation and normalization

Storage cases turn on the repository's role. That role combines scope with preparation.

  • Broad and raw data points to a data lake.
  • Broad and curated data points to a data warehouse.
  • Focused and curated data points to a data mart.

These are typical classifications, not a required data movement sequence. A mart may be fed by a warehouse or directly by source systems.

Schema cases turn on dimension normalization. One wide dimension directly connected to the fact table points to a star schema. Dimensions split into related normalized tables point to a snowflake schema. Both schemas can contain the same business facts.

Classifying warehouses, lakes and marts

The deciding line is direct: raw and broad supports a lake, curated and broad supports a warehouse, and curated and focused supports a mart.

Practice

A company combines cleaned sales, inventory, and customer data from many systems in a governed repository used for organization-wide reporting and analysis. Which description best identifies the repository?

An organization stores raw application logs, sensor readings, text files, images, and audio from many sources. Analysts decide how to structure each type when they use it. Which description best identifies the repository?

The marketing department receives a cleansed set of campaign, customer, and response data for its own reports. It does not contain the organization's full finance and operations data. Which description best identifies the repository?

Identifying star and snowflake schemas

A warehouse or mart can use either schema. Look at the dimensions rather than the repository name. Direct links and fewer joins indicate star, while split normalized dimensions indicate snowflake.

Practice

A sales fact table links directly to wide customer, product, and store dimension tables. Report writers use short queries with few joins, and some descriptive values repeat in the dimensions. Which schema is this?

A product dimension is divided into product, brand, and category tables. The tables reduce repeated descriptions, but a report must join through the related dimension tables to reach the fact table. Which schema is this?

A broader scope makes a warehouse

The classification moves because scope changed, not because the data became more structured.

Was: A company gives the sales department a cleansed repository containing sales, customer, and product data for sales reporting. Which one is this?

Answer: Data mart.

Now: The same cleansed repository is expanded to combine sales, finance, inventory, and operations data for reporting across the company.

Which one now?

Answer: Data warehouse. The changed fact is scope. The repository moved from one department to enterprise-wide coverage, while its curated preparation did not change.

Storage scope and dimension normalization

  • Data warehouse: Broad, integrated, curated data for enterprise analysis.
  • Data lake: Broad raw data in many formats, with structure applied when used.
  • Data mart: Focused, curated data for one department or subject.
  • Star schema: One fact table directly connected to wide dimensions.
  • Snowflake schema: Normalized dimensions split into related tables.

The deciding axis is scope and preparation for storage, and dimension normalization for schemas. Warehouses, lakes, marts and schemas connects The data life cycle's storage stage with Relational database structure's tables and normalization.

Unlock the full lesson and continue reading

Signup to continue reading this lesson and unlimited access questions, flashcards, AI notes, and more

Scan to download app

Scan to download
UNLOCK FREE ACCESS

Practice Questions: Warehouses, lakes, marts and schemas

  1. 1. An employee-assignment table contains EmployeeID, EmployeeName, ProjectID, ProjectName, and ProjectManager. ProjectName and ProjectManager depend on ProjectID rather than on EmployeeID. If the last employee assigned to a project is removed from the table, all information about that project's name and manager is lost. Which redesign best reduces this deletion-anomaly risk?

    • A. Create a project table keyed by ProjectID and retain ProjectID as a foreign key in the employee table.
    • B. Create a separate employee-name table keyed by EmployeeName and remove EmployeeID from the employee table.
    • C. Retain one table but add ProjectName and ProjectManager to a composite primary key.
    • D. Retain one table and create indexes on ProjectName and ProjectManager.
    Show answer

    Answer: A. Create a project table keyed by ProjectID and retain ProjectID as a foreign key in the employee table.

    Create a project table keyed by ProjectID and retain ProjectID as a foreign key in the employee table. - ProjectName and ProjectManager depend on ProjectID, so a project table stores those attributes independently of employee assignments. - Deleting the last employee assigned to a project then leaves its project record, name, and manager intact. Create a separate employee-name table keyed by EmployeeName and remove EmployeeID from the employee table. - EmployeeName is not established as a unique, stable identifier, so it is not a sound replacement for EmployeeID. - Separating names leaves project information tied to employee rows and does not prevent its loss when the last assignment is deleted. Retain one table but add ProjectName and ProjectManager to a composite primary key. - Adding project attributes to the primary key does not change the fact that they depend on ProjectID. - Their values would still be lost if the last row for a project were deleted. Retain one table and create indexes on ProjectName and ProjectManager. - Indexes can speed searches but do not store project information independently of employee rows. - Deleting the last employee assigned to a project would still delete the only remaining record of its name and manager.

  2. 2. A normalized purchasing database must record that each product may be supplied by several suppliers and each supplier may provide several products. The database must also store the negotiated unit price for each product-supplier combination. Which table design is most appropriate?

    • A. A ProductSupplier table keyed by ProductID and SupplierID, with negotiated unit price
    • B. A Product table keyed by ProductID, with one SupplierID and negotiated unit price
    • C. A Supplier table keyed by SupplierID, with one ProductID and negotiated unit price
    • D. A PurchaseOrder table keyed by PurchaseOrderID, with the current negotiated unit price
    Show answer

    Answer: A. A ProductSupplier table keyed by ProductID and SupplierID, with negotiated unit price

    A ProductSupplier table keyed by ProductID and SupplierID, with negotiated unit price - The ProductID–SupplierID key uniquely identifies each pairing in the many-to-many relationship. - Negotiated unit price belongs in that table because it depends on the combination, not on either product or supplier alone. A Product table keyed by ProductID, with one SupplierID and negotiated unit price - One SupplierID per product cannot represent a product supplied by several suppliers. - The price could differ by supplier, so storing it on the Product row would not represent each negotiated pairing. A Supplier table keyed by SupplierID, with one ProductID and negotiated unit price - One ProductID per supplier cannot represent a supplier providing several products. - The price could differ by product, so storing it on the Supplier row would not represent each negotiated pairing. A PurchaseOrder table keyed by PurchaseOrderID, with the current negotiated unit price - PurchaseOrderID identifies a transaction, not a unique product-supplier pairing. - A purchase order may record a transaction price, but it is not the appropriate table for maintaining the negotiated price for each pairing.

  3. 3. An employee training table stores EmployeeID, CourseID, CourseTitle, CourseInstructor, CompletionDate, and Score. A course's instructor name therefore appears on hundreds of training rows, and recent updates changed only some of those rows. Which redesign would best prevent this update anomaly while preserving the relationship between courses and training records?

    • A. Store course attributes once in a Course table and retain CourseID as a foreign key in Training
    • B. Move CourseInstructor to each training-detail row and retain CourseID in both training tables
    • C. Use EmployeeID and CourseID as a composite primary key while retaining all course attributes
    • D. Create a view that returns the maximum instructor name found for each course's training records
    Show answer

    Answer: A. Store course attributes once in a Course table and retain CourseID as a foreign key in Training

    Store course attributes once in a Course table and retain CourseID as a foreign key in Training - CourseTitle and CourseInstructor depend on CourseID, so storing them once in Course prevents inconsistent updates across hundreds of training rows. - Keeping CourseID as a foreign key in Training preserves the link between each training record and its course. Move CourseInstructor to each training-detail row and retain CourseID in both training tables - Putting CourseInstructor on each training-detail row repeats the value rather than storing it once per course. - Retaining CourseID in both training tables does not prevent some instructor names from being updated while others remain unchanged. Use EmployeeID and CourseID as a composite primary key while retaining all course attributes - A composite key may identify a training row, but CourseInstructor still depends on CourseID alone. - Retaining course attributes on training rows leaves the same instructor name duplicated and vulnerable to inconsistent updates. Create a view that returns the maximum instructor name found for each course's training records - A view displaying the maximum instructor name does not change the conflicting values stored in the training table. - Choosing one name for reporting does not establish which instructor name is authoritative or prevent future inconsistent updates.

  4. 4. A payment may be applied to several invoices, and an invoice may be settled through several payments. The PaymentApplication table contains PaymentID, InvoiceID, and AmountApplied. Which database constraint would best prevent the same payment from being applied twice to the same invoice while permitting both types of multiple relationships?

    • A. A unique composite constraint on PaymentID and InvoiceID
    • B. A unique constraint on PaymentID only
    • C. A unique constraint on InvoiceID only
    • D. A unique constraint on AmountApplied only
    Show answer

    Answer: A. A unique composite constraint on PaymentID and InvoiceID

    A unique composite constraint on PaymentID and InvoiceID - The PaymentID–InvoiceID pair identifies one application, so a duplicate pair cannot record the same payment against the same invoice twice. - Either ID can still appear in multiple rows when paired with different IDs, permitting payments across invoices and multiple payments toward an invoice. A unique constraint on PaymentID only - Requiring PaymentID to be unique would prevent one payment from being applied to several invoices. - It would block valid applications even when their InvoiceID values differ. A unique constraint on InvoiceID only - Requiring InvoiceID to be unique would prevent an invoice from being settled through several payments. - It would block valid applications even when their PaymentID values differ. A unique constraint on AmountApplied only - AmountApplied is an amount, not an identifier for a payment–invoice relationship, so its uniqueness would not prevent duplicate ID pairs with different amounts. - It would also reject legitimate applications to different invoices or from different payments that happen to have the same amount.

  5. 5. An accounting database stores products in a Product table and historical invoice lines in an InvoiceLine table. Management must retain all invoice lines, prevent them from referring to nonexistent products, and stop users from selecting discontinued products on new invoices. Which design best meets these requirements?

    • A. Cascade product deletions to invoice lines and retain an active-status field on each invoice.
    • B. Set product identifiers on invoice lines to null when products are deleted and apply a unique index.
    • C. Remove the foreign-key constraint and rely on the invoice-entry application to validate product identifiers.
    • D. Restrict deletion of referenced products and use an inactive-product flag that invoice entry validates.
    Show answer

    Answer: D. Restrict deletion of referenced products and use an inactive-product flag that invoice entry validates.

    Restrict deletion of referenced products and use an inactive-product flag that invoice entry validates. - Restricting deletion of referenced products preserves historical InvoiceLine records and prevents their product identifiers from pointing to nonexistent Product records. - An inactive-product flag lets the products remain in the database while invoice entry blocks users from selecting them on new invoices. Cascade product deletions to invoice lines and retain an active-status field on each invoice. - Cascading deletion would erase historical invoice lines when a referenced product is deleted, violating the retention requirement. - An active-status field on each invoice does not identify which products have been discontinued. Set product identifiers on invoice lines to null when products are deleted and apply a unique index. - Setting product identifiers to null would sever historical invoice lines from the products they record. - A unique index does not preserve those relationships or prevent discontinued products from being selected on new invoices. Remove the foreign-key constraint and rely on the invoice-entry application to validate product identifiers. - Without the foreign-key constraint, the database could accept an InvoiceLine that refers to a nonexistent Product through another process. - Application validation alone does not protect database-level integrity or provide a way to distinguish discontinued products during invoice entry.

  6. 6. An ERP permits each general ledger account to be assigned to several management-reporting categories, and each reporting category may contain several accounts. Which relational design most appropriately represents these assignments without storing repeating category values in the account table?

    • A. Create an AccountCategory table with AccountID and CategoryID as a composite primary key and as foreign keys to their respective tables.
    • B. Add CategoryID to the Account table as its primary key and retain AccountID as a nonkey descriptive attribute.
    • C. Add AccountID to the Category table as a single foreign key so each category identifies one participating account.
    • D. Store all applicable CategoryID values in one delimited field within each row of the Account table.
    Show answer

    Answer: A. Create an AccountCategory table with AccountID and CategoryID as a composite primary key and as foreign keys to their respective tables.

    Create an AccountCategory table with AccountID and CategoryID as a composite primary key and as foreign keys to their respective tables. - The ERP’s many-to-many relationship requires a separate row for each account–category assignment, rather than repeating categories in the Account table. - The composite primary key prevents duplicate assignments, while the two foreign keys link each row to an existing account and category. Add CategoryID to the Account table as its primary key and retain AccountID as a nonkey descriptive attribute. - Making CategoryID the Account table’s primary key would identify accounts by category, not by AccountID. - A single CategoryID in an account row also cannot represent that account’s assignments to several categories. Add AccountID to the Category table as a single foreign key so each category identifies one participating account. - One AccountID in each Category row permits that category to reference only one account. - The stem requires each reporting category to contain several accounts, so this design does not represent the stated relationship. Store all applicable CategoryID values in one delimited field within each row of the Account table. - A delimited field stores repeating category values in one Account column, contrary to the design requirement. - It also prevents ordinary foreign-key enforcement for each CategoryID and complicates joins and updates to assignments.

  7. 7. An entity must be able to determine which approved vendor bank account was in effect when each electronic payment was released. The current vendor table overwrites the prior bank account whenever a change is approved. Which database design best supports this requirement?

    • A. Store immutable bank-account history records with effective dates and reference the applicable record from each payment
    • B. Continue overwriting the vendor record and retain monthly copies of the entire vendor table
    • C. Store the current bank-account number in each invoice record when the invoice is entered
    • D. Add an index to the bank-account field in the existing vendor master table
    Show answer

    Answer: A. Store immutable bank-account history records with effective dates and reference the applicable record from each payment

    Store immutable bank-account history records with effective dates and reference the applicable record from each payment - Effective-dated history preserves each approved bank account instead of overwriting prior values. - A payment’s reference to the applicable immutable record identifies the approved account in effect when that payment was released. Continue overwriting the vendor record and retain monthly copies of the entire vendor table - Monthly copies can miss bank-account changes approved between snapshots. - Because the live vendor record still overwrites prior values, a snapshot may not identify the account in effect at a particular payment’s release. Store the current bank-account number in each invoice record when the invoice is entered - Invoice entry may precede a bank-account change approved before payment release. - The invoice’s stored number therefore does not establish which approved account was in effect when the payment was released. Add an index to the bank-account field in the existing vendor master table - An index speeds access to stored bank-account values but does not retain values the vendor table overwrites. - Without historical account records, the indexed table cannot establish which approved account was in effect at payment release.

Flashcards: Warehouses, lakes, marts and schemas

  1. 1. Describe the characteristics of a Decision Support System (DSS).

    Show answer

    - Provides data analysis - Offers interactive support - Requires human judgment

  2. 2. What distinguishes a computer worm from other malware?

    Show answer

    A worm spreads across multiple systems independently of a host application.

  3. 3. What features define an Executive Information System (EIS)?

    Show answer

    An EIS is tailored to executive needs and provides summarized information and analytical tools to support strategic planning and executive decision-making. It supports decisions but does not make them autonomously.

Everything you need for CPA prep

Get full Oncourse access with lessons, practice questions, flashcards and AI study tools.

GET STARTED FOR FREE
75% OFFLimited time offer
GET 75% OFF