DBMS Schema
Design of a database is called the schema. Schema is only a structural view of a
database. It functions as a blueprint for how entities, attributes, and relationships
within a database are interconnected.
Schema is of three types: Physical schema, logical schema and conceptual
schema.
(i) A conceptual diagram (shown below) represents the highest level of
abstraction, providing a bird's eye view of the overall system. It identifies the
significant entities within the system and the relationships among them.
However, this level doesn't show detail about attributes or how the
database will be implemented. It is most beneficial during the early stages
of a project, where the main goal is to outline the broad scope and the
basic associations among entities.
Conceptual diagram
(ii) Logical diagrams sit at the middle level of abstraction, providing a more
detailed look at the system's structure. It includes all entities, relationships,
and attributes, reflecting how they interact. Unlike the conceptual level, it
provides a greater degree of specificity about data types, primary keys, and
constraints. However, it is still independent of the specific technologies that
will be used to implement the database. A logical diagram looks like this:
Logical diagram
M — Mandatory: This attribute must have a value (i.e. it is NOT NULL)
PI — Primary Identifier: This attribute serves as the primary key for the entity —
unique identifier for each record
(iii)PHYSICAL DIAGRAMS represent the lowest level of abstraction, detailing
exactly how the database will be implemented. It defines the tables, columns, data
types, constraints, primary and foreign keys, indexes, triggers, and other database-
specific elements. This level is often database-specific, incorporating the details and
constraints of the particular database management system (DBMS) being used. It
provides the blueprint for the database's construction and is typically developed by
database administrators and developers right before the implementation phase.
Physical diagram (PK-Primary key, FK-Foreign key)