public static Connection getInstance(String db) 
            throws ClassNotFoundException, SQLException {
        if (instance == null) {
            if (db.equals("mysql")) {
                // Stablish connection by database's constants
                Class.forName(DatabaseConstants.driver);
                instance = DriverManager.getConnection(
                    DatabaseConstants.URL,
                    DatabaseConstants.user,
                    DatabaseConstants.password
                );
            }
        }
        // any case return instance
        return instance;
    }