Академический Документы
Профессиональный Документы
Культура Документы
Database:
Database is Repository of Data. Using Database we can Store Data
Permanently and retrieve Data When ever Needed by using some Queries.
Examples are Oracle, Microsoft SQL Server, MySQL etc...
DBMS:
There are 3 types
1)RDBMS(Relational Database Management Systems )
It's able to Store data in form of tables, it will use SQL to Perform
data manipulations.
2) OODBMS(Object Oriented Database Management Systems)
Its able to store data in the form of Objects, by following Object
Oriented features and it will use 'Object Query Language'.
3) ORDBMS(Object Relational Database Management Systems)
Its able to store data in form of both Objects and Tables, it will use
SQL3 as Query language to perform Operations on data.
SQL3 = (SQL2 + OQL)
TSA-(Buffers, JAVA Objects)
File Systems
PSA
DBMS
DataWarhouse
RDBMS
ODBMS
ORDBMS
(SQL3 =SQL2+OQL)
DB
En
o
10
1
10
2
DBE
Ena
me
AAA
BBB
Query
Tokenize
Stream of Tokens
Query
Parsing
Query Tree
SAL
500
0
800
0
Query
Optimization Optimised Query Tree
Query Execution
JDBC
-JDBC is a Step by Step Procedure to interact with Database from JAVA
Applications in order to perform Database operations from java Applications.
-Java Database Connectivity is an API, that helps Programmer to write Java
Programs to connect with DB, retrieve data from DB and perform various
operations on Data.
-To Execute JDBC applications we need a Convertor to convert Database
Logic from JAVA Representation to Query Language Representation and viceversa. We Use Convertor 'Driver'.
- Driver : Driver is an Interface existed between Java Application and
Database, it is used to Map JAVA API calls to Query Language API calls
And Query Language API calls to JAVA API calls.
JAVA
Appl
----------------------------------------
Driver
Databas
e
B
E
Oracle Queries:
Create table EmpTab(eno int, ename Varchar2(30), Salary float);
Insert into EmpTab values(&eno, '&ename', &salary);
Insert into EmpTab values(E-111, 'Galvin', 12000);
Update EmpTab set Salary = Salary+1000 where eno = E-111;
Delete from EmpTab where eno=1001;
Commit
To save all the Changes into the Database.
Rollback
To Un-Save all the Changes made to Database.
MySQL
To Show DataBases : show databases;
To Show Tables: show Tables;
to Show Description: desc emptab;
Stages in JDBC Program :
The following stages are used by JAVA Programmers' While using JDBC in
Programs
1) Registering the Driver: