public void addCategory(Category c) {
		Connection conn = null;
		PreparedStatement ps = null;
		//Do nothing if category is not properly instantiated
		if(c == null)
			return;
		try {
			conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/librarysystem?user=admin&password=123456");

			//Insert attributes from category into table
			if(c.getIdNumber() != null) {
				ps = conn.prepareStatement("INSERT INTO Category(idNumber,name,superCategoryId) VALUES(?,?,?)");
				ps.setInt(1, c.getIdNumber());
				ps.setString(2, c.getName());
				ps.setObject(3, c.getSuperCategoryId());
			} else {
				ps = conn.prepareStatement("INSERT INTO Category(idNumber,name,superCategoryId) VALUES(?,?)");
				ps.setString(1, c.getName());
				ps.setInt(2, c.getSuperCategoryId());
			}

			ps.executeUpdate();
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
		finally
		{
			try {
				if(conn != null)
					conn.close();
				if(ps != null)
					ps.close();
			} catch (Exception e) {	}
		}
	}