3.9 Database and Java Servlets.pptx
3.9 Database and Java Servlets.pptx
UNIT NO 3
III V
20ITPC502
WEB TECHNOLOGY
IT8501
WEB TECHNOLOGY
JDBC Architecture
Accessing a Database
The process of retrieving information from a database via JDBC involves these
five basic steps:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
IT8501
WEB TECHNOLOGY
• jdbc:SUBPROTOCOL:SUBNAME
• The first part of the URL indicates that JDBC is being used to establish the
connection. The SUBPROTOCOL is the name of a valid JDBC driver or other
database connectivity solution. The SUBNAME is typically a logical name, or
alias, that maps to a physical database
• To establish a database connection, use the DriverManager object's
getConnection() method.
IT8501
WEB TECHNOLOGY
● Create a form in HTML file, where take all the inputs required to insert data
into the database. Specify the servlet name in it.
IT8501
WEB TECHNOLOGY
3. Open a connection
Video Links
1. Introduction to JDBC :
https://www.c-sharpcorner.com/article/introduction-to-jdbc/
https://youtu.be/-x4qIXzl6RY
3. Application Development
https://www.youtube.com/watch?v=jiGFhqD5elk