This will not allow me to connect to the mysql database which i have installed on my computer.In addition I have installed connector/j into the same directory. I have opened the class driver that resides in the org.gjt.mm.mysl folder in my IDE (Jcreator) and i have placed in the same directory with my ProductQuery class.
What I am actually trying to achieve is I have 2 input files that I require a java program to read and populate the tables. cam anyone help. see the question below
Please complete the Java exercise below.
Assumptions and prerequisites for this project:
- There exist a database with following two tables:
o PERSON [ PERSON_ID (Primary Column), LAST_NAME, FIRST_NAME, STREET, CITY ]
o ORDER [ ORDER_ID (Primary Column), ORDER_NO, PERSON_ID ]
- Input files to be processed:
o Person.data – The file has Person ID, First Name, Last Name, Street, City separated by comma (‘,’).
o Order.data – The file Order ID, Order Number and Person ID separated by pipe (‘I’) character. Person ID is present in both the files.
Requirement - Write a Java program to:
- Read the files (Person.data and Order.data) and populate the tables (PERSON and ORDER)
- Fetch data from these two database tables (using plain JDBC) and print:
o Persons with at least one Order
o All Orders with First Name of the corresponding person (if available)
Artefacts to be submitted at the end of this exercise:
- A zipped version of the source code with a project summary write up.
Mandatory requirements:
- Java 5 or above should be used.
- No third party libraries other than JDBC and JUnit
- The unzipped project files should be portable to a standard IDE such as Eclipse or NetBeans
The project work will be evaluated based on:
- Usage of Java coding standards
- Usage of control statements (if, for, while, switch, etc.), Collection API
- Utilisation of OOPs concepts
- Efficiency of the code
- Exception Handling
- Usage of Design Patterns
- Test Cases (preferably in JUnit)