I need to test my understanding of the difference between the data model and database schema. According to my understanding, the data model is a description of how the data will be stored and the relationships between the data. While the schema is very similar to a database model and according to the book "Database Management systems " by Raghu and Johannes " A description of data in terms of a data model is called schema" and it's a template of how the data will be stored. Is that right?
1 Answer
A data model is set of general abstraction mechanisms: for instance you have the relational data model, with mechanisms as the relation, primary and foreign keys, etc. Or an object oriented data model with mechanisms like classes, aggregation, generalization, etc.
The schema instead is the description of a particular slice of reality for modeling purposes, for instance to build a database, expressed using a specific data model.