Constructing and Validating Entity-Relationship Data Models in the PVS Specification Language : A case study using a text-book example

Data Modeling frameworks like the Entity-Relationship (ER) approach are usually specified using graphical and natural language representations. This limits the ability to formally express and verify the consistency of constraints on data models. The use of mathematical notation makes the specification precise, but also complex and tedious to write, and, in the absence of automated support for validation, error prone. We use the PVS specification language and its theorem proving environment to formally construct, reason with, and mechanically validate an example data model at various levels of abstraction. The methodology proposed here makes modeling resemble programming in a strongly typed language. Models are implemented as PVS theories consisting of type declarations, function definitions, axioms and theorems. Entities and relationships are expressed as types. Constraints on the data model are expressed as axioms relating entity and relationship sets. Additional correctness conditions are generated by PVS’s type checker. Using the theory interpretation mechanism of PVS, we prove the correctness of the example’s logical model with respect to its ER model. The example model we consider has about fifteen attributes, entities and relationships, and twelve constraints. The complete hand-coded specification of the model is about 600 lines of PVS (including libraries). Verification of the correctness of the model reduces to interactively proving about thirty correctness conditions. The proofs of almost all of these are quite small (4 steps or less). With modest additional effort, it should be possible to automatically generate the specification and proofs, paving the way for automatic verification of data models. We see our work as the initial step towards this goal.

[1]  Laurian M. Chirica,et al.  The entity-relationship model: toward a unified view of data , 1975, SIGF.

[2]  David Chenho Kung,et al.  Conceptual Modeling in the Context of Development , 1989, IEEE Transactions on Software Engineering.

[3]  Keng Siau,et al.  A CASE tool for conceptual database design , 1992, Inf. Softw. Technol..

[4]  Keng Siau,et al.  The Effects of Conceptual and Logical Interfaces on Visual Query Performance of End Users , 1995, ICIS.

[5]  David Jordan,et al.  The Object Database Standard: ODMG 2.0 , 1997 .

[6]  Prabuddha De,et al.  An empirical investigation of factors influencing object-oriented database querying , 2001, Inf. Technol. Manag..

[7]  Maurizio Lenzerini,et al.  Deductive Entity-Relationship Modeling , 1993, IEEE Trans. Knowl. Data Eng..

[8]  Owre Sam,et al.  Theory Interpretations in PVS , 2001 .

[9]  Anneke Kleppe,et al.  The object constraint language: precise modeling with UML , 1998 .

[10]  Bernhard Thalheim,et al.  Entity-relationship modeling - foundations of database technology , 2010 .

[11]  David Toman,et al.  Logics for Databases and Information Systems , 1998 .

[12]  Martin Gogolla,et al.  On Constraints and Queries in UML , 1997, UML Workshop.

[13]  E. F. Codd,et al.  A Relational Model for Large Shared Data Banks , 1970 .

[14]  Bernhard Rumpe,et al.  Towards a Formalization of the Unified Modeling Language , 1997, ECOOP.

[15]  Shamkant B. Navathe,et al.  Conceptual Database Design: An Entity-Relationship Approach , 1991 .

[16]  Natarajan Shankar,et al.  PVS: A Prototype Verification System , 1992, CADE.

[17]  Mark Minas Specifying Diagram Languages by Means of Hypergraph Grammars , 2002, Diagrammatic Representation and Reasoning.

[18]  Keng Siau,et al.  User-Database Interface: The Effect of Abstraction Levels on Query Performance , 1993, MIS Q..

[19]  Dieter Fensel,et al.  Formal specification languages in knowledge and software engineering , 1995, The Knowledge Engineering Review.

[20]  Jennifer Widom,et al.  A First Course in Database Systems , 1997 .

[21]  Arthur H. M. ter Hofstede,et al.  How to formalize it?: Formalization principles for information system development methods , 1997, Inf. Softw. Technol..

[22]  Keng Siau,et al.  An empirical study on end-users' update performance for different abstraction levels , 1994, Int. J. Hum. Comput. Stud..

[23]  Gustaf Neumann,et al.  Reasoning About ER Models in a Deductive Environment , 1996, Data Knowl. Eng..

[24]  Gustaf Neumann,et al.  An EER Prototyping Environment and its Implemetation in a Datalog Language , 1992, ER.

[25]  Frank van Harmelen,et al.  Validation and Verification of Conceptual Models of Diagnosis , 1997, EUROVAV.

[26]  Martin Gogolla,et al.  Conceptual modelling of database applications using extended ER model , 1992, Data Knowl. Eng..

[27]  Serge Abiteboul,et al.  IFO: a formal semantic database model , 1987, TODS.