Skip to content
This repository was archived by the owner on Dec 13, 2021. It is now read-only.

swardana/jdbc-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JDBC Example

Show how to connect into database and perform simple insert, update, delete, and read data from and into database.

Tools & Library

  • Apache Maven (3.3.9)
  • MariaDB (10.0.29)
  • Apache Commons DBCP (1.4)

Environment

Database

To be able running this project first step is to setup the database, in this project used mariaDB database. Database was named demo with username: demo, password: demo, to make it simple run command below:

CREATE DATABASE IF NOT EXISTS demo;
ALTER DATABASE demo DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON demo.* TO demo@localhost IDENTIFIED BY 'demo';

Schema & Data

DDL schema and data was stored in src/main/resources/db, execute command below from project directory

mysql --user="demo" --password="demo" --database="demo" < src/main/resources/db/schema.sql
mysql --user="demo" --password="demo" --database="demo" < src/main/resources/db/data.sql

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages