public Merchant(int reg_num) {
                    
       SQLiteJDBC db = new SQLiteJDBC();

       String sql = String.format("SELECT * FROM merchants WHERE reg_num ='%d'", reg_num);
       ResultSet resultSet = db.query(sql);
       try {
            if(resultSet.next()) {
                this.reg_num = resultSet.getInt("reg_num");
                this.branch_num = resultSet.getInt("branch_num");
                this.email = resultSet.getString("email");
                this.merchant_name = resultSet.getString("merchant_name");
                this.phone = resultSet.getString("phone_number");
                this.address = resultSet.getString("address");
            }
            db.close();
        }catch(Exception e) {
            System.err.println( e.getClass().getName() + ": " + e.getMessage() );
            System.exit(0);
        }
    }