Sunday, August 21, 2011

Overview of SQL topics....

I am going to discuss lot of topics in SQL in my  future posts.... In this post I want to give overview of those topics....

1. SQL Statements :: 
           SQL statements are the base for SQL . In this topic I will discuss about different types of SQL statements available in SQL and their usage. To give some idea, we have 5 types of SQL statements.
                           1. DRL (Select)
                           2. DML ( Insert, Delete, Update, Merge)
                           3. DDL (Create, Alter, Truncate, Drop, Rename)
                           4. DCL (Grant, Revoke)
                           5. TCL (Commit, Rollback, Savepoint)
        These statements are very useful while working with the database. We will not write any statement in SQL without using any of these statements.

2. SQL Functions ::
            There are many types of SQL functions which are very useful while writing the SQL queries.
       Depending on number of results they are producing for each row / group of rows, functions are divided into two types.
       1. Single row functions      2. Multiple row functions
   These functions again depending on type of data they are effecting divided into,
       1. Numeric Functions like Round, Trunc ....
       2. Character Function like Substr, Instr ....
       3. Date functions like Months_between, last_day......
   We have some more functions like,
       Conversion Functions used for data conversions like to_date, to_char, ........
       General functions used for handling null values like NVL, NVL2 .....
       Conditional Functions like Case and Decode
       Group Functions like Sum, Avg, .....

3.  Where , Group by, Order by and Having clauses..

4.  Joins which will be used to get data from one or more tables
      We will discuss about different joins like,
       Inner Join, Outer Join, Self Join, Equi Join, Non Equi Join........
     This is one of the most important topics of SQL. Because in real life most of the times queries which we will write will contain joins only.....

5. Sub Queries :: This is also a most important topic of SQL. We have two types of Sub queries.
             1. Correlated Sub queries    2. Non Correlated Sub queries

6. Set Operators :: 
            Set operators will be used to combine the results from 2 queries into single result.
      Different Set Operators in SQL are,
          Union, Union All, Minus, Intersect

7.  Views :: In this we will discuss about what are views , why we need views and how we can create them.


8.  Indexes :: These are very important in improving the performance of the queries. We have different indexes like,
               Function Based Indexes
               Bit map Indexes
               B-tree Indexes

9.  Synonyms :: used for aliasing


10. Sequences :: Used for generating the unique sequence of values.

11. ROWNUM and ROWID pseudo columns

12. Analytical Functions ::
                 This topic will come under advanced SQL. In this we will discuss about Rank and Dense_Rank functions.

13. Hierarchical Retrieval ::
              This is also advanced SQL topic. In this we will discuss about Connect By Prior clause.

14. Constraints ::

              In this we will discuss about Primary key, Foreign Key, Check constraint, Unique key and Not Null constraints.

15. Datatypes ::
     
            In this we will discuss about some useful datatypes in SQL. like Number, Date, ... etc.

        Apart from these topics I will also discuss about design models like ER Modeling,... etc. Also, I will try to post about different advanced topics in SQL.
           
  

14 comments:

  1. what analatical functions why we are using in real time and example

    ReplyDelete