Question

build a comic database management system using database oracle and connect it to java

build a comic database management system using database oracle and connect it to java

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Steps to connect oracle database with java

  1. import java.sql.*;  
  2. class OracleCon{  
  3. public static void main(String args[]){  
  4. try{  
  5. //step1 load the driver class  
  6. Class.forName("oracle.jdbc.driver.OracleDriver");  
  7.   
  8. //step2 create  the connection object  
  9. Connection con=DriverManager.getConnection(  
  10. "jdbc:oracle:thin:@localhost:1521:xe","system","oracle");  
  11.   
  12. //step3 create the statement object  
  13. Statement stmt=con.createStatement();  
  14.   
  15. //step4 execute query  
  16. ResultSet rs=stmt.executeQuery("select * from emp");  
  17. while(rs.next())  
  18. System.out.println(rs.getInt(1)+"  "+rs.getString(2)+"  "+rs.getString(3));  
  19.   
  20. //step5 close the connection object  
  21. con.close();  
  22.   
  23. }catch(Exception e){ System.out.println(e);}  
  24.   
  25. }  
  26. } i
Add a comment
Know the answer?
Add Answer to:
build a comic database management system using database oracle and connect it to java
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • ADVANCED DATABASE(ORACLE DATABASE 11g Masterkill) Question 5 (Marks: 10) Mike is a database administrator who has...

    ADVANCED DATABASE(ORACLE DATABASE 11g Masterkill) Question 5 (Marks: 10) Mike is a database administrator who has recently joined an online car rental company who captured and stored data in Microsoft Excel spreadsheets. He is tasked with creating a database and migrating all the data into a relational database management system. Mike wants to implement an Oracle database, but is unsure of the Oracle 11g edition to use. Explain to Mike the various program categories that will enable him to operate...

  • ***JAVA*** Connect to a database to extract the data. This does not need to be a...

    ***JAVA*** Connect to a database to extract the data. This does not need to be a real database. For this portion of your project, you are just writing the code to connect to a database. You are not actually connecting to any specific database. You must include all of the necessary code to read from and write to the database. Just be sure to comment out all of the code so you can still run your program.

  • How would I make this database using Oracle SQL developer? Here is the link to the...

    How would I make this database using Oracle SQL developer? Here is the link to the scheme of the database. https://ibb.co/fy1rt6

  • Using oracle sql for creating database nd inserting data I want to write a constraint on...

    Using oracle sql for creating database nd inserting data I want to write a constraint on the date of birth so that any age will be only be from 21 to 60 This constraint should be calculated automatically using sysdate or the system date Hint: data type is date Also for the car year model I want to write a constraint to check that it is not older than 10 years (the field data type is integer) I want it...

  • Q2- Database management system (DBMS) is the main software tool of the database management approach because...

    Q2- Database management system (DBMS) is the main software tool of the database management approach because it controls the creation, maintenance, and use of the databases of an organization and its end users. List four common software Components with their functions for database management system. Component Function

  • using the java programming language Design a "Student Record Management System" in java including the following...

    using the java programming language Design a "Student Record Management System" in java including the following functionalities: 1 Input: Input student num, DOB, address, phone number etc. Input course titles, course number, time/locations. Input grade of each course for each student. 2 Process: Calculate GPA for each student. Sort and search on given criteria. 3 Output: Search by student num, show the student's information (including all courses and grades). Search by course num, show course information (including all students and...

  • php 1A)connect to the database using the PDO class (you should be able to connect with...

    php 1A)connect to the database using the PDO class (you should be able to connect with the username "root" and an empty password) 1C) select all the product names and their list prices, and print them out in a neat HTML table.

  • In using database features of Access or other DBMS packages, such as SQL Server or Oracle....

    In using database features of Access or other DBMS packages, such as SQL Server or Oracle. Make a numbered list of all the places you can think of where data about you could be stored. Then discuss: What are the implications of the same data being stored in many different databases? What are the risks if any and how can you protect your data.

  • Project 2 (required). Student Information Management System Write a GUI Application that is a MIS...

    i need help with the code and output screen shot Project 2 (required). Student Information Management System Write a GUI Application that is a MIS for students. Information of student includes student ID, name, date of birth, gender, major, grade, introduction, etc. The MIS has to provide insertion, deletion, query, and modification for students. To solve this application you have to: i. Design a friendly GUI based on JavaFX i. Provide the necessary functions, such as data insertion, data deletion,...

  • Oracle 12g (Please be sure to label everything) The database design should be implemented using VISIO...

    Oracle 12g (Please be sure to label everything) The database design should be implemented using VISIO or similar diagraming program, APEX or NCC’s oracle database. Use the attached spreadsheet “Semester Project Spread Sheet.xlsx” (http://www.mediafire.com/file/0d02fjdnkt1b882/Semester%20Project%20Spread%20Sheet%281%29.xlsx) for all diagram creation and DDL and DML. 2. E-R diagram (20%) that can be implemented for a medical clinic, using the following business rules: A patient can make many appointments with one or more doctors in the clinic, and a doctor can accept appointments with...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT