Client Server Model: Many Databases Applications Are Built in
Client Server Model: Many Databases Applications Are Built in
INTRODUCTION
Oracle Database Server
Many databases applications are
built in Client Server Model.
In this model, the program itself
recides on a client machine and
send request to a database server SQL SQL SQL
for information. The requests are
done by using SQL. This results in
many network trips, one for each
SQL statement.
If client and server both are running
Client Application
in the same machine, performance
is increased.
Structured Query Language
Structured Query Language
SQL is a standard language for communication with
RDBMS from any tool. A database management system
requires a query language to enable users to access
data. SQL is the language used by most relational
databases systems.
It was developed in a prototype relational database
management (System – R) in mid 1970 by IBM. System-R
was developed by E.F.Codd in Nov. 1976. In 1979, Oracle
corporation introduced the first commercially
implementation of SQL. The ANSI (Abbreviation of
American National Standards Institute) adopted SQL as
the standard language for RDBMS in 1986.
SQL is a non-procedural language which looks like
English language. SQL, directly supports the
relationships between data-tables(Schema).
Characteristics of SQL
1.It is very easy to learn and use.
2.Large volume of databases can be handled quite easily.
3.It is non procedural language. It means that we do not need
to specify the procedures to accomplish a task but just to give
a command to perform the activity.
4.SQL can be linked to most of other high level languages that
makes it first choice for the database programmers.
5.Recovery and Concurrency [ in which multiple users
operate on same database].
6.Security – The security can be maintained by views. A view
is a virtual table and is used to hide sensitive information and
defines only part of a database which should be visible.
7.Intigrity Constraints – Integrity Constraints are enforced by
system(One can specify an attribute of a relation will not take
an null value.).
CLASSIFICATION of SQL STATEMENTS
SQL provies may different types of commands used for
different purpose. SQL Commands can be divided into
following categories:
1. Data Definition Language (DDL):
They allow us to perform tasks related to data definition only.
We can only work with table structure.
eg. [CREAT / ALTER / DROP TABLE].
INSERT Statement
The simplest way to insert a tuple into a table is to use the
insert statement
insert into <table> [(<column i, . . . , column j>)] values
(<value i, . . . , value j>);
INSERT INTO student VALUES(101,'Rohan','XI',400,'Jammu');
In the above command the values for all the columns are
read from keyboard and inserted into the table student.
This command will display the total number of records with title
as “Total Number of Records” i.e an alias.
Eliminating Duplicate/Redundant data
In a SQL query, Data is selected in all the rows
of a table, even if the data appearing in the result
gets duplicate.
DISTINCT keyword eleminate duplicate rows
from the results of a SELECT statement.
Note: select statement can contain only those attribute which are
already present in the group by clause.