dev-resources.site
for different kinds of informations.
Mapping with SCHEMA
Published at
10/15/2022
Categories
oracle
micronaut
jdbc
Author
e240683
Main Article
Author
7 person written this
e240683
open
Una mala práctica en la configuración de aplicaciones, es usar el owner del esquema para acceder a la base de datos.
Es recomendable crear una cuenta de usuario y otorgar los permisos necesarios y específicos.
Pongamos como ejemplo:
- ESQUEMA: REGIONALIZACION
- USUARIO: MSPRODUCTOSWOW
- PERMISOS:
-- Oracle
GRANT SELECT, INSERT, UPDATE
ON REGIONALIZACION.LGT_PROD_LOCAL_OFERTA_AUX
TO MSPRODUCTOSWOW
Empleando las anotaciones de Jakarta Persistence, definimos el mapping de nuestra Entity: name/schema.
import jakarta.persistence.*;
@Table(name = "LGT_PROD_LOCAL_OFERTA_AUX", schema = "REGIONALIZACION")
public record WOWProduct(@EmbeddedId WOWProductId id,
float porcDctoOferta,
LocalDateTime fecIniVigOferta,
LocalDateTime fecFinVigOferta,
String usuCreaProdLocOfe,
LocalDateTime fecCreaProdLocOfe) {
}
Nótese que podemos usar record, incluso para definir una llave compuesta.
@Embeddable
record WOWProductId(
@Column(name = "COD_GRUPO_CIA") String codGrupoCia,
@Column(name = "COD_LOCAL") String codLocal,
@Column(name = "COD_OFERTA") String codOferta,
@Column(name = "COD_PROD") String codProd) {
}
Ejecutamos nuestro proyecto basado en #Micronaut:
Documentación
https://micronaut-projects.github.io/micronaut-data/latest/guide/#sqlAnnotations
https://github.com/edgargs/mn-jdbc-schema
jdbc Article's
30 articles in total
Simplify Python-Informix Connections with wbjdbc
read article
🚀 Mastering JDBC: Bridging Java and Databases Seamlessly 📊
read article
LIBRARY MANAGEMENT SYSTEM USING JAVA AND SQL
read article
Java JDBC + IntelliJ + SQLite - A Beginner's Walkthrough
read article
Java Backend Management Project
read article
JDBC and Streams have never been simpler
read article
Quick tip: Using SingleStore for Iceberg Catalog Storage
read article
Introducing Kuery Client for those who love writing SQL in Kotlin/JVM
read article
Performance tests IRIS - PostgreSQL - MySQL
read article
Mastering Conversations: A Guide to Building and Using a Java-Based Chat (StarChat) with IRIS Cloud SQL.
read article
Understanding JDBC Three-Tier Architecture: A Detailed Overview
read article
Spring Boot Security with JDBC Authentication
read article
Wednesday Links - Edition 2024-01-10
read article
Constant Lag in CDC Pipeline (JDBC Sink Connector)
read article
How to Connect Java Applications to Databases with JDBC
read article
Wednesday Links - Edition 2023-08-30
read article
How JDBC Paved the Way for Java Frameworks! 🛤️
read article
Connect to JDBC in java using MySQL
read article
JDBC program for Delete operation
read article
Spring JDBC 6 CRUD Operations
read article
Java JDBC CRUD Operations in Eclipse using MySql
read article
Tutorial - Develop IRIS using SSH
read article
Spark Update Optimizations
read article
Tips and tricks of the brand new LOAD DATA command
read article
Configure the SQuirreL SQL Client to use the SingleStore JDBC Driver
read article
Mapping with SCHEMA
currently reading
Built in multi model integration using InterSystems iris data platform
read article
Use JDBC to connect TiDB Cloud through TLS
read article
Connect your Java application with any SQL databases
read article
Java and MySQL
read article
Featured ones: