Skip to content

Instantly share code, notes, and snippets.

public class Conexion {
private static Conexion instancia;
private Conexion() {}
public static Conexion getInstancia() {
if(instancia == null) {
instancia = new Conexcion();
}
return instancia;
public class ConexcionFabrica {
public IConexion getConexion(String motor) {
switch(motor) {
case "MYSQL": return new ConexionMySQL();
case "Oracle": return new ConexionOracle();
default: return null;
}
}
ALTER TABLE TABLE_NAME
ADD NEW_COLUMN INTEGER REFERENCES TABLE_REFERENCE(ID_PRIMARY_KEY);