public static void initializeDB(Library myLibrary){
        Statement statement;
        PreparedStatement pStatement;
        String query;

        try {
            Connection conn = getConnection();
            conn.setAutoCommit(false);
            query = "TRUNCATE TABLE item";
            statement = conn.createStatement();
            statement.execute(query);
            close(statement);

            query = "INSERT INTO item VALUES (?,?,?,?,?)";
            pStatement = conn.prepareStatement(query);

            for (int i = 0; i < myLibrary.getLibraryItems().size(); i++) {
                pStatement.setString(1, myLibrary.getLibraryItems().get(i).getReference());
                pStatement.setInt(2, myLibrary.getLibraryItems().get(i).getType().equals("Book") ? 1 : 0);
                pStatement.setString(3, myLibrary.getLibraryItems().get(i).getName());
                pStatement.setString(4, myLibrary.getLibraryItems().get(i).getCreator());
                pStatement.setInt(5, myLibrary.getLibraryItems().get(i).getInLibrary() ? 1 : 0);
                pStatement.addBatch();
            }

            pStatement.executeBatch();
            conn.commit();
            close(pStatement);


        } catch (SQLException e) {
            e.printStackTrace();
        } finally {

        }
    }