Sunday, April 11, 2010

Data Modelling

Data Models
A collection of conceptual tools for describing data, data relationships and constraints is called a Data-model

Schemas

A conceptual schema or data model is a map of concepts and their relationships. Specifically, it describes the things of significance to an organisation (entity classes), about which it is inclined to collect information, and characteristics(attributes) of associations between pairs of those things of significance (relationships).
The foundation of conceptual modeling is the entity-relationship model proposed by Peter Chen in 1976. The main entity-relationship diagram (ERD) of this model displays entities (nouns, or things the business is interested in) as boxes and relationships (verbs linking entities together, such as the verb "places" in the statement "Customer places order") as diamonds

The logical schema or logical data model is where IT ideas are first introduced into the business data requirements. The conceptual model used business names for things that will need to be adjusted to fit into the established naming conventions and other standards. The attributes were created without any regard for organization, but the logical model columns need to be grouped and arranged. Indexes are not part of the business requirements, but may be created in the logical model if needed. Also, surrogate keys can be introduced to minimize the foreign key complexity for deeply nested tables. In the end, the logical model has a structure that is probably pretty close to what the physical tables will look like.
It has primary, foreign, and alternate keys, along with indexes, but nothing specific to a target database platform, which might not even have been selected yet.

The physical schema or physical model is in the domain of the database administrator (DBA). This is where database platform constraints are applied to the data requirements, such as table and column name length limits or referential integrity limitations. Stored procedures, triggers, tablespaces, and table partitions are created depending on the platform. Depending on the tool, an iterative cycle can be entered into where test databases are created to discover which way of organizing things works best, then the model is updated from the database. Some tools have facilities to estimate database sizes, generate test data, or interface with other more sophisticated DBA tools
The people who are interested in the physical model include developers, testers, DBAs, and data analysts. After the DBA is satisfied with the structure of the model, the actual database can be created.



Database Instance
An instance in terms of a particular DBMS is also called the collection of information stored in the database at a particular moment in time is called an instances of the database.

DBMS architecture
3-Scheme Architecture:
The internal scheme describes the physical grouping of the data and the use of the storage space
The logical scheme describes the basic construction of the data structure.
The external scheme of a specific application, generally, only highlights that part of the logical scheme which is relevant for its application.
Therefore, a database has exactly one internal and one logical scheme but may have several external schemes for several applications using this database.


Mapping
Mapping means that the implementation of the External(Conceptual), Logical and the Internal(Physical) schemas/scheme should be done in such a way, using the tools/objects of the DBMS, that changes in the Internal/Physical structure should not at all or by very minor efforts affect the External(Conceptual) layer. Achieving this independence between the Internal/Physical and External(Conceptual) layer is called Data Independence.

No comments: