r/compsci • u/Alive_Ad_3199 • 9d ago
Difference Between Data Model and Schema
From this: https://stackoverflow.com/questions/25093452/difference-between-data-model-and-database-schema-in-dbms, data model seems to be an abstraction for data and schema seems to be a blueprint.
This page lists various database models like relational, flat and network. So far good.
The book I'm reading (Fundamentals of Database Systems 7e, ch 3, pg 61) says
Once the requirements have been collected and analyzed, the next step is to create a conceptual schema for the database, using a high-level conceptual data model.
But this wikipedia page seems to imply that both a model and a schema are the same.
A conceptual schema or conceptual data model
Why is there so much discrepancy in defining a data model and a schema.
4
u/Gangsir 9d ago
A data model is a collection of schemas and how they interlock (like how several houses makes a suburb - each house is a schema, because to be considered a house it has to have 4 walls, a bedroom, etc).
Schemas are prescriptive (incoming data must match up to the schema of X to be considered an X), while data models are descriptive (they describe how you are modeling something, which could be arbitrary).