Professional Documents
Culture Documents
Oracle Project. Data Base.
Oracle Project. Data Base.
Data Base.
A logically collected data is called data bade. For example our phone directory
our address book . Data base is very important part of management the account
system .Today number of software’s are used for data base management but the
best software use for data base management that is oracle. We are maintain our
number of data on it. Today it is used on a large scale.
ORACLE.
Oracle is a software development program. Oracle is best software use for data
base management. Today in Pakistan oracle use approximately 90%. It is vastly
use in our industries and department stores. Oracle is very important part of our
data base management.
Form.
Form is the second step of oracle. Use for data base management. In
form we can enter the data. All the data entries we can enter in the form. For
this purpose we make a complete structure for making a full form. We can enter
a number of data in form. Data we are entering in form always save in the SQL.
Report.
Report is the third step of oracle. By use of report we can get the
feed back of data we enter in the form and in the SQL. It is use for data base
presentation. It is also an important step of oracle.
AFTER INSTALATION.
After installation of oracle first of all we open the SQL from start menu. Here
we give it a password and user name that is make by default in it.
COMMANDS.
Select * from tab;
This command is use for table show made in the user Scott. This command
show all the table of scott .
For example.
Emp.
Salgrade.
Bounus.
Dept.
This command is use for specific table show. We can see all the rows and
columns of the table of emp.
For example.
This command is use for specific columns show. This command show the data
of eno 22.
For example.
Eno Ename Edate Mgr Sal Commission
124 Ali 01102009 100 200 120
This command show the data by name this command show the data of Ali.
Select * from emp
Where sal= 200;
For Example.
For Example.
For Example.
For Example.
ED.
SQL>ed
After changing the command save him and close it. And press / for taking the
result.
SQL>/.
Data Types.
There are three types of data enter in the oracle.
1. Number. (1,2,3,4…….).
2. Varchar2 (ali,1,2,3,4…..).
3. Date (Date).
SQL>desc emp;
This command show the table structure.
For Example.
Structure Data Types
Eno Number(5)
Ename Varchar2(7)
Job Varchar2(6)
Mgr Number(6)
Edate Date
Sal Number(60)
Commission Number(44)
Deptno Number(22)
This command show the salary of all the employ that between the 300 and 500.
For Example.
For Example.
For Example.
This command show the average of all salary in the table of emp;
For Example.
200+300=500/2=250.
This is average salary of a emp.
Keys Types.
There are three types of keys.
1. Primary Keys.
2. Unique Keys.
3. Foreign Keys.
3).Foreign Keys.
The key that meets the tow tables called the foreign keys.
After giving rights close the SQL and open it again now give it your new user
name Ali and password Ali.
Table created.
For enter values from SQL.
Dcode Dname
1 us
Character and varchar2 should always written in single quotation(‘ ‘).
Original Project.
We create 7 tables in our original project.
1. Rcptmst.
2. Rcptdtl.
3. Issuemst.
4. Issuedtl.
5. Dept.
6. Item.
7. Supp.
Dcode Dname
1 Ali
2 Aqib
For Example.
Dcode Dname
1 Ali
2 Aqib
Table of receipt.
Rno= 1,
Rdate= date,
Supplier= Ali,
Dept= us,
Rno= 1.
Item= pen,
Qty= 20,
Rate= 10,
Issue no= 1,
Issue date= date,
Dept= us,
Person= Ali,
Issue no= 1,
Item= pen,
Qty= 20,
Tables.
Create table Rcptmst(
Rno number(5),
Rdate date,
Scode number(5),
Dcode number(6));