
Case 7 – MVC and JDBC
Think-Design-Write Test-Code
- Description
Having now found a way to pass messages with which you feel comfortable, you turn your attention to your next job assigned to you by your boss that is to figure out how to store and retrieve the messages for all users in a database. Your boss has instructed you that you are to use JDBC, Java Database Connectivity, with the MySQL database to accomplish this. Your boss also says that all calls to the database are to use prepared statements. The company you are working for enforces this in all applications for security reasons.
You begin your exploration with installing MySQL, it’s tools, and what is called the MySQL driver (see the downloads tab).
You quickly learn that you need to brush up on your SQL skills and so you begin your exploration.
- Deliverables
- A UML state diagram for your solution
- UML sequence diagrams for both your client and server solution
- A UML class diagram for your solution
- A working client and server
- A modification of your client, testing client, and server classes
- A presentation of your teams solution to the problem
- Resources
- An SQL Tutorial
- MySQL JDBC Example
- How to use Prepared Statements
- Why use Prepared Statements
- Java API: Class, DriverManager, Connection
- Visual Paradigm
