Question
help need for Java code: Write a program that will create a yankees table for a baseball part a Access database file or a part
help need for Java code:
Write a program that will create a yankees table for a baseball part a Access database file or a part b Derby database file. It will have fields for the name of the player, the position of the player, and the player's number. Then insert the following records into the table (a list of yankees from a few years ago). Use SQL commands for the create and insert. Then use a ResultSet to list all records and all fields. If you use Access, set up UCanAccess or the ODBC JDBC bridge and create an Access baseball database file, then the lab exercise will create the yankees table. If you use Derby, set up the derby.jar file, set up the extra files, and run with the proper arguments.
Bernie Williams CF 51 Derek Jeter SS 2 Mariano Rivera P 42 Jason Giambi 1B 25 Mike Mussina P 35 Alfonso Soriano 2B 12 You then realize Giambi would be better as a DH instead of 1B, so use an SQL command to update the table for the record with Jason Giambi as the Name in the java program. For derby, the two new key lines in the try block are: SimpleDataSource.init("databaseyankees.properties"); /* database configuration management in databaseyankees.properties separate file */ con = SimpleDataSource.getConnection(); /* Connection object created from Properties object in SimpleDataSource.java file */
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started