Unit 3 / 11

Data Modeling, Data Dictionary and Enterprise Data Architecture

Gains:

  • Ability to explain conceptual, logical and physical data models and normalization concepts and produce entity-relationship drafts with the support of artificial intelligence
  • Ability to draft data dictionary, business rule and table relationships with structured prompts and verify them against the real system
  • Ability to critically evaluate AI-generated schema suggestions in terms of integrity, singularity and business rule compliance.

An information system is essentially a structure that keeps data organized. Data modeling is the task of designing the facts of a business (customer, order, product, invoice) and their relationship to each other in a structured way. A good data model is the foundation of accurate reporting, fast queries, and consistent data; A bad model is the source of years of inconsistency and repetitive correction work. Most of the time, the MIS professional does not code the model from scratch, but verifies that the model complies with the business rules and translates the model between the business unit and IT.

Data modeling proceeds at three levels of abstraction. The conceptual model (English conceptual) is the highest level: what main entities exist and how are they related? "The customer places an order, the order includes the product." There are no technical details. The logical model defines the attributes (fields), keys, and relationship types of each entity; but it is still not tied to a specific database product. The physical model (English physical) is the concrete version of the tables, data types and indexes in a specific database (e.g. SQL Server, PostgreSQL). These three levels are increasingly detailed versions of the same idea.

Entity-Relationship and Keys

The basic language of the data model is the Entity-Relationship (ER) model. Entity can be thought of as a table: Customer, Order. The attribute is the column of the table: name, email, amount. Relationship is how entities are connected: a customer can have many orders (one-to-many relationship).

There are two critical key concepts. Primary key is the field that uniquely identifies each row in a table; for example CustomerID. A foreign key is a field in one table that points to the primary key of another table; The CustomerID in the order table connects which customer's order it is. These connections ensure referential integrity: an order cannot be placed for a customer that does not exist.

Tip: When having the AI ​​generate an ER draft, it makes it easier to explicitly request the primary key for each table and the foreign key for each relationship. But verify each foreign key suggested by the model against the actual business rule: sometimes the relationship you think is "one-to-many" is actually "many-to-many".

Normalization: Preventing Recurrence

Normalization is the process of reducing redundancy and preserving integrity by dividing data into logical tables. The goal is to keep the same information in one place. For example, instead of typing the customer address over and over again in each order line, you keep the address once in the Customer table and link it with a foreign key from the order. This way, when the address changes, you update it in one place; Otherwise, hundreds of orders will have different addresses. This is called update anomaly.

The opposite of normalization is denormalization: deliberately allowing some repetition for the sake of reporting speed. In business systems (operational database), normalization is generally preferred, and in reporting systems (data warehouse), denormalization is often preferred. So "normalization is not always good"; The decision is made according to the purpose.

Data Dictionary: Common Language

Data dictionary is a document that defines what each field means, its type, constraints and business rule. What does the "status" field mean? What values ​​can it take (Pending, Approved, Cancelled)? Is it mandatory? Without this document, the same field will be interpreted differently by different teams and the report will be distorted. The data dictionary is the lingua franca of the organization and one of the MIS professional's most valuable deliverables. AI can quickly extract an initial data dictionary draft from the existing table structure; But only the unit using that data verifies the true business meaning of each field.

Three Mini Cases: By the Numbers

Case 1 — The cost of repetition. In a distribution company, the customer address was kept separately in both the order and invoice tables. When a customer moved, the address was updated in only one table; 1,400 invoices went to the old address and were refunded. If the address was normalized in a single table, a single update would be sufficient. The remediation project cost 2 weeks.

Case 2 — Wrong type of relationship. An MIS expert in an educational institution acknowledged the (one-to-many) relationship “Student belongs to a Class” in the AI ​​generated model. However, students could enroll in more than one elective class; The relationship was actually many-to-many and an intermediate table (Record) was required. The mistake was revealed in the field when a student failed to enroll in the second grade. If the AI's suggestion had been confirmed, it would have been caught from the start.

Case 3 — Value of data dictionary. It was determined that the "policy_status" field in an insurance company was interpreted differently by 5 different teams, so the same KPI gave 3 different results in the reports. By drafting an AI-powered data dictionary and achieving uniform agreement with the business unit, report inconsistency was eliminated and monthly reconciliation meeting time was reduced by 60%.

Weak Prompt / Strong Prompt

Weak prompt:

Design an e-commerce database.

Powerful prompt:

Your role: You are an experienced data modeler.DRAFT a LOGICAL data model according to the following business rules.Rules:- For each entity: fields, primary key, required fields.- For each relationship: type (one-to-many / many-to-many) and foreign key.- Propose intermediate table in many-to-many relationships.- Normalize up to 3rd normal form; If you recommend intentional denormalization, write the rationale.- Label [CONFIRMATION REQUIRED] any business rule you are unsure of.Business rules:- Customer can place multiple orders.- An order contains multiple products; One product occurs in many orders.- Products have categories.[other rules...]

The powerful prompt clarifies the model level (logical), key and relationship rules, normalization target, and points requiring confirmation.

Four Copiable Templates

1) Data dictionary draft:

A data dictionary outline follows from the table definition. For each field: name, type, is it mandatory, possible values, business meaning (label[PREDICTION] if it is a prediction). Table: [DDL or field list]

2) Normalization review:

Is there any risk of duplicate data, update anomaly, and opportunity for normalization in the table structure below? For each finding, write down which normal form it violates and your suggestion. Structure: [text]

3) ER draft from business rule:

Translate the following business rules into entities, attributes and relationships. Specify the type of each relationship (1-1, 1-N, N-N) and if N-N, suggest an intermediate table. Mark ambiguous rules. Rules: [text]

4) Relationship type verification questions:

For each relationship in the data model below, generate a "yes/no" business question that will test the correctness of its type (e.g., "Can a student be enrolled in more than one class at the same time?"). Model: [text]

Comparison Chart: Model Levels

feature

conceptual

logical

physical

Detail

at least

medium

most

key/relation

Main assets

Keys defined

Including index/type

Depends on database

no

no

Yes

target audience

business unit

analyst

Developer/DBA

Contribution of AI

draft

strong draft

Draft, DBA confirmation

Common mistakes

  • Thinking of a many-to-many relationship as one-to-many. This is the most common modeling error; If the intermediate table is forgotten, the system cannot keep the actual state.
  • Putting everything in one table. Gathering all fields in one table for the sake of "simplicity" produces duplication and update anomalies.
  • Not writing a data dictionary. The same KPI gives different results when the meaning of the fields remains in the mind.
  • Blindly trusting AI's recommendation of data types and constraints. The model may suggest a "large enough" area; The business rule determines the actual limits (e.g. TR ID 11 digits).
  • Absolutizing normalization. Excessive normalization at the reporting layer slows down the query; The purpose varies depending on the context.
Caution: Artificial intelligence may produce models that look nice but violate business rules. For each relationship suggested by the model, the question "is it really like this?" Ask a business question. The data model is the skeleton of the system; A fracture in the skeleton is very difficult to repair later.

In summary

Data modeling is the process of structuring business facts with entities, attributes and relationships and proceeds at conceptual, logical and physical levels. Primary and foreign keys ensure referential integrity; Normalization reduces repetition, but denormalization is also legitimate depending on the purpose. The data dictionary is the common language of the organization. AI provides significant speed in producing ER drafts, data dictionaries, and normalization reviews; however, relationship types, data types, and business semantics must be confirmed against the actual business rule. Just because the model looks good doesn't mean it's right.

Application task

Consider a “library loan system”: members, books, loan records. (1) Have a logical model draft produced by the powerful prompt. (2) Test the type of each relationship the model suggests (specifically, “can a member have more than one copy of the same book?”) with a business question. (3) Find at least one many-to-many relationship and define an intermediate table. (4) Write data dictionary lines for at least 4 fields (name, type, mandatory, business meaning). (5) Highlight a constraint that the model may have fitted and explain how you would verify it.

checklist

  • [ ] The primary key of each table is defined.
  • [ ] I verified the type of each relationship with the business question.
  • [ ] I defined an intermediate table for many-to-many relationships.
  • [ ] I normalized or justified the denormalization of duplicate data.
  • [ ] I wrote a data dictionary line for critical fields.
  • [ ] I confirmed the AI's data type/constraint suggestions against the business rule.