  Gravitational anomalies can be realized on the boundary of topologically
ordered states in one higher dimension and are described by topological orders
in one higher dimension. In this paper, we try to develop a general theory for
both topological order and gravitational anomaly in any dimensions. (1) We
introduce the notion of BF category to describe the braiding and fusion
properties of topological excitations that can be point-like, string-like, etc.
A subset of BF categories -- closed BF categories -- classify topological
orders in any dimensions, while generic BF categories classify (potentially)
anomalous topological orders that can appear at a boundary of a gapped quantum
liquid in one higher dimension. (2) We introduce topological path integral
based on tensor network to realize those topological orders. (3) Bosonic
topological orders have an important topological invariant: the vector bundles
of the degenerate ground states over the moduli spaces of closed spaces with
different metrics. They may fully characterize topological orders. (4) We
conjecture that a topological order has a gappable boundary iff the above
mentioned vector bundles are flat. (5) We find a holographic phenomenon that
every topological order with a gappable boundary can be uniquely determined by
the knowledge of the boundary. As a consequence, BF categories in different
dimensions form a (monoid) cochain complex, that reveals the structure and
relation of topological orders and gravitational anomalies in different
dimensions. We also studied the simplest kind of bosonic topological orders
that have no non-trivial topological excitations. We find that this kind of
topological orders form a $\mathbb{Z}$ class in 2+1D (with gapless edge), a
$\mathbb{Z}_2$ class in 4+1D (with gappable boundary), and a $\mathbb{Z}\oplus
\mathbb{Z}$ class in 6+1D (with gapless boundary).
