
28-Mar-2008, 05:14
|
| Newbie | | Join Date: Mar 2008 Country: pakistan Location: karachi First Language: urdu
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
| |
Re: Please check my paragraph writing sir
Please check these material also an correct. No check code check only my description that I wrote 1.) Table
Table is a set of data elements that is organized in row and column the columns. The columns are identified by name is called field, and the row are identified by value appearing in particulars column subset is call record. Every tables link with each other by candidate key. Create Degreedim table
This flowing code create DEGREEDIM table that saved the department and degree information CODE : CREATE TABLE DEGREEDIM( "DEGDEPT" VARCHAR2(99 BYTE), "DEGSNO" NUMBER NOT NULL ENABLE, "DEGNAME" VARCHAR2(99 BYTE), ****************************** 2.) Constraint
Constraint are table attribute used to define rules on the type of data value allowed within specified column by enforcing these rules within the database, you restrict to a user against incorrect data being added to the database.
********************
3.) Sequence
A sequence is an object in oracle that is use to generate a number sequence, that sequence provide the unique number for primary key MDEG SequenceThis flowing code generate the unique number sequencecodeREM START MFAFORBI MDEGCREATE SEQUENCE "MFAFORBI"."MDEG" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 41 CACHE 20 NOORDER NOCYCLE ;REM END MFAFORBI MDEG *********************************
4.) Trigger
Trigger is special kind of stored procedure that execute automatically, when a user attempt the specified insertion, update, or delete statement.
There are two type of trigger. - Before (run before table affection)
- After (run after table affection)
Create DTTR Trigger This flowing code gets a unique number from Mdeg sequence that use as primary key in DEGREEDIM table. CODE : CREATE OR REPLACE TRIGGER "MFAFORBI"."DTTR" BEFORE INSERT ON DEGREEDIM FOR EACH ROW BEGINSELECT MDEG.NEXTVAL INTO :NEW.DEGSNO FROM DUAL;END; thank you
aamir |