DATABASE IN JAVA.

Slides:



Advertisements
Similar presentations
CREATE ALTER DROP Stored Procedure. Apa itu Stored Procedure?? kumpulan perintah SQL yang diberi nama dan disimpan dalam server Sekumpulan pernyataan.
Advertisements

Java Database Connectivity (JDBC). 2/24 JDBC (Java DataBase Connectivity) - provides access to relational database systems JDBC is a vendor independent.
JDBC. Java Database Connectivity (JDBC) Use the java.sql package to query and update the database. JDBC is an API that allows java to communicate with.
Java, Access, SQL, HTML. Three-tier architecture involves: Client - Browser Server - Tomcat Database - Access - Server-side language - JSP could just.
15-Jun-15 JDBC. JDBC is a Sun trademark It is often taken to stand for Java Database Connectivity Java is very standardized, but there are many versions.
JDBC Overview Autumn 2001 Lecturer: C. DeJong. Relational Databases widespread use used via SQL (Structured Query Language) freely available powerful.
Advanced Java Programming – Eran Toch Methodologies in Information System Development Tutorial: Advanced Java Programming and Database connection Eran.
CSE 190: Internet E-Commerce Lecture 13: Database code.
Java database Programming JDBC Trademarked name of a Java API that supports Java programs that access relational databases Stand for Java DataBase Connectivity.
Three-Tier Architecture Oracle DB Server Apache Tomcat App Server Microsoft Internet Explorer HTML Tuples HTTP Requests JDBC Requests Java Server Pages.
JDBC Java API for Database Connectivity. Layout of this recitation Introduction to JDBC API JDBC Architecture Understanding the design of JDBC API –Classes.
UFCE4Y UFCE4Y-20-3 Components and Services Julia Dawson.
Java MS Access database connectivity Follow these steps: 1)Go to the start->Control Panel->Administrative Tools- > data sources. 2)Click Add button and.
Lab: JDBC 1 Computer Engineering Lab III v Objective –to give some background on JDBC to help with the lab exercises , Semester 1,
CIS 270—App Dev II Big Java Chapter 22 Relational Databases.
CS178 Database Management “JDBC”. What is JDBC ? JDBC stands for “Java DataBase Connectivity” The standard interface for communication between a Java.
JDBC. What is JDBC JDBC is an acronym for –Java Data Base Connectivity. It allows java/jsp program to connect to any database.
Georgia Institute of Technology Making Text for the Web part 5 Barb Ericson Georgia Institute of Technology March 2006.
MySQL, Java, and JDBC CSE 3330 Southern Methodist University.
JDBC Tutorial MIE456 - Information Systems Infrastructure II Vinod Muthusamy November 4, 2004.
JAVA Database Access. JDBC The Java Database Connectivity (JDBC) API is the industry standard for database- independent connectivity between the Java.
Object-Oriented Software How does it differ from procedural? How is it similar to procedural? Why has it become so popular? Does it replace or supplement.
Servlets Database Access. Agenda:  Setup Java Environment  Install Database  Install Database Drivers  Create Table and add records  Accessing a.
JSP program that interacts with HTML form & Access Data Base.
Accessing Database using JDBC. JDBC Objectives Gain basic knowledge of Java JDBC Become familiar with the basics of interacting with a database using.
JDBC. A Basic MySQL Tutorial MySQL is an open source database management software that helps users store, organize, and retrieve data. It is a very powerful.
Chapter 25 Databases. Chapter Scope Database concepts Tables and queries SQL statements Managing data in a database Java Foundations, 3rd Edition, Lewis/DePasquale/Chase25.
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
Работа с базами данных – JDBC Введение в JDBC. JDBC JDBC (Java DataBase Connectivity) – технология доступа к базам данных для Java Состоит из: API (java.sql.
Java and Databases. JDBC Architecture Java Application JDBC API Data Base Drivers AccessSQL Server DB2InformixMySQLSybase.
EXAMPLE I An application showing JDBC access to Cloudscape.
Tasks Needed for MissionMapEditor Martin Q. Zhao September 18, 2010.
CSI 3125, Preliminaries, page 1 JDBC. CSI 3125, Preliminaries, page 2 JDBC JDBC stands for Java Database Connectivity, which is a standard Java API (application.
Basics of JDBC.
JDBC Java DataBase Connectivity. Loading the driver import java.sql.*... Class.forName("org.postgresql.Driver")‏
JAVA DATABASE OOP Praktek dengan Java Miswar,S.st Sumber : Eddy Muntina Dharma,ST,MT.
Web Programming Assistant Professor Xiaozhong Liu
Umair Javed©2005 Enterprise Application Development Java Database Connectivity (JDBC) JDBC1.
1 Download current version of Tomcat from: g/tomcat/ g/tomcat/ Install it in: C:\Program Files\Apache.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
JSP/Database Connectivity Instructor: Dr. M. Anwar Hossain.
JDBC. What is JDBC JDBC is an acronym for –Java Data Base Connectivity. It allows java program to connect to any database.
MySQL root 암호 $ mysqladmin -u root -p password new-password $ mysql -u root mysql mysql> update user set password = password('new-password') where user.
Database Programming Basic JDBC Programming Concepts.
MYSQL APPLICATIONS USING JAVA & JDBC CIS 430 –Database Concepts Victor Matos.
JSP and DB.
CompSci 280 S Introduction to Software Development
JDBC and OCCI 10/29/2017.
Lecture 11 Object Oriented Programming Using Java
Java Access to RDB Relational databases (RDBs) dominate today, due to:
Lec - 14.
JDBC 15-Apr-18.
J2EE (Enterprise Programing)
PERTEMUAN 3.
PERTEMUAN 2.
CS320 Web and Internet Programming Database Access with JDBC
Advanced Web Automation Using Selenium
JDBC 21-Aug-18.
HW#4 Making Simple BBS Using JDBC
Prof: Dr. Shu-Ching Chen TA: Sheng Guan
Client Access, Queries, Stored Procedures, JDBC
JDBC 15-Nov-18.
Interacting with Database
class PrintOnetoTen { public static void main(String args[]) {
JAVA DATABaSE CONNECTIVITY
JDBC API.
Making Text for the Web part 6
JDBC Example.
Java Chapter 6 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

DATABASE IN JAVA

DATABASE BUAT DATABASE TERLEBIH DAHULU DENGAN MYSQL MISAL MELALUI XAMPP/ PHPTRIAD PHPTRIAD: START  PROGRAM  PHPTRIAD  MYSQL  MYSQL D-NT / APACHE CONSOLE  START APACHE XAMPP: START  APACHE FRIENDS  XAMPP  XAMPP CONTROL PANEL  START APACHE DAN MYSQL

BUKA BROWSER LALU KETIKKAN : LOCALHOST/PHPMYADMIN

LANGKAH PEMBUATAN DATABASE (1) CREATE DATABASE

LANGKAH PEMBUATAN DATABASE (2) CREATE TABLE

LANGKAH PEMBUATAN DATABASE (3) ISIKAN FIELD YG AKAN DIBUAT ATUR TIPE DATANYA SIMPAN TABEL SETIAP KALI AKAN DITAMPILKAN PERINTAH SQL UNTUK MASING – MASING EKSEKUSI PERINTAH PERHATIKAN TAB – TAB YANG TERDAPAT DI BAGIAN ATAS UNTUK BROWSE DAN OPERASI LAIN

KONEKSI JAVA-DATABASE (1) import java.sql.*; public class KoneksiMysql { private String host="localhost"; private String user="root"; private String password=""; private String db="kuliah"; public KoneksiMysql() { Connection conn; Statement st; ResultSet rs; int no=0; try { Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection( "jdbc:mysql://"+ host +"/"+ db +"?user=" + user + "&password="+ password); st = conn.createStatement(); rs = st.executeQuery("Select * from mahasiswa");

KONEKSI JAVA-DATABASE (2) while (rs.next()) { no=no+1; System.out.println(no + ")"); System.out.println("NIM :" +rs.getString("NIM")); System.out.println("Nama :" +rs.getString("nama")); System.out.println("Umur :" +rs.getString(3)); System.out.println("================================"); } conn.close(); catch(Exception e) { System.out.println("Pesan kesalahan : "+ e.getMessage()); public static void main(String[] args) { KoneksiMysql koneksimysql = new KoneksiMysql();

KONEKSI JAVA-DATABASE (3)