Question

 

Write a program using JDBC for simple CRUD application for billing of a general store. Make necessary assumptions.

04 Aug 2025
Answer :
Word Count : 525
A simple CRUD application for billing in a general store using Java and JDBC involves connecting to a MySQL database and performing Create, Read, Update, and Delete operations on a `billing` table. This application allows storing and managing billing details such as product name, quantity, price, and total amount. First, we assume the database and table structure is as follows: Database name: `general_store` Table name: `billing` ```sql CREATE DATABASE general_store; USE general_store; CREATE TABLE billing ( id INT PRIMARY KEY AUTO_INCREMENT, product_name VARCHAR(100), quantity INT, price DOUBLE, total DOUBLE ); ``` Next, we implement the CRUD operations in Java using JDBC. You need to have the MySQL JDBC driver in your classpath (`mysql-connector-java`). ```java import java.sql.*; import java.util.Scanner; public class BillingCRUD { static final String DB_URL = "jdbc:mysql://localhost:3306/general_store"; static final String USER = "root"; static final String PASS = "password"; public static void main(String[] args) { Scanner sc = new Scanner(System.in); try { Connection conn = DriverManager.getConnection(DB_URL, USER, PASS); Statement stmt = conn.createStatement();
______ ____ __________ _________ ___ ___ ___ ________ ______ _______ ______.
_________ ___ ____ ______ ________ ___ _____.
________ _____ __________ ____ _________ _____.
_____ __________ _______ ________ _____ ________ __________.
___ _____ _____ ___ ______ _____ _______ ________ ____ __________.
____ ___ __________ _______ _____ _______ ___ _______ ___ ___.
___ __________ _______ ___ _______ ____ _____ _______ _________ _____ _____ ________.
___ ___ ________ _______ ________ _____ ________ __________ ____ __________ _____ __________.
__________ ________ _____ ________ ___ _____ ____.
_____ ________ ____ __________ ___ _____ _____ ______.
________ ____ _________ ___ _______ _____ ______ ___.
___ ____ __________ ___ ________ ______.
________ _____ _____ ______ ___ ______ ______.
_____ __________ _____ _________ ____.
_____ _____ __________ __________ ____ _________ ______ __________ _________ ___.
_______ _____ ______ ________ _____ ___ _____.
________ ____ ___ ______ __________ __________ ____ _______ ____.
___ _________ ________ ____ __________ ________ ________ __________ _________ ______ ______.
_________ _____ ______ _________ __________ ______ __________.
______ _______ ______ ____ ___ _____ ____ ___ ____ ______.
_______ ________ ___ ____ ______ __________ ______.
______ _________ ______ ____ _________ ________ _______ _________ _____ _______ _________.
____ _________ __________ _____ _______ __________ ________ ____ _________.
_____ ________ _______ ____ ______ __________ ______ ____.
_________ ___ ___ __________ ___ _______ _____.
________ ___ ____ ____ ________ ______.
___ ________ _________ ___ ________ ___ ________ ____ ______ _____ ________ ____.
________ _________ ____ _________ _______ _______ _______ _________ ________.
__________ _________ ____ _________ ____ _________ ____ ________ _______.
___ _______ _______ ____ _________.
_____ ________ __________ ___ ______ _________ ____ ________ __________ _____ ___ ________.
_________ ________ _____ _______ ____ _______ ______ _______ _____ _____.
______ ______ ___ ________ ____ ____ ____ ___ _______ __________ _______.
____ _____ ______ ________ ____ ________ ________ ________.
_________ _______ ______ ______ ___ _________ _________.
__________ ______ ______ ______ _____ _________ ___.
_____ _________ _______ _______ ___ _________ _______ ___ ___ ____ ________ ________.
__________ _________ _______ _____ ______ ________ __________ _______.
___ _________ _______ ______ _________ ___.
_____ _______ ___ ____ ____ _________ ____ _________ ___ _____ _______ ___.
_______ ____ ______ ________ ____ ___ _____.
______ ___ __________ _______ _____ ______ _____ _____ ___.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MCSL 210 2025 2026 -  Write a program using JDBC for simple CRUD application for b | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→