I was just starting with reading a book about databases and encountered schemas and data models. I read that schema is the structural design of a database and data model is a set of conceptual tools to describe the data and the relationships like Er model etc. I don't get the real sense of difference between the two. Is schema actually a file in Dbms and data model is just a concept?
4 Answers
A schema is collection of database objects that are logically grouped together. These can be anything, tables, views, stored procedure etc. Schemas are typically used to logically group objects in a database. For example, an application that has reporting and auditing components may have 2 schemas called reporting and auditing with a collection of tables, stored procedures etc. With Schemas, one can segregate out the reporting objects and audit objects. One can also create different security accounts which can only access a specific schema. A fully qualified name will include the schema. For example:
SELECT * FROM [Test].[dbo].[Person]
Test is the database. dbo is the schema. Person is the table.
A data model in a database should be relational which means it is described by tables. The data describes how the data is stored and organized. A data model may belong to one or more schemas, typically usually it just belongs to one schema.
The person table will be a part of a number of tables and relations that make up the data model.
- 11,773
The database schema is like a blueprint that describes the layout of the data contained in the database: what kinds of fields are present and how they are organized. Here's an example :

Changing the schema changes the structure of your particular database.
But what happens when you want to change the very nature of what can be specified in a schema file? : That means a change to the data model used by the database software.
Unlike the schema, the data model is not isolated in a separate file for easy changing, but rather is hard-coded right in the software itself, so changes to it can have a profound impact on the database programs.
One example of a data model would the Relational model.
Changing the data model would mean something like switching to a new data model such as semantic data model. That would change the entire structure of the database management software!
Refer to this page for a detailed explanation.
Image taken from: Elmasri & Navathe
- 111
A database model is otherwise its design - a graphic representation of all its tables and the relationships between them. You can make a database model on a piece of paper or in a database design application. If you use the program for this, you will be able to generate a SQL / DDL script for the database, which will make your work easier. Below an example database model:
- 11
Data model is a generic model used to analyse and design a database. Database model is a logical conversion of the entity relation model necessary to construct a database.
- 11
