Code Monkey home page Code Monkey logo

java-quickstart's Introduction

Quick Start: Java and MariaDB

License

This repository contains examples on how to connect to MariaDB databases using a combination of different Java libraries and frameworks.

Before you run the examples

  1. Make sure you have a MariaDB Server (Enterprise or Community) running. If you don't have a MariaDB server running, you can easily run one using Docker:
docker run --name mariadb --detach --publish 3306:3306 --env MARIADB_ROOT_PASSWORD='RootPassword123!' mariadb

Alternatively, you can Download and install the server directly on your OS.

  1. Connect to the database using MariaDB Shell:
mariadb-shell --dsn mariadb://root:'RootPassword123!'@127.0.0.1

Alternatively, you can use any database client compatible with MariaDB.

  1. Prepare the database schema and user as follows:
CREATE DATABASE demo;
CREATE USER 'user'@'%' IDENTIFIED BY 'Password123!';
GRANT SELECT, INSERT, UPDATE, DELETE, DROP ON demo.* TO 'user'@'%';

CREATE TABLE demo.programming_language(
	pl_id INT PRIMARY KEY AUTO_INCREMENT,
	pl_name VARCHAR(50) NOT NULL UNIQUE,
	pl_rating INT
);

JDBC & JPA

Spring Boot

  • 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 (Java EE)

Quarkus

(work in progress)

java-quickstart's People

Contributors

alejandro-du avatar rhedgpeth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.