Go4Oracle

Member Login






Powered by CodeRevolts
You are here  :Home arrow Blogs

29 Sep, 2008
dubey


My Training on Oracle
Date- 21-8-08
First day- Introduction of oracle & we dicuse part of oracle. We read SQL PLUS AND It's part just like command and SQL.
SQL is divied into five part.
1. DDL - Data Definition Language commands include the following:
CREATE, ALTER DROP
2. DML - Data Manipulation Language commands include the following:
UPDATE, DELETE, INSERT
3. DCL - Data Control language commands include the following:
GRANT, REVOKE
4. TCL - Transaction Control Language commands include the following:
COMMIT, ROLLBACK
5. QUEERY -
 
Second day- Object in oracle---- oracle has kind of object just like.
Table, View, Index, Cluster, Function, Libary, Procedure, Schema..
Table- Servel records of equal length laced one below the other to enable users to continue to store data are called a ' Table' . Table can be vesualized as two dimensional matrix consisting of Rows and Colums.
Syntx- Create table (colum name data type, colum data type.....);
Ex. Create table emp_mast (emp_code varchar2(4), emp_name varchar2(30), emp_dob date);
View- A view is a logical entity. It is a SQL statement stored in the database in the system tablespace. The reasons why views are created are:
  • When data Security is required
  • When data redundancy is to be kept to the minimum while maintaning data security.
Syntx - CREATE view AS SELECT
FROM ;
ex. Create view emp_view AS select (emp_name) from emp_mast;
CONSTRAINTS ----- Oracle constraints ar provied flexibility and intergrity of our database. There ar a number of different kinds of constraints in oracle and they are.
  • CHEACK
  • NOT NULL
  • PRIMARY KEY
  • UNIQUE
  • FOREIGN KEY
PRIMARY KEY-----Primary key is one or more columns in a table used to uniquely indentify eah row in the table.
Syntx: ALTER TABLE table_name
add CONSTRAINT constraint_name PRIMARY KEY (column1, column2, ... column_n);
Ex. Alter table emp_mast add constraint pk_emp_code primary key (emp_code);
FORIGN KEY ----- A foreign key means that values in one table must also appear in another table. The referenced table is called the parent table while the table with the foreign key is called the child table. The foreign key in the child table will generally reference a primary key in the parent table.
Syntx -: ALTER TABLE table_nameadd CONSTRAINT constraint_name
FOREIGN KEY (column1, column2, ... column_n)
REFERENCES parent_table (column1, column2, ... column_n);
Ex. Alter table emp_mast add constraint fk_dept_code foreign key(dept_code) reference dept_mast(dept_code);
here emp_mast is child table and dept_mast is parent table.
 
day 3 Subject - join
A join is a query that combines rows from two or more tables. We read more types of join and they are .
cartesian join
Outer join
self join
Cartesian join -: A cartesian join is a join of every row of one table to every row of another table.
ex. select emp_code, f_name , dept_name from emp_mast, dept_mast;
Outer join -: An outer join is similar to the equi join, but Oracle will also return non matched rows from the table with the outer join operator (+). Missing values are filled with null values.
ex.
self join -: Self joinA self join is a join of a table to itself.
 
Day 4 subject:- Function-Group by function
Group functions return a single result based on many rows,. Group data using GROUP BY clause.The different group functions are:
AVG, COUNT, MAX, MIN, STDDEV, SUM, VARIANCE.
HAVING clause
To limit the returned rows after the grouping, we use the HAVING clause. The HAVING clause is applied after the grouping has taken place.
 
day 5 subject:- subqueryA subquery is a query within a query. We use subquery with where clWHERE clause, FROM clause, or the SELECT clause.
 
Day 6 subject:- A character function is a function that takes one or more character values as parameters and returns either a character value or a number value. we read more character function and they are-
CONCAT, INITCAP, LOWER, LPAD, LTRIM, REPLACE, RPAD
RTRIM, SUBSTR, TRANSLATE, TRIM, UPPER.
 
Day 7 subject : union & union all - we can combine multiple queries using the set operators UNION, UNION ALL.
 
Day 8 subject : view - we learn creating view and what is use of view.A view is a simply the representation of a SQL statement that is stored in memory so that it can easily be re-used.
 
Day 9 subject :inline view - today we read inline view. use for in-line views in Oracle SQL is to simplify complex queries by removing join operations and condensing several separate queries into a single query.
 
Day 10 subject : number functio- a number function is accept numeric input and return numeric values.Some number function are:
round, mod, power.
 
Day 11 subject : date function- a date function is use for find current date, time, last date, Calculates the number of months between two dates.etc. some date function are:
ADD_MONTHS, LAST_DAY,MONTHS_ BETWEEN, NEW_TIMENEXT_DAY, ROUND, SYSDATE, TRUNC .
 
Day 12 subject :
Day 13 subject :


Register Now

Bookmark Us

 
 

Who's Online

No Users Online

Advertisement

Linux Indore - 2007

Hello, you either have JavaScript turned off or an old version of Macromedia's Flash Player. Get the latest flash player.

Most Commented Items

Files that control oracle inst
(1 comment)
Install Oacle 10G XE on linux
(1 comment)
ROWID OF A RECORD (PSUEDO COLU
(1 comment)
rownum a pseudocolumn
(1 comment)

Visitors Counter

mod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_counter
mod_vvisit_counterToday70
mod_vvisit_counterYesterday270
mod_vvisit_counterThis week871
mod_vvisit_counterThis month2118
mod_vvisit_counterAll153989

Our Recommendations

Get Firefox browser!
Go to Google!Get a free mail account!Get The Gimp!Get Openoffice!Get Videolan!