What
is Database ?
Database is a collection of information
stored and retrieve from same. Database is one of the storage of data so that
it can be available to retrieve whenever need.
Types
of Database?
1.Relational Database
2.Object
Oriented Database
3.Hierarchical
Database
4.Network
Database
Database Connectivity program in java using MS access Database
import
java.io.*;
import
java.sql.*;
class
DatabaseProgram
{
public
static void main(String args[])
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection
con=DriverManager.getConnection("jdbc:odbc:Data");
Statement stmt=con.createStatement();
System.out.println("Connection
established");
con.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
How to execute Database connectivity program in java by using Ms access.
1.Copy this program in your Notepad
2.save this program in JDK/bin directory as DatabaseProgram.java
3.Create MS access Database as mentioned in post