ACE AI Startup BootcampDay 3: Data Architecture and ERD Design
← Back to LMS Classroom
DAY 3 TEXTBOOKACE Startup SW/AI Pilot
ACE AI Startup Bootcamp Textbook Series 03

Data Architecture and ERD Design

A self-study textbook covering essential theory, comparative examples, guided practice, quality review, and a capstone exercise. Central question: How do we preserve business rules through data structures and database constraints?

ACE AI Startup Bootcamp | Day 3Study Guide
HOW TO STUDY

Learning Goals and Study Routine

How do we preserve business rules through data structures and database constraints? You complete today’s lesson when you can answer this question in your own words, produce the required artifact, and review its quality.

Theory: 60 minPractice: 90 minReview: 30 min
01

Extract entities, attributes, and relationships from requirements.

02

Explain primary and foreign keys.

03

Apply first, second, and third normal form.

04

Express cardinality and optionality accurately.

05

Implement business rules with DDL constraints.

06

Design indexes from actual query patterns.

Recommended self-study routine

  1. Explain why a problem occurs before memorizing its terminology.
  2. Describe the difference between good and poor examples using observable criteria.
  3. Attempt the capstone before opening the model answer.
  4. Mark missing conditions in a second color and revise your artifact.
ACE AI Startup Bootcamp | Day 3Table of Contents
CONTENTS

Table of Contents

Completion standard

Submit the capstone artifact, score at least 80/100 on the self-review, and write your own answers to the four concept questions.

ACE AI Startup Bootcamp | Day 3Chapter 1 · Core Theory
CHAPTER 01

Core Theory: Data Architecture and ERD Design

Each technical term exists to solve a recurring design problem. Study when and why the concept is needed, not merely its definition.

Core conceptWorking definition
EntityA business object that must be independently identified and stored.
AttributeAn atomic data item that describes an entity.
Primary KeyA stable key that uniquely identifies a row.
Foreign KeyA key that protects referential integrity between entities.
NormalizationThe process of reducing duplication and update anomalies.
IndexAn auxiliary structure that speeds reads while increasing write and storage cost.

Poor and Effective Approaches

Avoid

Copy the customer name, phone number, and expert name into every reservation row.

Prefer

Separate Customer, Expert, and Reservation, and let Reservation reference each party by foreign key.

Design formula

[Business Noun] → [Stable Identifier] → [Atomic Attributes] → [Relationships] → [Constraints] → [Query-driven Indexes]

ACE AI Startup Bootcamp | Day 3Chapter 2 · Guided Practice
CHAPTER 02

A Six-Step Design Workflow

1

Define the problem

Collect business nouns as candidate entities.

2

Extract the structure

Merge synonyms and distinguish entities from events or transient values.

3

Design the core flow

Choose primary keys, required attributes, and data types.

4

Add failure conditions

Mark 1:N and N:M relationships and required or optional participation.

5

Connect policies

Inspect duplication and insertion, update, and deletion anomalies.

6

Verify and trace

Apply UNIQUE, NOT NULL, CHECK, FK, and justified indexes in DDL.

Worked Example

SQL DDL example
CREATE TABLE reservation ( id BIGINT PRIMARY KEY, customer_id BIGINT NOT NULL REFERENCES customer(id), seat_id BIGINT NOT NULL REFERENCES seat(id), starts_at TIMESTAMP NOT NULL, ends_at TIMESTAMP NOT NULL, status VARCHAR(20) NOT NULL CHECK (status IN ('PENDING','CONFIRMED','CANCELLED')), UNIQUE (seat_id, starts_at) ); CREATE INDEX idx_reservation_customer ON reservation(customer_id, starts_at DESC);

Questions for reading the example

  • Are the input and initiating condition explicit?
  • Are success and failure outcomes observable?
  • Are duplication, authorization, concurrency, and dependency failure covered as needed?
  • Can the result be traced back to a requirement?
ACE AI Startup Bootcamp | Day 3Chapter 3 · Review
CHAPTER 03

Concept Check and Quality Review

CONCEPT CHECK
  1. Why might a surrogate key be preferable to a natural key?
  2. What semantic risk does a nullable column create?
  3. Why must a many-to-many relationship use an associative entity?
  4. Why should we not index every column?

Answer each in two or three sentences and add one example that supports your explanation.

Self-Assessment · 100 points

AreaStandardPoints
AccuracyConcepts and technical choices match the facts and requirements.25
CompletenessNormal flow, boundaries, failures, and recovery are covered.25
ConsistencyTerms, IDs, states, and interfaces agree across artifacts.20
VerifiabilityObservable outcomes and completion criteria are present.20
ReasoningThe choice and its tradeoffs can be explained clearly.10
If your score is below 80

Do not only correct the result. Record which question you failed to ask so your next design process prevents the same omission.

ACE AI Startup Bootcamp | Day 3Chapter 4 · Capstone
CHAPTER 04

Capstone Exercise and Model Answer

SUBMISSION

Create an ERD containing Student, Course, Enrollment, and Payment. Prevent one student from enrolling in the same course twice.

  1. List assumptions and unresolved decisions first.
  2. Produce the main design as a table, diagram, or code block.
  3. Include the normal flow and at least three failures or boundaries.
  4. Score it with the rubric and compare before and after revision.
Open the model answer

Resolve the Student–Course many-to-many relationship with Enrollment. Add UNIQUE(student_id, course_id), then let Payment reference Enrollment so each payment is traceable to one enrollment.

How to use the answer

The model is not the only valid design. If yours differs, explain the requirement, cost, complexity, or risk that justifies your choice.

ACE AI Startup Bootcamp | Day 3Lesson Review
REVIEW

Glossary and Final Checklist

TermPlain-English meaning
CardinalityThe number relationship between two entities.
OptionalityWhether participation in a relationship is required.
NormalizationStructuring tables to reduce duplication and anomalies.
DDLSQL that defines tables and constraints.
Composite KeyA key made from more than one column.
Referential IntegrityThe guarantee that a referenced row exists.

Eight checks before submission

  1. Can you answer today’s central question in your own words?
  2. Are inputs, conditions, and results explicit?
  3. Did you include failures and recovery, not only the happy path?
  4. Did you review concurrency, duplicate requests, and permissions?
  5. Did you account for dependency failure and timeouts?
  6. Can you explain the disadvantages and alternatives to your choice?
  7. Are terminology and states consistent across artifacts?
  8. Is there an observable or testable completion standard?
Day 3 in one question

How do we preserve business rules through data structures and database constraints? Answer it now using evidence from the artifact you created.

ACE AI Startup Bootcamp | Day 3Self-study reference
SELF-STUDY 01

Key Terms in Context

Learn each term as a decision tool. Read across each row: definition, reason to use it, and the failure it prevents.

TermPlain definitionWhy it mattersExample or caution
EntityA business object that must be independently identified and stored.It establishes table boundaries.Name entities with nouns such as User, Order, and Product.
Primary key (PK)A value that uniquely identifies each row.It makes updates and references unambiguous.Prefer an immutable ID over a changeable email address.
Foreign key (FK)A value that references another table's primary key.It preserves relationships and referential integrity.Prevent orders from referencing a user that does not exist.
NormalizationStructuring data so one fact has one authoritative home.It reduces duplication and update anomalies.Separate current profile data from historical order snapshots.
CardinalityThe allowed number relationship between two entities.It determines 1:1, 1:N, and N:M structures.Resolve N:M with a junction table.
IndexA data structure that speeds up locating matching rows.It improves frequent query performance.Extra indexes increase write and storage cost.
Practice scenario

One user creates many orders, each order contains many products, and the purchase-time price must remain unchanged.

ACE AI Startup Bootcamp | Day 3Guided practice
SELF-STUDY 02

Guided Practice and Troubleshooting

Practice scenario

One user creates many orders, each order contains many products, and the purchase-time price must remain unchanged.

Complete in order

  1. Separate nouns from business rules to identify candidate entities.
  2. Mark the PK and required or optional attributes for each entity.
  3. Define cardinality, optionality, and delete behavior for every relationship.
  4. Write three representative queries and review indexes and history fields.
Required evidence

Save one artifact, three assumptions, and at least three failure cases. A classmate should be able to reproduce your reasoning without asking what you meant.

If the result is wrong, diagnose it

Observed symptomLikely causeNext action
Past order total changesOnly the current product price is referencedStore purchase-time unit price on OrderItem
The same fact disagrees across tablesDuplicated source dataNormalize or name one authoritative source
List query is slowMissing filter and sort indexDesign a composite index from the real query
ACE AI Startup Bootcamp | Day 3Retrieval practice
SELF-STUDY 03

Check Your Understanding

Retrieval check — answer before opening

How do you implement N:M?

Create a junction table that references both primary keys and stores relationship attributes.

Are NULL and an empty string equal?

No. NULL means no value; an empty string is a known value of length zero.

When is the ERD complete?

Keys, relationships, optionality, and delete policies explain the business rules and key queries.

Teach it back in two minutes

Explain the day's main decision, one failure mode, and one verification method without reading the page. If you cannot connect all three, return to the row or diagnostic case you missed.