SQL(structured query language)

 

SQL: A Realtional Database Language

 Sql is the query langugae used with relational databases.Sql is not a DBMS itselflkbut ut us a medum of communication with DBMS.SQL is muvh easiet to understand and lwatn as compared to other language.SQL was initially called SEQUEL was later names as SQL during 1970's. Sql is a set based , declarative set based declarative query language and not imperative language such as c or BASIC. Declarative means that user only need to state" what " needs to be done and not how to be done.DBMS determines tand performs internally the steps needed to accomplis the job. It is also known to be non-procedural language

Features of Sql

  sql statements are not case senstive(but data is case sensitive) 

⦁ sql can be written one or more lines

 ⦁ clauses are usually placed on separate lines

 ⦁ Keywords cannot be split across lines

 ⦁ Tabs and spaces are allowed to enhance readability

 ⦁ Each SQL statement (not line) wnds with a semicolon(;)

 ⦁ sql is declarative and non-procedural language.

 ⦁ Sql statement start with verbs(actions) .Example create command.

 ⦁ Identifier always start with alphabet ⦁ single line comment are prefixed by - symbol and multiline comments are enclosed between /* and */ 

 

SQL: SQL COMMANDS

Sql commands in categorised into different types

1.Data definition language(DDL)

2. Data manupulation language(DML)

3.Data control language

4.Transaction control language

5. constraints

After this the commands is categerised into different types 

1.Data Definition Language(DDL)

 a)create

b)alter

c)drop

d) truncate

e) delete

2.Data manipulation Language(DML)

a)Select

b)insert

c)update

d)delete

3.Data Control Language

a)Grant

b)Revoke

4.Transaction Control Language

a)Commit

b)roll back

c)save point

5.Constraints

a)Primary key

b)Foreign Key

c)check

d)unique

e)Default

f)Not null

No comments:

Post a Comment