The adaptation of open-source database applications is common in the industry. Most open-source database applications are incomplete. During adaptation, users usually have to implement additional data maintenance. Hence, the completeness of an application is an important concern for the adaptation as a key factor to indicate how much additional effort is required before using a system. From our study of database applications with complete functionalities, we observe that data in a database has common patterns of lifecycles. Anomaly in data lifecycles provides a good indicator on the completeness of database applications. In this paper, we propose a novel approach to automatically extract the data lifecycles out of the source code of database applications through inter-procedural static program analysis. This representative information can benefit the adaptation of database applications specifically for selection, maintenance and extension. We have developed a tool to implement the proposed approach for PHP (Hypertext Preprocessor)-based database applications. Case studies have shown that the proposed approach is useful in assisting adaptation and detecting faults of open-source database applications.