What is basic SELECT statement?

SELECT Statement
A SELECT statement retrieves data from the database. With SELECT statement PROJECTION, SELECTION and JOIN can be performed on database tables.
As data in relational database is stored in TABLES. TABLE has ROW and COLUMN structure. With SELECT statement all rows and all columns can be retrieved, this is known as PROJECTION. But, if rows and columns are retrieved on the basis of some condition, it is known as SELECTION. And suppose if some information is needed and that is stored in two or more different tables but are related, use JOINS to retrieve it from two or more tables.
In SQL, basic SELECT statements are as follows:
SELECT * FROM [table_name];
SELECT[column1][column2][column3],..... FROM  [table_name];
SELECT and FROM are known as clauses. 
SELECT clause allows to specify columns to be selected from the database table. 
FROM clause allows to specify table name that has those column to be selected.
Semicolon at the end of SELECT statement specify the end of SQL statemen…

What is data independence?

To understand the concept of data independence, first we need to understand the three level (also known as three layered or three schema) architecture of database management systems. The goal of defining this architecture is to reduce the complexity involved in storing data in databases. So, database experts categorize three hierarchical levels (or layers or schema), which are internally mapped with each other and hides all the complexities from end user.

Physical Level:
It is the lowest level in three level architecture. Also known as internal level. The schema defined at this level is known as physical schema. It describes all the details of the physical storage structure of the database and how they are stored.

Logical Level:
It is the level above the physical level. Also known as conceptual level. It hides all the complexity of physical level from end user. The schema defined at this level is known as logical schema or conceptual schema. It describes the entities, their data types and functions, relationship among entities and different type of constraints applied over them.

View Level:
The highest level above the logical level in three level hierarchical architecture. Also known as external level. The schema defined at this level is known as sub-schema. This level defines end user specific view of the data stored at logical level. That means instead of accessing complete database, end user can only view a relevant part of the database. Different user can view different part of the same database. In this way this level hides the complexities involved in lower levels in the architecture.

Now, each level has its own schema, and schema at any level can be modified without affecting the schema at other level. This concept of independently changing the schema at different levels without affecting the schema at other level is known as data independence.

There are two types of data independence.

Physical Data Independence: Changing of physical schema at physical level without affecting the logical schema at logical level is known as physical data independence.

Logical Data Independence: Changing of logical schema at logical level without affecting the sub-schema at view level is known as logical data independence.


Popular posts from this blog

With the help of block diagram explain the architecture of a DBMS.

What do you mean by data model? What are different types of data models?

What are the different types of database users?