public LoyaltyProgram(int id){
       SQLiteJDBC db = new SQLiteJDBC();

       String sql = String.format("SELECT * FROM loyalty_programs WHERE id ='%d'", id);
       ResultSet resultSet = db.query(sql);
       try {
            if(resultSet.next()) {
                this.id = resultSet.getInt("id");
                this.merchant = new Merchant(resultSet.getInt("merchant"));
                this.program_name = resultSet.getString("program_name");
                this.start_date = (new SimpleDateFormat("yyy-MM-dd")).parse(resultSet.getString("start_date"));
                this.end_date = (new SimpleDateFormat("yyy-MM-dd")).parse(resultSet.getString("end_date"));
                this.program_type = resultSet.getString("program_type");
                this.description = resultSet.getString("description");
            }
            db.close();
        }catch(Exception e) {
            System.err.println( e.getClass().getName() + ": " + e.getMessage() );
            System.exit(0);
        }       
    }