Interviews - C# Corner

Deepak Verma
What is Schema in DBMS?
By Deepak Verma in Databases & DBA on Apr 17 2011
  • Dinkar Chavhan
    Apr, 2011 20

    <P>WHAT IS DBMS ?<BR>- To be able to carry out operations like insertion, deletion and retrieval, the database needs to be managed by a substantial piece of software; this software is usually called a Database Management System(DBMS).<BR>- A DBMS is usually a very large software package that enables many different tasks including the provision of facilities to enable the user to access and modify information in the database.<BR>- Data Description Languages (DDL) and Data Manipulation Languages (DML) are needed for manipulating and retrieving data stored in the DBMS. These languages are called respectively. </P> <P>An architecture for database systems, called the three-schema architecture was proposed to help achieve and visualize the important characteristics of the database approach.</P> <P>THE THREE-SCHEMA ARCHITECTURE:<BR>The goal of the three-schema architecture is to separate the user applications and the physical database. In this architecture, schemas can be defined at 3 levels :<BR>1. Internal level or Internal schema : Describes the physical storage structure of the database. The internal schema uses a physical data model and describes the complete details of data storage and access paths for the database.<BR>2. Conceptual level or Conceptual schema : Describes the structure of the whole database for a community of users. It hides the details of physical storage structures and concentrates on describing entities, data types, relationships, user operations, and constraints. Implementation data model can be used at this level.<BR>3. External level or External schema : It includes a number of external schemas or user views. Each external schema describes the part of the database that a particular user is interested in and hides the rest of the database from user. Implementation data model can be used at this level.</P> <P><A onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href=""><IMG style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 357px; CURSOR: hand" id=BLOGGER_PHOTO_ID_5365946027060303458 border=0 alt="DBMS Three-Schema architecture" src=""></A></P> <P>IMPORTANT TO REMEMBER :<BR>Data and meta-data<BR>– three schemas are only meta-data(descriptions of data).<BR>– data actually exists only at the physical level.<BR>Mapping<BR>– DBMS must transform a request specified on an external schema into a request against the conceptual schema, and then into the internal schema.<BR>– requires information in meta-data on how to accomplish the mapping among various levels.<BR>– overhead(time-consuming) leading to inefficiencies.<BR>– few DBMSs have implemented the full three-schema architecture.</P> <P>DATA INDEPENDENCE</P> <P>The disjointing of data descriptions from the application programs (or user-interfaces) that uses the data is called data independence. Data independence is one of the main advantages of DBMS. The three-schema architecture provides the concept of data independence, which means that upper-levels are unaffected by changes to lower-levels. The three schemas architecture makes it easier to achieve true data independence. There are two kinds of data independence.</P> <P>- Physical data independence<BR>* The ability to modify the physical scheme without causing application programs to be rewritten.<BR>* Modifications at this level are usually to improve performance. </P> <P>- Logical data independence<BR>* The ability to modify the conceptual scheme without causing application programs to be rewritten.<BR>* Usually done when logical structure of database is altered. </P> <P>Logical data independence is harder to achieve as the application programs are usually heavily dependent on the logical structure of the data. An analogy is made to abstract data types in programming languages. </P>

    • 0

Most Popular Companies

Most Popular Job Functions



Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now