ArtConnect Pro is a JavaFX application connected to a MySQL database. It manages artists, artworks, galleries, exhibitions, workshops, bookings, and community members for a local art community.
The final application uses JDBC services by default. The old in-memory service classes are still present for reference, but ServiceProvider is configured to use the MySQL/JDBC implementation.
com.project.artconnect.MainApp: JavaFX entry point.com.project.artconnect.model: Domain entities.com.project.artconnect.dao: DAO interfaces.com.project.artconnect.persistence: JDBC DAO implementations.com.project.artconnect.service: Service interfaces.com.project.artconnect.service.impl: JDBC services and legacy in-memory services.com.project.artconnect.ui: JavaFX controllers.src/main/resources/com/project/artconnect/ui: FXML views.sql/schema.sql: Database schema, keys, relationships, and constraints.sql/data.sql: Demo data.sql/advanced.sql: Views, indexes, triggers, and stored procedures.sql/test_transactions.sql: Transaction scenarios.
Default connection settings are in DatabaseConfig:
URL: jdbc:mysql://localhost:3306/ArtConnect
USER: root
PASSWORD: root
They can also be overridden without editing code:
$env:ARTCONNECT_DB_URL='jdbc:mysql://localhost:3306/ArtConnect?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Europe/Paris'
$env:ARTCONNECT_DB_USER='root'
$env:ARTCONNECT_DB_PASSWORD='root'Create and fill the database:
mysql -uroot -p < sql/schema.sql
mysql -uroot -p --default-character-set=utf8mb4 ArtConnect < sql/data.sql
mysql -uroot -p --default-character-set=utf8mb4 ArtConnect < sql/advanced.sqlRequirements: JDK 11+, Maven, MySQL 8.
mvn clean javafx:runCompile the project:
mvn clean testRun transaction checks after loading schema.sql, data.sql, and advanced.sql:
mysql -uroot -p --default-character-set=utf8mb4 ArtConnect < sql/test_transactions.sqlExpected database objects:
- 18 tables
- 3 views
- 4 triggers
- 3 stored procedures
The benchmark/ folder contains two Python scripts that measure the real performance gain of idx_artists_city on the artists table.
pip install mysql-connector-python1. Generate test data (inserts 50,000 fictional artists across 100 French cities):
python benchmark/generate_artists.py2. Run the benchmark (measures average query time over 50 runs with and without the index, flushing the table cache between each run):
python benchmark/benchmark_index.py| Without index | With index | |
|---|---|---|
| EXPLAIN type | ALL (full scan ~44,000 rows) |
ref (index lookup ~486 rows) |
| Average time | 36.6 ms | 5.6 ms |
| Gain | — | 6.6x faster (85% reduction) |
The EXPLAIN output confirms that without the index MySQL scans the entire table, while with the index it jumps directly to matching rows.
Note: benchmark artists are prefixed with
bench_and are separate from the demo data. Re-runninggenerate_artists.pycleans up previous benchmark rows automatically.
- Lists data from MySQL through JDBC services.
- CRUD screens for artists, artworks, and exhibitions.
- Artist-discipline relationship management.
- Artwork-artist relationship management.
- Exhibition-gallery relationship management.
- Workshop booking through stored procedure
sp_inscrire_membre. - UI validation for required fields, invalid dates, invalid years, negative prices, and invalid emails.
- Advanced SQL objects: views, indexes, triggers, stored procedures, and transaction test scenarios.