public static void createCheckOutView() throws Exception{
		
		Connection connect = null;
		Statement statement = null;
		ResultSet resultSet = null;
		
		try{
		
			// First connect to the database
			connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/librarysystem?user=admin&password=123456");
			statement = connect.createStatement();
			
			// Create a view that only retains checkouts for which there are no corresponding returns
			statement.executeUpdate("CREATE VIEW NoReturnCheckOut AS "
					              + "SELECT c.isbn, c.start, c.end, c.cardNumber, c.idNumber FROM CheckOut c "
					              + "WHERE NOT EXISTS (SELECT r.isbn, r.start, r.end, r.cardNumber, r.checkoutId FROM Returns r "
					              + "WHERE c.isbn = r.isbn and c.start = r.start and c.end = r.end and c.cardNumber = r.cardNumber "
					              + "and c.idNumber = r.checkoutId)");
			
		} catch (Exception e) {
			System.out.println(e.getMessage());
			throw e;
		}
		
			finally
			{
				try {

					if(connect != null){
						connect.close();
					}
					
					if(statement != null){
						statement.close();
					}
					
					if(resultSet != null){
						resultSet.close();
					}
					
				} catch (Exception e) {	
					
				}
			}
		
	}