
Data storage and database structure is the set of ways an organization keeps data, describes it, connects it, protects it, and makes it usable. It covers what happens to data from creation through disposal. It also covers how repositories and tables hold data for operational work and analysis.
It exists because data may be raw, curated, shared, retained, or deleted at different times. Users need both flexible storage and reliable relationships. Clear structure reduces duplicate data, update errors, broken links, and unclear definitions. Clear storage roles make data available for the right use without treating every repository alike.
It appears when an application records a customer, when a data lake keeps raw logs, and when a warehouse supports reports. It appears when a mart serves a subject team and when a relational database uses keys and constraints. Analytical reports may arrange the same facts and dimensions in a star or snowflake layout. These ideas are related, but they answer different questions.
The grid separates four ideas that can involve the same data. Life-cycle actions describe what happens over time. Repository roles describe where data is kept. Relational foundations describe dependable records and relationships. Analytical layouts describe how facts and dimensions are arranged.
| Life-cycle actions | Repository roles | Relational foundations | Analytical layouts |
|---|---|---|---|
| Create, store, use, share, retain, destroy; what happens to data over time | Warehouse, lake, mart; why a repository holds data | Tables, keys, integrity, metadata, normalization; how related data stays dependable | Fact and dimension tables in star or snowflake form; how analytical data is arranged |
A secure deletion question concerns a life-cycle action, while a raw-versus-curated question concerns a repository role.
The six life-cycle stages are create, store, use, share, retain, and destroy.
Create means collecting or generating data. It also means identifying its purpose and owner. Needed quality or classification information is captured at this stage.
Store means placing data in an approved location. The data needs protection for confidentiality, integrity, and availability. Backups and metadata also need protection.
Use means authorized users or systems retrieve, process, or analyze data. Quality must remain useful, and relevant activity logs should be maintained.
Share means providing data to an authorized person or system. Permissions, the recipient, secure transfer, and any needed agreement must be checked.
Retain means keeping data for the period required by applicable law, regulation, contract, or business policy. Access and integrity must be preserved during retention.
Destroy means securely removing data when the retention requirement ends. Copies or media must also be removed when policy requires it. The disposal must be documented.
Use and share can recur while data remains stored. No universal retention duration applies.
The details are in The data life cycle.
A data warehouse is a broad repository of integrated, cleaned, or curated data. It mainly holds structured data for reporting and analysis. It commonly uses schema-on-write, which applies structure before data is stored.
A data lake is a broad repository that can hold raw structured, semi-structured, and unstructured data. Structure is commonly applied at query time through schema-on-read.
A data mart is a smaller, subject-specific, or department-focused collection. It is designed for focused access and is often derived from a warehouse.
Scope and preparation provide the main clues:
No universal row-count, storage-size, or percentage cutoff defines these roles.
The details are in Warehouses, lakes, marts and schemas.
Relational database structure has five parts: tables, keys, integrity rules, a data dictionary, and normalization.
Tables hold rows and columns. Keys identify rows and connect tables.
A primary key is unique and not null. Each nonnull foreign-key value must match a referenced primary key or other candidate key. A foreign-key column may be null when the relationship is optional and the column permits nulls.
Integrity rules include entity integrity, referential integrity, and domain integrity. Domain integrity uses data types, allowed values, ranges, and nullability.
A data dictionary stores metadata about the database. It can include table and column names, definitions, data types, lengths, nullability, owners, sources, and allowed values.
Normalization reduces redundancy and update anomalies. First normal form, or 1NF, requires atomic field values and no repeating groups. Second normal form, or 2NF, requires 1NF and no partial dependency on part of a composite key. Third normal form, or 3NF, requires 2NF and no transitive dependency of a non-key attribute on another non-key attribute.
Consider OrderLine(OrderID, ProductID, ProductName, Quantity). OrderID plus ProductID identifies a row. ProductName depends only on ProductID. ProductID and ProductName therefore move to Product. OrderLine keeps OrderID, ProductID, and Quantity.
The details are in Relational database structure.
A fact table records measurable business events and foreign keys. Dimension tables describe the date, product, store, customer, or other context.
A star layout has a central FactSales(DateKey, ProductKey, StoreKey, Units, SalesAmount) table. It links directly to denormalized dimensions.
Examples include DimDate(DateKey, Date, Month, Quarter, Year), DimProduct(ProductKey, ProductName, Brand, Category), and DimStore(StoreKey, StoreName, Region).
A snowflake layout keeps the fact table but normalizes dimensions into related tables. Examples include DimProduct(ProductKey, ProductName, BrandKey), DimBrand(BrandKey, BrandName, CategoryKey), and DimCategory(CategoryKey, CategoryName).
Star layouts usually need fewer joins and are simpler for reporting. They repeat some dimension data. Snowflake layouts reduce dimension redundancy but require more joins and more complex navigation. Neither layout is universally required or superior.
The details are in Warehouses, lakes, marts and schemas.
Ask one question: Is the situation mainly about when or what happens to data, the purpose and scope of its repository, the validity and relationships of records, or the arrangement of facts and dimensions?
The main issue controls the classification, even when supporting details belong to another idea.
| A situation about... | Belongs to | Clue words |
|---|---|---|
| What happens to a data asset at a point in its existence | Life-cycle actions | create, store, use, share, retain, destroy, retention, secure deletion |
| Why and where data is kept, including scope and preparation | Repository roles | raw, curated, integrated, broad, subject-specific, warehouse, lake, mart, schema-on-read, schema-on-write |
| How records, fields, keys, relationships, and definitions are controlled | Relational foundations | table, row, column, primary key, foreign key, null, integrity, data dictionary, normalization |
| How analytical facts connect to descriptive dimensions | Analytical layouts | fact table, dimension, star, snowflake, denormalized, normalized, joins |
The decisive clue is the question being asked, not every detail mentioned in the situation.
The matrix compares the same dimensions across all four ideas. A single data asset can appear in more than one column at different levels. Its retention status, repository, keys, and reporting arrangement answer different questions.
| Dimension | Life-cycle actions | Repository roles | Relational foundations | Analytical layouts |
|---|---|---|---|---|
| Main question | What happens to the data now? | Where is data kept and for what scope? | How are records and relationships defined? | How are facts and dimensions arranged? |
| Named parts | Create, store, use, share, retain, destroy | Warehouse, lake, mart | Tables, keys, integrity, data dictionary, normalization | Fact table, dimension tables, star, snowflake |
| Defining rule | Retain for the required period and destroy when it ends | Scope and preparation distinguish broad curated, broad raw, and narrow focused roles | Primary keys identify, foreign keys connect, constraints validate, normalization reduces redundancy | Star uses direct denormalized dimensions; snowflake normalizes dimensions into related tables |
| Common result | Data is handled, protected, retained, or disposed of appropriately | Users get a repository suited to reporting, exploration, or focused access | Data is more consistent, understandable, and less prone to update anomalies | Reports can query business events and their descriptive context |
| Clue words | retention, sharing, secure disposal, owner, stage | raw, curated, integrated, subject area, lake, warehouse, mart | key, constraint, null, metadata, dependency, dictionary | fact, dimension, join, star, snowflake, hierarchy |
A star layout is not a life-cycle stage, and a foreign-key rule is not a warehouse classification.
Each situation has several facts but one main issue. The correct part depends on the decisive clue and the question that part answers.
Practice
A customer-record system has reached the end of its organization-approved retention period. The administrator must securely erase the records from active storage and document the disposal. Which part of data storage and database structure best describes the main issue, and why?
An analytics team wants to keep raw JSON events, application logs, and video in a broad repository. The team will impose structure when a query needs it rather than clean every file before loading it. Which part of data storage and database structure best describes the main issue, and why?
An OrderLine table stores OrderID, ProductID, ProductName, and Quantity. OrderID plus ProductID identifies the row, but ProductName depends only on ProductID. Designers plan to split product data into Product and keep quantity in OrderLine. Which part of data storage and database structure best describes the main issue, and why?
Sales reporting has a FactSales table linked directly to Date, Product, and Store dimension tables. Product category is stored in each product dimension row instead of separate hierarchy tables. Which part of data storage and database structure best describes the main issue, and why?
Signup to continue reading this lesson and unlimited access questions, flashcards, AI notes, and more
1. 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?
Answer: D. Restrict deletion of referenced products and use an inactive-product flag that invoice entry validates.
> Key point: Restrict deletion to preserve referenced history; use an inactive flag to block discontinued products on new invoices. Why restrict deletion and validate an inactive-product flag is correct - Restricting deletion keeps referenced products available, preserving invoice lines and their valid product references. - Marking discontinued products inactive lets invoice entry prevent their selection on new invoices. How they compare | Design | Historical lines and references | New invoices | |---|---|---| | Restrict deletion; validate inactive flag | Preserved; references remain valid | Inactive products blocked | | Cascade deletions | Lines are erased | Active-status field does not identify discontinued products | | Set identifiers to null; unique index | References are severed | Unique index does not block discontinued products | | Remove foreign key; application validation | Database can accept invalid references | Does not reliably distinguish discontinued products | Why the other options are wrong - Cascade product deletions to invoice lines and retain an active-status field on each invoice: Cascading erases historical lines, and invoice status does not mark discontinued products. - Set product identifiers on invoice lines to null when products are deleted and apply a unique index: Nulling severs the historical references; a unique index does not prevent selecting discontinued products. - Remove the foreign-key constraint and rely on the invoice-entry application to validate product identifiers: Other database processes could create invalid references, and this does not distinguish inactive products.
2. 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?
Answer: A. A unique composite constraint on PaymentID and InvoiceID
> Key point: A unique constraint on both IDs blocks duplicate payment–invoice pairs while allowing either ID to recur with a different partner. Why a unique composite constraint on PaymentID and InvoiceID is correct - The pair identifies one payment application, so it cannot be recorded twice. - Either ID can still appear in multiple rows when paired with a different ID, preserving both types of multiple relationships. How they compare | Constraint | Effect | |---|---| | PaymentID + InvoiceID | Blocks duplicate pairs; allows either ID to recur with another partner | | PaymentID only | Allows each payment once | | InvoiceID only | Allows each invoice once | | AmountApplied only | Makes amounts unique, not payment–invoice pairs | Why the other options are wrong - A unique constraint on PaymentID only: prevents one payment from being applied to several invoices. - A unique constraint on InvoiceID only: prevents one invoice from being settled by several payments. - A unique constraint on AmountApplied only: does not prevent duplicate ID pairs with different amounts and can reject different applications with the same amount.
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?
Answer: A. Store course attributes once in a Course table and retain CourseID as a foreign key in Training
> Key point: Store each course’s attributes once, and link training records to that course with CourseID. Why storing course attributes once is correct - CourseTitle and CourseInstructor belong to the course, so keeping them in a Course table prevents repeated values from diverging across training rows. - Retaining CourseID as a foreign key in Training preserves the relationship between each training record and its course. How they compare | Redesign | Course attributes | Effect | |---|---|---| | Course table; CourseID in Training | Stored once | Prevents inconsistent updates and preserves the link | | Instructor on detail rows | Repeated | Updates can still diverge | | Composite training key; attributes retained | Repeated | Does not remove the update anomaly | | View using maximum instructor name | Conflicts remain stored | Reporting does not fix the data | Why the other options are wrong - Move CourseInstructor to each training-detail row and retain CourseID in both training tables: Repeats the instructor value, so updates can still become inconsistent. - Use EmployeeID and CourseID as a composite primary key while retaining all course attributes: The key may identify training rows, but course attributes still depend on CourseID and remain duplicated. - Create a view that returns the maximum instructor name found for each course's training records: The view selects a value for display but does not fix conflicting stored values.
4. A relational accounting database stores an Account table and a JournalEntryLine table whose AccountID field references the Account table. Management wants users to deactivate obsolete accounts while preserving historical journal-entry relationships. Which database design best satisfies this objective?
Answer: B. Add an active-status field and restrict deletion of referenced accounts
> Key point: Deactivate an account without deleting it, and prevent deletion while journal lines reference it. Why adding an active-status field and restricting deletion is correct - The status field lets users deactivate obsolete accounts while retaining their records. - Restricting deletion preserves the AccountID links from historical journal lines. How they compare | Design | Preserves account record? | Preserves historical link? | |---|---|---| | Active status; restrict deletion | Yes | Yes | | Delete; set AccountID to null | No | No | | Delete; cascade journal lines | No | No | | Spreadsheet; reuse AccountID | No | No | Why the other options are wrong - Delete obsolete accounts and set related journal AccountID values to null: Nulling the IDs severs the historical links. - Delete obsolete accounts and cascade the deletion to journal-entry lines: This removes the historical transaction detail. - Move obsolete accounts to a spreadsheet and reuse their AccountID values: This takes records outside the database and risks making old entries appear linked to a different account.
5. 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?
Answer: A. Create an AccountCategory table with AccountID and CategoryID as a composite primary key and as foreign keys to their respective tables.
> Key point: Represent a many-to-many relationship with a junction table containing foreign keys to both related tables. Why the AccountCategory junction table is correct - Each row represents one account–category assignment, allowing an account to belong to several categories and a category to include several accounts. - The composite primary key prevents duplicate assignments; the foreign keys link each assignment to an existing account and category. How they compare | Design | What it represents | Why it fits or fails | |---|---|---| | AccountCategory with AccountID and CategoryID | Many-to-many assignments | Correct: one row per assignment | | CategoryID as Account’s primary key | One category value per account row | Cannot represent multiple categories per account | | AccountID as a foreign key in Category | One account per category row | Cannot represent multiple accounts per category | | Delimited CategoryID values in Account | Repeating values in one field | Does not properly represent individual assignments | Why the other options are wrong - Add CategoryID to Account as its primary key: A single category value cannot capture an account’s multiple category assignments, and CategoryID would not identify the account. - Add AccountID to Category as a single foreign key: Each category row could reference only one account, despite categories containing several accounts. - Store CategoryID values in a delimited Account field: This stores repeating values in one field and complicates joins and updates.
6. 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?
Answer: A. Create a project table keyed by ProjectID and retain ProjectID as a foreign key in the employee table.
> Key point: Store project attributes with ProjectID in a separate project table so they survive deletion of employee assignments. Why the project table is correct - ProjectName and ProjectManager depend on ProjectID, so they belong in a project table keyed by ProjectID. - Keeping ProjectID as a foreign key in the employee table preserves the link while allowing the project record to remain after its last employee assignment is deleted. How they compare | Redesign | Effect on deletion anomaly | |---|---| | Separate project table | Project details remain independently stored | | Employee-name table | Project details remain tied to assignments | | Add project fields to key | Project details remain in assignment rows | | Add indexes | Data remains in assignment rows | Why the other options are wrong - Create a separate employee-name table keyed by EmployeeName and remove EmployeeID: EmployeeName is not established as a unique identifier, and this does not separate project details from employee assignments. - Add ProjectName and ProjectManager to a composite primary key: Changing the key does not move project attributes out of the assignment rows, so deleting the last row still loses them. - Create indexes on ProjectName and ProjectManager: Indexes support searching; they do not independently preserve project information when the last assignment row is deleted.
7. 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?
Answer: A. A ProductSupplier table keyed by ProductID and SupplierID, with negotiated unit price
> Key point: Store a many-to-many relationship and any value specific to each pairing in a junction table keyed by both entities. Why the ProductSupplier table is correct - A product-supplier table with a composite ProductID–SupplierID key represents each pairing uniquely. - The negotiated price belongs on that row because it depends on the product-supplier combination. How they compare | Design | Represents both sides? | Stores pairing price? | |---|---|---| | ProductSupplier with composite key | Yes | Yes; per pairing | | Product with one SupplierID | No; one supplier per product | No; price is product-level | | Supplier with one ProductID | No; one product per supplier | No; price is supplier-level | | PurchaseOrder by PurchaseOrderID | No; identifies a transaction | No; not a pairing key | Why the other options are wrong - Product table keyed by ProductID, with one SupplierID and negotiated unit price: cannot represent several suppliers for one product, or a separate price for each supplier. - Supplier table keyed by SupplierID, with one ProductID and negotiated unit price: cannot represent several products for one supplier, or a separate price for each product. - PurchaseOrder table keyed by PurchaseOrderID, with the current negotiated unit price: identifies a transaction rather than each product-supplier pairing, so it does not maintain the negotiated price for every pairing.
1. What are the attributes of an expert system (ES)?
It uses a knowledge base and inference engine to apply rules and logical reasoning. It typically accepts facts or queries from a user; human input may be required.
2. What is the purpose of automated equipment controls?
They are used to identify and prevent issues with hardware.
3. What is the function of a check digit in data entry?
A check digit is an additional digit, often appended to a number, that helps detect certain data-entry or transcription errors; it does not prove that the entire number is accurate.
Get full Oncourse access with lessons, practice questions, flashcards and AI study tools.
Scan to download app
Enter your email to get your 75% OFF code and unlock the full CPA question bank on the app.