Tero, Jhon Orlan
JAVA MYSQL
Connection
Agenda
Introduction 3
Software Requirements 6
Connection Principles 8
CRUD 16
Application 18
3 Introduction
Before we proceed into our
discussion we must understand
first, what is MYSQL?
4 What is MySQL
MySQL is an open-source relational database
management system (RDBMS). Its name is a
combination of "My", the name of co-founder Michael
Widenius's daughter My, and "SQL", the acronym for
Structured Query Language.
5 Why and when to use MySQL?
It allows programmers to use SQL to create, modify,
and extract data from the relational database. By
normalizing data in the rows and columns of the
tables, MySQL turns into a scalable yet flexible data
storage system with a user-friendly interface that can
manage lots of data.
Software
Requirements
7 What software we need?
NETBEANS/IDE XAMPP CONNECTOR J
Connection
Principles
Netbeans - JAVA - MYSQL
9 MySQL Connection Requirements
Username Username used to authenticate as a user
Password Password used to authenticate as a user
Database Database to used in a project
Host What currently hosting your project
Port In which port running your MySQL Server – the default is 3306
10 JAVA Connection Requirements
URL A configuration url that includes the host port and some options
Username Username used to authenticate as a user
Password Password used to authenticate as a user
11 Connection in JAVA
Imports all the required modules Declare Global variable for a
connection
12 Connection in JAVA
Import the Connector J that you Go to services and add new
downloaded in your current project Connection
And supply all of the information
needed for a connection
13 Connection in JAVA
Make sure to include this line in
order to use our driver for our
connection
But as you can see it has a red line,
means it has an error or exception
So we will wrapped it by try
and catch statement
14 Connection in JAVA
Finally we can create a connection using DriverManager and
provide information such as URL, username and password.
But again we have a red line, so were
going to handle the exception by
adding line in the function we are
currently in.
15 How we get there
ROI Niche markets Supply chains
• Envision multimedia- • Pursue scalable • Cultivate one-to-
based expertise and cross- customer service one customer
media growth strategies through sustainable service with robust
• Visualize strategies ideas
quality intellectual capital • Engage top-line • Maximize
• Engage web services with timely deliverables
worldwide methodologies cutting-edge for real-
with web-enabled deliverables time schemas
technologies
CRUD
17 What is CRUD
CRUD is an acronym that comes from
the world of computer programming
and refers to the four functions that
are considered necessary to
implement a persistent storage
application: create, read, update and
delete.
Application
Are you ready for a Demo?