Logical Foundations of Conceptual Modelling for Relational and SQL Databases - An Introduction -
摘要
In this paper, we present a brief overview of the logical foundations of conceptual modelling for relational and SQL databases. Based on the definition of a database schema within a logical framework, we formally define the notion of lossless transformations – schema transformations that preserve the information capacity of the original schema. We introduce a rigorous catalogue of the most relevant lossless transformations to enable arbitrary database restructurings without any loss of information. We observe that a conceptual schema of a database is essentially a specific type of database schema: it is a lossless variant of the database schema in sixth normal form and adheres to the basic principles of foundational ontologies – specifically, it provides a clear identification of the “kinds” of entities. Thus, every database schema has a corresponding conceptual schema that is a special lossless variant of it. This perspective allows us to characterise database design – e.g., from Entity-Relationship models – as a sequence of lossless transformations from the conceptual schema to the operational database schema. Conversely, we provide a precise characterisation of the reverse engineering process, which reconstructs a conceptual schema from an operational database schema. In doing so, we enhance and refine traditional reverse engineering approaches found in the literature. Finally, we present our implementation of a tool – the SQL Transducer – which enables querying and updating a database from any of its lossless variants, such as its conceptual schema.