- Notifications
You must be signed in to change notification settings - Fork15
This repository contains code samples for getting started with Java and MariaDB.
License
NotificationsYou must be signed in to change notification settings
mariadb-developers/java-quickstart
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository contains examples on how to connect toMariaDB databases using a combination of different Java libraries and frameworks.
- Make sure you have a MariaDB Server (Enterprise orCommunity) running. If you don't have a MariaDB server running, you can easily run one usingDocker:
docker run --name mariadb --detach --publish 3306:3306 --env MARIADB_ROOT_PASSWORD='RootPassword123!' mariadb
Alternatively, you canDownload and install the server directly on your OS.
- Connect to the database using the MariaDB CLI client:
mariadb -h 127.0.0.1 -u root -p'RootPassword123!'
Alternatively, you can use any database client compatible with MariaDB.
- Prepare the database schema and user as follows:
CREATEDATABASEdemo;CREATEUSER 'user'@'%' IDENTIFIED BY'Password123!';GRANTSELECT, INSERT,UPDATE,DELETE, DROPON demo.* TO'user'@'%';CREATETABLEdemo.programming_language(pl_idINTPRIMARY KEY AUTO_INCREMENT,pl_nameVARCHAR(50)NOT NULL UNIQUE,pl_ratingINT);
- JDBC (Java Database Connectivity): The foundational technology used for persistence in Java.
- JPA/Hibernate: The de-facto standard for consuming databases from Java apps.
- Spring Boot Data JPA: Spring-based programming model for data access on top of JPA.
- R2DBC ➚: Reactive database connectivity.
- jOOQ: Type-safe SQL queries in Java.
- MyBatis: Map SQL results to Java methods in a simple way.
- Jakarta EE + GlassFish: Jakarta EE is set of vendor-neutral specifications to build enterprise Java applications.
- MicroProfile + Open Liberty: An open-source community specification for Enterprise Java microservices.
(work in progress)
About
This repository contains code samples for getting started with Java and MariaDB.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.