Based on the SQLD exam syllabusReport an error
A shipping clerk at the online store sees only the order number, recipient, and address. An accounting clerk sees only the order number, payment amount, and payment date. A DBA looks at which disk this data is stored on and with which indexes. In other words, the same data is viewed from three layers.
| Schema | Perspective | What it does | Count |
|---|---|---|---|
| External schema | User perspective | Defines the database as each user or application program sees it. Also called the view level | Many |
| Conceptual schema | Integrated perspective | Defines the database of the entire organization, integrating all users' perspectives. Entities, relationships, and constraints are held here | One |
| Internal schema | Physical storage perspective | Defines how data is actually stored (record structure, indexes, storage location) | One |
Shipping screen Accounting screen Customer My Page
┌──────────┐ ┌──────────┐ ┌──────────┐
│ External 1│ │ External 2│ │ External 3│ ← External schemas (many)
└────┬─────┘ └────┬─────┘ └────┬─────┘
└──────────────┬──┴─────────────────┘
│ External/conceptual mapping → logical independence
┌──────┴───────┐
│ Conceptual │ ← Overall structure of customers, products, orders
│ schema │
└──────┬───────┘
│ Conceptual/internal mapping → physical independence
┌──────┴───────┐
│ Internal │ ← Files, indexes, blocks
│ schema │
└──────────────┘CREATE VIEW, the conceptual schema to table definitions, and the internal schema to storage structures such as tablespaces and indexes. It isn't an exact one-to-one correspondence; it's an analogy to aid understanding.The connection between schemas is called a mapping. Independence arises because the mapping absorbs the change.
| Independence | Even if this changes | What is not affected | Responsible mapping |
|---|---|---|---|
| Logical independence | Conceptual schema | External schema (application programs) | External/conceptual mapping (application interface) |
| Physical independence | Internal schema | Conceptual schema (and external schema) | Conceptual/internal mapping (storage interface) |
In the online store example, it looks like this.
marketing_opt_in column was added to the customer table. The shipping screen doesn't use that column, so there is nothing to change.⚠️ It's easy to mix up the name pairs. Logical independence is the ability to withstand changes to the conceptual schema, and physical independence is the ability to withstand changes to the internal schema. If you memorize "logical" as paired with "external," you'll get it wrong. The side that changes is the conceptual schema, and the side that is protected is the external schema.
If a schema is "the layers for viewing a finished database," then the modeling stages are "the order in which you build the database." The two are different concepts.
| Stage | Level of abstraction | What it does | Online store deliverable |
|---|---|---|---|
| Conceptual modeling | Highest | Draws the core entities and relationships comprehensively, centered on the business. Used for enterprise-wide modeling and establishing EA (Enterprise Architecture) | The big picture of Customer — Order — Product |
| Logical modeling | Medium | Accurately defines keys, attributes, and relationships for system construction. Performs normalization. High reusability | The primary identifier of the Order entity, resolving M:N with Order Item, definition of each attribute |
| Physical modeling | Lowest | Decides tables, column types, indexes, performance, and storage method to fit the actual DBMS | The ORDERS table, ORDER_DT DATE, index and partition design |
High abstraction Low abstraction
───────────────────────────────────────────────────────────▶
Conceptual modeling Logical modeling Physical modeling
(what exists) (exactly what it (how to put it on
looks like) the DBMS)The two concepts share a similar direction, "from abstract to concrete," which makes them good to ask about together.
| Comparison | Modeling stages | Three-level schema |
|---|---|---|
| What is divided | Design process | The layers for viewing a database |
| Why it is divided | Design while making things more concrete stage by stage | To achieve data independence |
| Stage names | Conceptual, logical, physical | External, conceptual, internal |
An information system construction project proceeds roughly in the order planning → analysis → design → development → testing → transition. The modeling stages overlap with this flow.
| Project phase | Modeling mainly done |
|---|---|
| Planning and analysis | Conceptual modeling, logical modeling |
| Design | Physical modeling |
| After development | Build the DB based on the model, and when changes arise, fix the model first |
Tomorrow we'll look at the characteristics and classification of entities, the first element of the model.
Click a choice to reveal the answer and explanation.
Question 1
In the ANSI/SPARC three-level schema architecture, which schema defines the data structure of the entire organization's database, integrating the perspectives of all users?
Question 2
An online store DBA rebuilt the indexes on the order table and moved their storage location, but did not modify the table structure or the application programs. Which concept is most closely related to this situation?
Question 3
Which is the LEAST appropriate statement about the data modeling stages?
Question 4
Which is a correct statement about the three-level schema architecture?
Question 5
Which of the following is the most appropriate match between a modeling stage and its main deliverable?