Data Model in Database
From a database perspective we can say that data model is the underlying structure of the database. Once the functional requirements for a software to be developed is identified, then it is translated into a model.This model clearly represents the functional requirements interms of high level data structures, low level data structure like attributes,data relationship,data semantics and consistency constraints. Even a business or functional expert can understand this model with out any difficulty, and it doesn't require any technical expertize to understand model.From this model the logical schema can be easily created.
Some of the commonly used data models are described below.
Object Oriented Data Model
Object-Relational Data Model
Semistructured Data Model
Early days the following data models were in use , but they are little used now.
Network Data Model
Hierarchical Data Model
Data Model in Database
Subschema in Database
A database may have many schemas at the view level.Subschema describes these different views. Different users at the view level is allowed to access the database according to the subschema. Thus subschema represent different view point of the users at the view level.
Different users at the view level is able to access a part of the database according to their access rights.Thus subschema can be consider as a subset of the logical schema which provide different views to different users
Concurrent Access Anomalies in File Processing System vs Concurrency Control Techniques in the Database
Concurrent Access Anomalies in File Processing System vs Concurrency Control Techniques in the Database.
If multiple users are updating the same data simultaneously it will result in inconsistent data state. This issue is associated with file processing system, since it is very difficult to handle simultaneous update of data in file processing.In file processing system this situation is handled through application program.
But in database system this simultaneous update operation is handled effecively using the concurrency control techniques in the database.So there is no such problems of inconsistent data state in database system as part of concurrent updates.
Consistency Constraints in File processing System vs Consistency Constraints in Database
In Database it is possible that some fields are repeated in different files(or tables). This situation can be represented in database.For example a non-key field in one table can be a key field in another table. In database it is very easy to identfy and represent such relationship if exist.Once such a relation is established any change in a field at any one place will reflect at other places simulateneously, no need to manually update at all places.
Where as in file processing system it is not possible to establish such relationship,hence we have to manually ensure consistency through application program.
Semi Structured Data Model in Database
Semi-Structured Data Model is based on labelled graphs rather than labelled trees.It allows allow cyclic references.Schema is usually contained within the data, which is sometimes called self-describing.Schema information is in the edge labels and the data is stored at the leaves.It provides a flexible format for data exchange between different types of databases.Certain forms of semi-structured data have no separate schema.
Semistructured data has recently emerged as an important topic of study and research. There are huge amount of data in the World Wide Web.The data in the web are not structured, but there is huge requirements of querying/integrating/exchanging information on web.
Since it is a semi-structured database model,the queries cannot be made as efficient as in a more constrained structure like relational model.SQL is used to query relational data.Xpath is used to navigate through elements and attributes in XML document.XQuery is used to query XML data.
XML Schema and DTD can be used describe the structure of XML document, that is we can use this to validat an XML document. But it is not mandatory to have XML schema or DTD for an XML document,it is optional.