»அனைவருக்கும் வணக்கம்.................|||||||.......,IT துறையில் வெளியாகும் மிக முக்கிய Software மற்றும் demand in world market சம்பந்தமான தகவல்களை என்னால் முடிந்த பங்கினை இன்றைய இளைய சமுதாய மாணவர்களுக்கு எழுத்து மூலமாக அறியத்தருகின்றேன்..

Wednesday, April 6, 2011

ஆரக்கிள் Table நுணுக்க துளிகள் !

ஒவ்வொன்றுக்கும்  எ-கா-உடன் விளக்கம் தரப்படும்.... 

Oracle Basic Information for Beginners…..

What are the difference between DDL, DML and DCL commands?

DDL - Data Definition Language: statements used to define the database structure or schema. Some examples:
§                     CREATE - to create objects in the database
§                     ALTER - alters the structure of the database
§                     DROP - delete objects from the database
§                     TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
§                     COMMENT - add comments to the data dictionary
§                     RENAME - rename an object
DML - Data Manipulation Language: statements used for managing data within schema objects. Some examples:
§                     SELECT - retrieve data from the a database
§                     INSERT - insert data into a table
§                     UPDATE - updates existing data within a table
§                     DELETE - deletes all records from a table, the space for the records remain
§                     MERGE - UPSERT operation (insert or update)
§                     CALL - call a PL/SQL or Java subprogram
§                     EXPLAIN PLAN - explain access path to the data
§                     LOCK TABLE - controls concurrency
DCL - Data Control Language. Some examples:
§                     GRANT - gives user's access privileges to database
§                     REVOKE - withdraw access privileges given with the GRANT command
TCL - Transaction Control: statements used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.
§                     COMMIT - save work done
§                     SAVEPOINT - identify a point in a transaction to which you can later roll back
§                     ROLLBACK - undo the modification I made since the last COMMIT
§                     SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use
§                     SET ROLE - set the current active roles
DML are not auto-commit. i.e. you can roll-back the operations, but DDL are auto-commit

What is Table?

What are the stuff in table?

How to defined the relationship between the table?

aware the stuff in before the table creation !

aware the caution of steps after the table creation!


பெரும்பாலான நேரங்களில் Table உருவாக்கும் போது சில நுணுக்கங்களை கவனிக்காமல் விட்டு விடுவது வழக்கம்தான்...அதுபோன்ற நேரங்களில் என்னென்ன செய்யலாம் அதற்கான வழிகள் என்னென?

Once Created Table like this...

CREATE TABLE department (
department_id NUMBER(5),
division_id NUMBER(5),
department_name VARCHAR2(40),
address_id NUMBER(10));

The Table will be get default SEQUENCE with cache 20;


Table உருவாக்கம் செய்த பிறகு SEQUENCE அதன் ID யை தானாகவே 20,20என்று(1,21 ,40 ,61 ,81) கூடிக்கொண்டே போகும்!அதன் பின்னணியில்

CREATE SEQUENCE Seq_name START WITH 1
MAXVALUE 99 cache 20;

என்று நாம் அமைத்திருக்கலாம்...ஆனால் இப்போது நமக்கு அப்படியொரு SEQ_ID INCREMENT தேவையில்லை சோ நாம் அதை நீக்கவேண்டிய கட்டத்தில் உள்ளோம்.
அப்படியானால் இப்படி யொரு கதையை செய்வோம்..

லாஜிக்:ALTER SEQUENCE CACHE | NOCACHE

கோடு:ALTER SEQUENCE Seq_name NOCACHE;

குறிப்பு : Seq name -யை சரிபார்க்கணும்.

0 comments:

 
All Right Reserved by Vadakadu Thorn Group of IT ©2011