I have come across the word 'period' in several contexts and I wonder if these notions are related.
(1) The period map and domain: Let $ \pi : X \rightarrow B $ be a proper holomorphic submersion of complex manifolds. If a fiber $ X_0 $ of $ \pi $ is (compact) Kahler, then the cohomology groups $ H^k(X_0, \mathbb{Z}) $ (modulo torsion) are Hodge structures of weight $ k $. Now if we consider a small enough neighborhood $ U $ of $ 0 \in B $, then all fibers of U are Kahler, the Hodge numbers $ h^{p,q} $ are constant, and there is a fixed isomorphism (#) $ H^k(X_b, \mathbb{C}) \cong H^k(X_0, \mathbb{C}) $ from Ehresmann's theorem. So the numbers $ a_p = \text{dim} F^pH^k(X_b, \mathbb{C}) $ are also constant. The period map then sends $ b \in U $ to the (image under (#) of the) flag $ \{F^pH^k(X_b, \mathbb{C})\}_p $ in the flag variety $ G(a_k , \ldots , a_1, H^k(X_0, \mathbb{C})) $. The period domain is the subset of the flag variety whose flags satisfy $ F^pH^k(X_0, \mathbb{C}) \oplus \overline{F^{k+1-p}H^k(X_0, \mathbb{C})} = H^k(X_0, \mathbb{C}) $.
(2) Period: A real number is a period if it is an integral $ \int_{p \ge 0} q(x_1, \ldots, x_n) dx $ where $ p $ is a polynomial with rational coefficients and $ q $ is a rational function with rational coefficients. We can allow $p,q $ to be algebraic functions, this is equivalent. So abelian integrals $ \int_0^r \frac{dx}{\sqrt {4x^3 - ax - b}} $ are periods ($ r,a,b \in \mathbb{Q} $).
(3) Period of a cohomology group: I came across this notion after reading Daniil Rudenko's question on this website. This one I do not understand at all.
So my question is: How are these notions related? Surely (2) and (3) are related as you're supposedly computing an integral in (3) as well. And I suspect (1) and (3) are related as well as you're dealing with some cohomology group.
I apologize if the question is a bit too general but I'd like to understand this.