For this final artifact in this portfolio, the original project was an excersice on utilizing data structures to build objects and manipulate them with a service class, then running automated tests to ensure proper storage. It was originally a very simple project that contained three objects classes and three service classes. The objects were created and saved into a list through the service class. The course was heavily focused on automated testing, object building and object manipulation. Since the original artifact did not use a database, the data was not persistent. To improve upon the application, I chose to implement a database.
View Project on GitHub1. Briefly describe the artifact. What is it? When was it created?
For the database category I decided to create a database to integrate with my category one artifact, the Scheduler app. So far, I have created the database, and I have begun finishing the implementation into the Scheduler app. There was no original database for this application, instead the data was stored in array lists and was not saved anywhere. This resulted in no persistent data so to provide both persistence and scalability of an appointment management application I created a database for the various types of data that needed stored.
Ultimately however, I changed the database being used for the Scheduler application from MySQL to SQLite, as this would more appropriately fit the audience of that application. The rest of this description is for a database that was never used, but could be used if the Scheduler application was to be altered for a larger scope.
2. Justify the inclusion of the artifact in your ePortfolio.
The reason I selected this artifact for my ePortfolio is it displays my ability to enhance an application through combining previously established software with more efficient and effective storage of data. By designing and implementing a MySQL database schema and combining it with Java to make a complete application, I am demonstrating my skills and abilities with both the SQL language, database design and Java programming.
3. Did you meet the course outcomes?
In module one, the category three enhancement was meant to meet the following course outcome:
To accomplish this course outcome, I am implementing password encryption, input validation and protections against SQL injection. I have different access levels to the database, based on the type of employee to only allow authorized users and administrators to interact with the database. By validating the values prior to storage the design will help prevent erroneous data from being stored in the database. This project is still a work in progress since it is also going to be used for Category 3 of this course. It is on track to meet the enhancements that I had planned at the beginning of the course. All of the GUI components have been finished and when I create the database for the application, I will finish the remaining components to present the appointment, customer accounts, employee accounts and tasks to the user.
4. Reflect on the process of enhancing and modifying the artifact.
Below is the implemented schema and the original database schema from module 1. I changed the customer table to remove the username and password since the scheduling application will only be for the workers to use. It is not needed for the customer. There were no challenges in making the database, but it is taking longer than I originally thought incorporating it into the overall application. This is the first time I have used Java Swing and JDBC to create an application. I was originally planning on managing all connections to the database through a database Helper class, but as I have been implementing the database connections, I have changed the connections to the individual service classes (Employee, Appointment, Tasks and Customer) with the database helper class managing the creation of the tables. This allows for better adherence to the Single Responsibility Principle, better scalability and better maintainability.
View Project on GitHubThe scheduler program uses a Model View Controller (MVC) architecture which consists of object Models for each object type, and the tables of the database reflect those data types:
Each of these tables has a service class that handles interaction with the database. They are responsible for the Create, Read, Update and Delete (CRUD) functionality:
The database schema. Below is the layout of the database:
An overview of all the tables build for the database.