Database & Data processing
Access is the main database on Windows as it is part of Microsoft Office. It provides a GUI over a SQL
database. It offers an easy to design forms for entering data and performing searches. Access offers Visual Basic for scripting, which enables easier logic on input validation.
Weka allows for input from a variety of sources and then running a series of different algorithms on it. It has facilities for decision trees, k nearest neighbor, and other machine learning algorithms. It can be used with its own built-in GUI or you can use it in code in Python
, or R
The main programming language for databases is SQL
(structured query language). It is cross-platform not only between different computers but different database engines. There are some differences between the different dialects and the features supported. SQL includes integers, floats, fixed-length strings, and indexes to other tables, but extensions include DateTime, JSON, geospatial data, binary data. SQL allows you to search the database using queries that can find data that match the criteria specified. You can use functions to aggregate the data if you just need the total, or average value for example the total sales for a particular State.
One of the easiest ways to write a GUI is to use the visual form designer in Visual Basic, and you can edit the code when you click on a button. Visual Basic provides a full programming language, that can be used to solve a wide variety of problems.
Architecture for Database Interaction
The architecture is usual for applications with database interaction.
All business entities are described in the packaging artist.model. Here we have a description of 3 classes Artist, Song, SongWriter – main objects of application business logic.
These objects are processed on 3 layers:
- Database layer: deals with objects on database level by appropriate entity tables and Many-To-Many tables. Access to the objects inside the database is executed by SQL requests from the DAO layer;
- DAO layer: provides an interface for manipulating with objects and retrieving objects from the database;
- Service layer: provides information about current business objects structure to the main user interface. It gets information from the database via the DAO layer. In this implementation, Console Menu is also implemented inside the service class.
As for Spring beans, all necessary beans are declared in the configuration file AppConfiguration.java.
Mainly, these injected beans are responsible for database interaction: data source object, JdbcTemplate, Dao object instance. Obtained successfully initialized ArtistDao object is used by one more bean – ArtistService. This class is annotated with @Service.