@Override
	public boolean updateItem(Item item) {
		String itemID = item.getID();
		String title = item.getTitle();
		String publisher = item.getPublisher();
		Calendar date = item.getDate();
		Date sqlDate = new Date(date.getTimeInMillis());
		
		Statement stmt = null;
		
		try {
			stmt = con.createStatement();
			
			if (itemID.length() == 9) { // item is a book
				stmt.executeUpdate("Update Book set Title='" + title
					+ "',Publisher='" + publisher + "', Date='" + sqlDate
					+ "' where ISBN = " + item.getID());	
			} else if (itemID.length() == 8) { //item is a periodical
				stmt.executeUpdate("Update Periodical set Title='" + title
						+ "',Publisher='" + publisher + "', Date='" + sqlDate
						+ "' where ISSN = " + item.getID());	
			}
			return true;
		} catch (SQLException e) {
			e.printStackTrace();
			return false;
		} finally {
			if (stmt != null) {
				try {
					stmt.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
			}
		}
	}