Database
Database
Chapter 28
Objectives
You will learn about:
Relational database concepts
Use of Structured Query Language (DDL,
DML,DCL)
java.sql. API
Javax.sql.RowSet
PreparedStatement
Transaction Processing
What is Database
Is a permanent storage of data
Is an organized collection of data
Is a collection of organized data in
tables(row,colums)
Table is a collection of related records
Records is a collection of related
fields
Database management
Systems
Provides mechanism to interact with the database to:
Store
Organise
Retrieve
Modify data for users
User
Database
Employee
I
D
Nam
e
surname
deptN
o
courseCod
e
descript
ion
Database
Student
Descripti
on
studN Nam surnam
o
e
e
Relational Database
Is a logical representation of data in tables
Each table has a name (tblEmployee, tblStudent,
TblCourse)
Each table is composed of rows/columns
Each row is a collection of records
Each column is a field for each record
Example of Relational
Database
Student database may consist related
tables as follows:
tblStudent (studentNo Pm)
tblSubject (FK_studentNO)
tblFees (FK_studentNO)
Relationship
(one to one)
(one to many)
(many to many)