View Single Post
  #1 (permalink)  
Old 28-Mar-2008, 06:57
fahimaamir fahimaamir is offline
Newbie
 
Join Date: Mar 2008
Country: pakistan
Posts: 8
Current Location: karachi
First Language: urdu
Thanks: 0
Thanked 0 Times in 0 Posts
fahimaamir is an unknown quantity at this point
Question check grammer of my pragraph

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;
Reply With Quote