public ArrayList<BookType> getAllBookType() {
		ArrayList<BookType> ret = new ArrayList<BookType>();
		Connection conn = null;
		Statement st = null;
		ResultSet rs = null;
		try {
			conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/librarysystem?user=admin&password=123456");
			st=conn.createStatement();

			//Select the book type
			rs = st.executeQuery("SELECT * FROM BookType");
			while(rs.next()) {
				//Fill fields of the book type
				BookType bt = new BookType();
				bt.setTypeName(rs.getString("typeName"));
				bt.setMaxReservation(rs.getInt("maxReservation"));
				bt.setOverdueFee(rs.getInt("overdueFee"));
				
				ret.add(bt);
			}

		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
		finally
		{
			try {
				if(conn != null)
					conn.close();
				if(st != null)
					st.close();
				if(rs != null)
					rs.close();
			} catch (Exception e) {	}
		}
		
		return ret;
	}