@Override
	public boolean getIfBookIdStillExistOnAnyAuthorId(int bookId) throws StorageException {
		ResultSet rs = null;
	    Connection conn = null;
	    PreparedStatement pstmt = null;
	    boolean exists = true;
	    
	    try {
			conn = Database.getConnection();
			
			String query = "SELECT count(books_authors.books_id) as book_id_exists "
						 + "FROM books_authors "
						 + "WHERE books_authors.books_id = ?;";
			
			pstmt = conn.prepareStatement(query);
			
			pstmt.setInt(1, bookId);
			
			rs = pstmt.executeQuery();
			
			int countBookId = 0;
			
			// Display all the data in the table.
			while (rs.next()) {
				countBookId = rs.getInt("book_id_exists");
	        }
			
			if(countBookId == 1) {
				exists = false;
			}
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			throw new StorageException(e.getMessage());
		} catch (SQLException e) {
			e.printStackTrace();
			throw new StorageException(e.getMessage());
		} finally {
			try {
				if(rs != null) {
					rs.close();
				}
				if(pstmt != null) {
					pstmt.close();
				}
				if(conn != null) {
					conn.close();
				}
			} catch (SQLException e) {
				e.printStackTrace();
				throw new StorageException(e.getMessage());
			}
		}
	    
	    return exists;
	}