- Saved searches
- Use saved searches to filter your results more quickly
- ninawekunal/Java-Client-Server
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- About
- Saved searches
- Use saved searches to filter your results more quickly
- kylegildea/Two-Tier-Client-Server-Application-Development-With-MySQL-and-JDBC
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Used JDBC-SocketProgramming-Swings-MultiThreading to develop a Java UI Project that communicates in a client server fashion over Socket to exchange and sync data.
ninawekunal/Java-Client-Server
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Final Project for the course CS-GY-9053 Java Programming
Concepts used:
- JDBC connection using SQLite3 database.
- Socket programming.
- Multithreading.
- Object Oriented concepts.
- Serialization.
- Swings and event handling for UI.
- Collections.
- The project is to build a client/server system that reads data from a DB into an object and sends the object to the server.
- The server then writes that data into its DB.
- There are two databases namely client and server containing a people table. I am using SQLite3 as the database.
- These two databases should interact with each other using networking.
- There are overall two main java files: ClientInterface and ServerInterface
- One instance of ServerInterface should be able to handle multiple client interface. (A multithreaded Server)
- Client should be able to load the database(client.db), open a socket connection to the server and send multiple objects across using the same connection.
- Server should be able to handle multiple clients using multithreading and receieve objects from all these clients over the socket connection and then enter those objects into its database and then view them in the text area.
ClientInterface:
- The Client UI has a menu that allows you to Exit and open a database, presumably the client.db database.
- The JFileChooser is sufficient for selecting it, seen in the OpenDBListener inner class in ClientInterface.java
- The dropdown box is empty (with one entry, “Empty”) when not connected to the database. When it is connection to the database, it should be populated with all names whose value of “sent” in the People table is “0” (or false. Sqlite does not support Boolean types explicitly).
- The “open connection” button should open a connection to the server. The Server location should be “localhost” and the port should default to “8001.” The “Close Connection” button should close the connection.
- You should be able to Open the connection, send data, close the connection, re-open the connection, and send data again without any errors.
- “Send Data” should get the entry in the people table that corresponds to what is selected in the dropdown box, create a Person object, and sent the person object to the server.
- If the client is not connected to the server, then you may raise an error, but the client should not terminate or otherwise fail to continue working.
- “Query DB Data” should show the current Contents of the People table in the text area, with Row names.
ServerInterface:
- The server should connect to server.db on startup and indicate such.
- It should be listening on port 8001.
- There should be a File menu with an Exit menu item that quits the application.
- The “Query DB” button should show the contents of the People table.
- Any messages you want (status messages, indications that data has been received, success status, etc.) can appear in the JTextArea, and be appended over time.
- You probably want to use a JScrollPane for this so that you can scroll through the messages.
- The server will run a thread that listens for connections. When it receives a connection from a client, it should spawn a thread to handle that connection from the client. i.e. A server should be multi-threaded and handle multiple clients.
Note: We are not handling concurrency issues in the database when multiple clients access the same data.
About
Used JDBC-SocketProgramming-Swings-MultiThreading to develop a Java UI Project that communicates in a client server fashion over Socket to exchange and sync data.
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
kylegildea/Two-Tier-Client-Server-Application-Development-With-MySQL-and-JDBC
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Objectives: To develop a two-tier Java based client-server application interacting with a MySQL database utilizing JDBC for the connectivity. This project is designed to give you some experience using the various features of JDBC and its interaction with a MySQL DB Server environment. Description:In this assignment you will develop a Java-based GUI front-end (client-side) application that will connect to your MySQL server via JDBC. You are to develop a Java application that will allow any client (the end-user) to execute commands against the database. You will create a Java GUI-based application front-end that will accept any MySQL DDL or DML command, pass this through a JDBC connection to the MySQL databaseserver, execute the statement and return the results to the client. Note that while technically your application must be able to handle any DDL or DML command, we won’t actually use all of the commands available in these sublanguages. For one thing, it would be quite rare to allow a client to create a database or a table within a database. Note too, that the only DML command that uses the executeQuery()method of JDBC is the Select command, all other DML and DDL commands utilize executeUpdate(). Some screen shots of what your Java GUI front-end should look like are shown below. Basically, this GUI is an extension of the GUI that was developed in the lecture notes and is available on WebCourses as DisplayQueryResults.java. Your Java application must give the user the ability to execute any SQL DDL or DML command for which the user has the correct permissions. Note also, that if the user wishes to change databases in the middle of a session, they must reconnect to the new database. Their user information can remain in the proper window, but you must click the reconnect button to establish a connection to the new database. You do not need to support simultaneous connections from your application to more than one database in this assignment. However, you will be able to start multiple instances of your Java application and allow different clients to connect simultaneously to the MySQL server, since we have set the database server up to allow up to 10 concurrent connections. Once you’ve created your application, you will execute a sequence of DML and DDL commands and illustrate the output from each in your GUI for two different users. For this project you will create, in addition to the root user, a client user with limited permissions on the database (see below). The root user is assumed to have all permissions on the database, any command they issue will be executed. The client user will be far more restricted.References for this assignment: Notes: Lecture Notes for MySQL and JDBC. Input Specification:The first step in this assignment is to login to the MySQL Workbench as the root user and execute/run the script to create and populate the backend database. This script is available on the assignment page and is named “project3dbscript.sql”. This script creates a database named project3. You can use the MySQL Workbench for this step, or the command line whichever you prefer.CNT 4714–Project Three –Spring 2017 Page 2The second step is to create authorizations for a client user (in addition to the root user) named client. By default your root user has all permissions on the project3 database. Use either SQL Grant statements from the command line or the MySQL Workbench (see separate document for details on how to accomplish this task) to check and set permissions for the client as follows: Register the new user named client (assign them the password client – ignore the MySQL warning on weak password setting) and assign to this user only selection privileges on the project3 schema. Output Specification: There are two parts for the output for this project. Part 1 is to provide screen shots from your application which clearly show the complete query/command expression and results for each of the commandsthat appear in thescript named:project3rootuserscript.sqlavailable on the course website. There are eight different commands in this script and some of the commands will have more than one output capture (see below). Part 2 is to provide screen shots from your application which clearly show the complete query/command expression and results for each of the commands that appear in the script named: project3clientuserscript.sqlavailable on the course website. There are three different commands in this script and some of the commands will have more than one output capture (see below). To produce your final output, first recreate the database, then run the root user commands followed by the client commands