1. Home
  2. Explore
  3. Computer Science
  4. DBMS Concepts and Architecture

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

DBMS Concepts and Architecture

Database Models, Schemas, and DBMS Languages

A decision support system (DSS) depends on data that is organized and represented accurately. A business DSS might help people compare options, spot patterns, or make operational decisions, but its conclusions are only as reliable as the data it uses.

This leads to a principle often summarized as GIGO: “Garbage In, Garbage Out.” If incorrect, incomplete, or poorly organized data is stored, the system can produce misleading results. Careful database design matters because it helps ensure that data is structured consistently and that the system can retrieve and update it correctly.

Data models: describing a database

A data model is a set of concepts for describing a database’s structure and the constraints that the database must obey. In practical terms, a data model helps describe what kinds of information a database holds, how that information is organized, and what rules keep it valid.

For example, a database might contain a table of personal details with fields for first name, last name, and date of birth. Rules could specify the expected format of a date or require a particular identifier to be unique. The organization and these rules together form part of the data model.

A data model also provides concepts for describing database operations. Data model operations are the operations used to retrieve and update data while following the model’s structure and constraints. Retrieval means obtaining information from the database. Updates include adding new data, changing existing data, or removing data. The model’s rules help ensure that these operations do not create inconsistent or invalid records.

Data models can be considered at different levels, depending on whether the focus is on human understanding, the representation used by a database system, or the details of storage.

Conceptual data model

A conceptual data model describes data in terms that make sense to users and designers. It is also called a high-level, semantic, or entity-based data model.

The conceptual model captures how people understand the information in a business setting. For instance, a business may think in terms of customers, orders, and products. The conceptual model focuses on those meaningful concepts and their relationships, rather than on how information is physically stored on a computer.

This model is especially important during design because it connects the database to the needs and understanding of the people who will use it.

Physical data model

A physical data model describes how data is stored in the computer system. It is also known as a low-level or internal data model.

Its focus is on the storage side: how the database is represented and maintained using the available computer, operating system, database software, and storage devices. The physical model is therefore closer to the technical details of the system than to the way a business user thinks about the information.

Implementation data model

An implementation data model, also called a representational data model, provides a bridge between the conceptual and physical models. It represents the information in a form that can connect a human-oriented description of the data with a computer-oriented one.

The three levels can be thought of as a progression: the conceptual model expresses the meaning of the information, the implementation model represents it in a form suitable for a database system, and the physical model describes its storage.

A data model describes both what the database is like and the rules its data must follow.

Think About It: Why might a database designer first describe business concepts such as customers and orders before deciding how the data will be stored on a server?

Database schemas, diagrams, and instances

A database schema is a description of a database. It includes two central elements:

  • Structure: how the database is organized, such as its tables and fields.
  • Constraints: rules that the database is expected to obey.

For example, a personal-details table might have fields for first name, last name, and date of birth. A schema can describe what kind of information belongs in each field and what restrictions apply to it. Here, “F name” is an abbreviation for first name, while “L name” means last name.

A schema diagram is a diagrammatic representation of a schema. It presents elements such as tables and fields in a visual form, along with relevant descriptions or constraints. The diagram does not replace the schema’s rules; it provides a way to see and communicate the database’s organization.

A particular component or object within a schema is called a schema construct. A table, field, or column can be considered a construct. The key idea is that a construct refers to a specific part of the schema, not to the full contents of the database at a particular time.

That distinction matters because the actual data in a database changes. A database instance is the complete collection of data stored in the database at a particular moment. It is also called the state or occurrence of the database.

For example, a database’s contents at one moment may be different from its contents the next day because records have been added, changed, or removed. The schema describes the organization and rules; the instance is the data that currently occupies that organization.

TermWhat it refers to
SchemaThe database’s structure and constraints
Schema diagramA visual representation of the schema
Schema constructA component of the schema
Database instanceThe actual data stored at a particular time

Think About It: If a customer changes an address, which changes—the schema, a schema construct, or the database instance?

The three-schema architecture

The three-schema architecture organizes a database system into three levels: external, conceptual, and internal. It is useful in business DSS settings because different users may need different views of the same underlying information, while the database still needs a coherent overall design and a practical storage arrangement.

External level: what users see

At the external level, each user or group of users can have an external view of the data. An external view presents the information in a way suited to a particular user’s needs.

Different users may have different views of the same database. They may also have similar views; the important point is that views can be designed for different ways of working with the information.

Conceptual level: the overall data design

The conceptual schema describes the database’s overall conceptual organization. It represents the data from the designer’s perspective and connects the user-facing views to the database’s underlying organization.

Each external view is related to the conceptual schema through an external/conceptual mapping. This mapping describes how information presented to a user corresponds to the overall conceptual representation.

Internal level: how data is stored

The internal schema describes the database at the storage level. It reflects how the database system represents and stores information using its computer, operating system, database management system, and persistent storage. Persistent storage may include devices such as hard disks or solid-state drives.

The relationship between the conceptual schema and the internal schema is described by a conceptual/internal mapping. This mapping connects the overall data design to the way the system stores the data.

The full flow can be summarized as:

  1. A user interacts with an external view.
  2. The external/conceptual mapping connects that view to the conceptual schema.
  3. The conceptual/internal mapping connects the conceptual schema to the internal schema.
  4. The system stores the data in its underlying storage.

The architecture separates different concerns: user-facing views, the overall design of the information, and the technical details of storage. That separation helps a DSS present data appropriately to users while relying on a designed database underneath.

Think About It: How could two business users see different external views of the same data while the organization still maintains one overall conceptual design?

DBMS languages and their roles

Database management systems use languages to define database structures, describe storage or views, and retrieve or update data. Four important language categories are DDL, SDL, VDL, and DML.

Data Definition Language

A Data Definition Language (DDL) provides constructs for specifying a database’s conceptual schema. It allows the database design to be described in a form the DBMS can use.

Some database systems also use DDL to specify external or internal schemas. The exact division of responsibilities among languages can therefore vary by system.

Storage Definition Language

A Storage Definition Language (SDL) is used to specify the internal schema: the storage-related representation of the database.

When a system uses SDL for this purpose, it is associated with the internal level. In some systems, DDL may cover multiple levels instead.

View Definition Language

A View Definition Language (VDL) is used to specify external schemas—that is, the views presented to users.

In a system that separates these language roles, VDL defines the external view, DDL defines the conceptual schema, and SDL defines the internal schema. Other DBMSs may use DDL for more than one of these tasks.

Data Manipulation Language

A Data Manipulation Language (DML) is used to retrieve and update the database’s data. Retrieval obtains information; updating includes adding, modifying, or removing data.

DML can be organized in two ways:

  • An embedded data sublanguage is used within a general-purpose programming language. The programming language provides a larger program, while its data sublanguage provides database operations. Examples of general-purpose languages include C++, Fortran, Python, Perl, and PHP.
  • A stand-alone data manipulation language operates independently of a general-purpose programming language. It is often called a query language. SQL, or Structured Query Language, is an example of a stand-alone language for working with database data.

These language categories distinguish the work of describing the database from the work of manipulating its contents. DDL, SDL, and VDL concern database definitions at different levels, while DML concerns retrieving and changing data.

Think About It: If a task involves changing a customer’s stored address, is it mainly defining the database structure or manipulating the data already stored in it?

High-level and low-level DBMS languages

DBMS languages can also be compared by how much detail they require when specifying a database operation.

A high-level DBMS language is also called non-procedural or declarative. SQL is a prominent example. A high-level language is set-oriented: it works with a collection of records as a set rather than requiring the user to handle each record individually.

With this approach, the request describes the data to be retrieved and the retrieval task, without spelling out every step of record-by-record processing. The programmer generally does not need to specify the loops and detailed constraints that would be needed for an operation carried out one record at a time.

A low-level DBMS language is also called a procedural language. It typically specifies operations one record at a time and gives more detail about how to retrieve the data. This can include specifying constraints and loops that control the processing.

The trade-off is between ease of expression and control over processing. High-level languages are generally easier for people to use because they require less step-by-step detail. Low-level languages can be chosen when faster processing or lower computing overhead is important, although they require more explicit instructions.

FeatureHigh-level, non-proceduralLow-level, procedural
OrientationWorks with sets of dataWorks one record at a time
FocusDescribes the desired data and operationSpecifies more of the retrieval procedure
Detail requiredUsually less step-by-step detailIncludes procedural details such as loops
Typical trade-offEasier to expressCan offer faster processing and lower overhead

Comprehensive review

A sound DSS database begins with an accurate understanding of the information and the rules it must follow. A data model describes the database’s structure and constraints, while data model operations use that structure to retrieve and update information appropriately. Conceptual, implementation, and physical models describe the data from human, representational, and storage-oriented perspectives.

The schema describes the database’s structure and constraints; a schema diagram displays that description visually. A schema construct is one part of the schema, while a database instance is the actual collection of stored data at a particular time. The schema defines the organization; the instance changes as the data changes.

The three-schema architecture separates user views, the overall conceptual design, and internal storage. External/conceptual and conceptual/internal mappings connect those levels. DBMS languages support the architecture and its operations: DDL describes database definitions, SDL addresses internal storage definitions, VDL specifies external views, and DML retrieves and updates data. Finally, high-level languages express operations in a set-oriented, non-procedural way, whereas low-level procedural languages specify more of the record-by-record process.

Together, these ideas explain how a business DSS can represent information meaningfully, maintain it consistently, store it in a computer system, and make it available for decision-making.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent