@Override
	public Item findItem(String id) { // items are stored under "copy" in the
										// database. parameter id is the
										// Book/Periodical ID, not ITEM id
		Statement stmt = null;
		try {
			stmt = con.createStatement();

			if (id.length() == 9) { // item is a book
				ResultSet results = stmt
						.executeQuery("select * from Book where ISBN = " + id);
				results.absolute(1);
				String iSBN = id;
				String title = results.getString("Title");
				String author = results.getString("Author");
				String publisher = results.getString("Publisher");

				Calendar date = Calendar.getInstance();
				Date tableDate = results.getDate("Date");
				date.setTime(tableDate);

				return factory.createBook(iSBN, title, publisher, date, author);
			} else if (id.length() == 8) {
				ResultSet results = stmt
						.executeQuery("select * from Periodical where ISSN = "
								+ id);
				results.absolute(1);
				String iSSN = id;
				String title = results.getString("Title");
				String volume = results.getString("Volume");
				String number = results.getString("Number");
				String publisher = results.getString("Publisher");

				Calendar date = Calendar.getInstance();
				Date tableDate = results.getDate("Date");
				date.setTime(tableDate);

				return factory.createPeriodical(iSSN, title, publisher, date,
						volume, Double.parseDouble(number));
			}

		} catch (SQLException e) {
			return null;
		} finally {
			if (stmt != null) {
				try {
					stmt.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
			}
		}
		return null;
	}