Willems' fundamental lemma asserts that all trajectories of a linear time-invariant (LTI) system can be obtained from a finite number of measured ones, assuming controllability and a persistency of excitation condition hold. We show that these two conditions can be relaxed. First, we prove that the controllability condition can be replaced by a condition on the controllable subspace, unobservable subspace, and a certain subspace associated with the measured trajectories. Second, we prove that the persistency of excitation requirement can be reduced if the degree of certain minimal polynomial is known or tightly bounded. Our results shows that data-driven predictive control using online data is equivalent to model predictive control, even for uncontrollable systems. Moreover, our results significantly reduce the amount of data needed in identifying homogeneous multi-agent systems.