Logic and Databases: a Deductive Approach INTRODUCTION

Total Page:16

File Type:pdf, Size:1020Kb

Logic and Databases: a Deductive Approach INTRODUCTION Logic and Databases: A Deductive Approach HERVI~ GALLAIRE Compagnie G~n~rale d'I~lectricit~ Laboratoire de Marcoussis, Marcoussis, France JACK MINKER University of Maryland, Computer Science Department, College Park, Maryland JEAN-MARIE NICOLAS ONERA-CERT, D~partement d'In[ormatique, Toulouse, France The purpose of this paper is to show that logic provides a convenient formalism for studying classical database problems. There are two main parts to the paper, devoted respectively to conventional databases and deductive databases. In the first part, we focus on query languages, integrity modeling and maintenance, query optimization, and data dependencies. The second part deals mainly with the representation and manipulation of deduced facts and incomplete information. Categories and Subject Descriptors: H.2.1 [Database Management]: Logical Desigum data models; H.2.3 [Database Management]: Languages--query languages; H.2.4 [Database Management]: Systems--query processing General Terms: Deductive Databases, Indefinite Data, Logic and Databases, Null Values, Relational Databases INTRODUCTION Ullman 1982] or other formal theories such as mathematical logic as their framework. As emphasized by Codd [1982], theoretical The purpose of this paper is to provide an database studies form a fundamental basis overview and a survey of a subfield of logic for the development of homogeneous and as it is applied to databases. We are mostly sound database management systems concerned with the application of logic to (DBMS), which offer sophisticated capa- databases, where logic may be used both as bilities for data handling. A comprehensive an inference system and as a representation study of the many problems that exist in language; we primarily consider relational databases requires a precise formalization type databases. Some important efforts in so that detailed analyses can be carried out the application of other aspects of logic and satisfactory solutions can be obtained. theory to databases (e.g., see Maier [1983], Most of the formal database studies that Ullman [1982], and the references provided are under way at present are concerned there) or those that deal with nonrelational with the relational data model introduced (i.e., hierarchical and network) databases by Codd [1970], and use either a specially {e.g., see Jacobs [1982] and Jacobs et al. developed database theory [Maier 1983; [1982]) are not covered here. The use of logic for knowledge represen- Current address of Herv~ Gallaire and Jean-Marie Nicolas: European Computer-Industry Research tation and manipulation is primarily due to Centre (ECRC), Arabellastrasse 17, D-8000 Miinchen the work of Green [1969]. His work was the 81, FRG. basis of various studies that led to so-called Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. © 1984 ACM 0360-0300/84/0600-0153 $00.75 Computing Surveys, Vol. 16, No. 2, June 1984 154 • H. Gallaire, J. Minker, and J.-M. Nicolas CONTENTS tional databases. Its use in query languages, integrity modeling and maintenance, query evaluation, and database schema analysis is described. In Section 2 we show how logic INTRODUCTION extends relational databases to permit de- 1.1 Relational Model duction and describe how logic provides a 1.2 Mathematical Logic sound basis for a proper treatment and 1.3 Databases Viewed through Logic understanding of null values and incom- 1. CONVENTIONAL DATABASES 1.1 Query Languages plete information. 1.2 Integrity Constraints In the remainder of this introduction, we 1.3 Query Optimization first describe the main concepts of the re- 1.4 Database Design lational data model. Following this, we 2. DEDUCTIVE DATABASES 2.1 Definition of Deductive specify what is meant by mathematical or Logic Databases logic, focusing on logic relevant to data- 2.2 Definite Deductive Databases (DDDBs) bases rather than logic in general. Finally, 2.3 Indefinite Deductive Databases (IDDDBs) we briefly introduce two ways in which 2.4 Logic Databases databases can be considered from the view- 3. CONCLUSION ACKNOWLEDGMENTS point of logic. REFERENCES v 1.1 Relational Model question-answering systems, which are To define a relational model we need concerned mainly with a highly deductive some concepts. A domain is a usually finite manipulation of a small set of facts, and set of values. The Cartesian product of thus require an inferential mechanism pro- domains D1 .... , Dn is denoted by D1 vided by logic. Similar techniques have × ... x Dn and is the set of all tuples been adapted to databases to handle large (Xl, ..., x,) such that for any i, i = 1 ..... sets of facts, negative information, open n (xl ~ D1). A relation is any subset of the queries, and other specific database topics. Cartesian product of one or more domains. These techniques have given rise to what A database {instance) is a finite set of finite is called deductive databases. However, the relations. By a finite relation we mean that use of logic to study databases is not re- the extension of the relation {i.e., the total- stricted to providing deductive capabilities ity of all tuples that can appear in a rela- in a DBMS; the pioneering work of Kuhns tion) is finite. The arity of a relation R C [1967, 1970] also uses logic for conventional D1 × ... × D, is n. One may envision a databases to characterize answers to quer- relation to be a table of values. Names are ies. generally associated with the columns of Aside from the introduction and conclu- these tables; these names are called attri- sion to this paper, there are two main sec- butes. Values of an attribute associated tions, which are devoted respectively to with column i of a relation are taken from conventional databases and deductive da- domain Di. A relation R with attributes A1, tabases. In this introduction we provide .... An defines a relation scheme denoted background material to familiarize the as R(A1, ..., An), whereas the specific re- reader with the terminology used through- lation R (i.e., the relation with specified out the paper, introducing the reader to tuples) is said to be an instance or extension concepts in relational databases, to the area of the relation scheme. of mathematical logic, and to the basic re- Not all instances of a relation scheme lationships between logic and databases. have meaningful interpretations; that is, Section 1 is an extended and revised ver- they do not correspond to valid sets of data sion of material that appeared in GaUaire according to the intended semantics of the [1981]. This material shows how logic pro- database. One therefore introduces a set of vides a formalism for databases, and how constraints, referred to as integrity con- this formalism has been applied to conven- straints, associated with a relation scheme Computing Surveys, Vol. 16, No. 2, June 1984 Logic and Databases: A Deductive Approach • 155 to ensure that the database meets the in- tors, -~ (not), & (and), V (or), --~ (implica- tended semantics. Integrity constraints tion), ~ (equivalence), and (4) quantifiers, may involve interrelationships between re- V (for all), 3 (there exists). Throughout the lations. paper we use lowercase letters from the To summarize, a database scheme con- start of the alphabet to represent constants sists of a collection of relation schemes (a, b, c .... ), those from the end of the together with a set of integrity constraints. alphabet to represent variables (u, v, w, x, A database instance, also called a database y, z), and letters such as (/, g, h, ...) to state, is a collection of relation instances, denote functions. one for each relation in the database A term is defined recursively to be a scheme. A database state is said to be valid constant or a variable, or if f is an n-ary if all relation instances that it contains function and tl, ..., tn are terms, then obey the integrity constraints. In this pa- f(h, ..., tn) is a term. There are no other per, values in database/relation instances terms. We usually assume that a term in are referred to as elements, constants, or the context of databases is function free; individuals, depending on the context. that is, it is either a constant or a variable. To manipulate data in a relational data- If P is an n-ary predicate symbol and tl, base, a language is introduced. One may .... tn are terms, then P(h, ..., tn) is an introduce an algebraic language based on atomic formula. An atomic formula or its algebraic operators, or a calculus language, negation is a literal. Well-formed formulas which we discuss in the following section. (wffs) are defined recursively as follows. An In an algebraic language we need only two atomic formula is a wff. If Wl and w2 are operators for our purposes: the project and wffs, then -n(wl), (Wl) V (w2), (Wl) & (w2), join operators. Given a relation R, and X a (wl) --~ (w2), and (Wl) ~ (We) are wffs. A set of attributes of R, then the projection of closed wff is one that does not contain any R on X is {s[X][s E R}, where siX] is a free variable (i.e., it contains only quanti- tuple constructed from s by keeping all and fied variables and constants). only those components that belong to at- In dealing with wffs it is sometimes con- tributes in X. Given two relations R and S, venient to place them in a normal form. A the natural join R * S is formed by com- wff is in prenex normal form if all quanti- puting the Cartesian product, R × S, se- tiers appear in front of the formula.
Recommended publications
  • Chapter 1 Logic and Set Theory
    Chapter 1 Logic and Set Theory To criticize mathematics for its abstraction is to miss the point entirely. Abstraction is what makes mathematics work. If you concentrate too closely on too limited an application of a mathematical idea, you rob the mathematician of his most important tools: analogy, generality, and simplicity. – Ian Stewart Does God play dice? The mathematics of chaos In mathematics, a proof is a demonstration that, assuming certain axioms, some statement is necessarily true. That is, a proof is a logical argument, not an empir- ical one. One must demonstrate that a proposition is true in all cases before it is considered a theorem of mathematics. An unproven proposition for which there is some sort of empirical evidence is known as a conjecture. Mathematical logic is the framework upon which rigorous proofs are built. It is the study of the principles and criteria of valid inference and demonstrations. Logicians have analyzed set theory in great details, formulating a collection of axioms that affords a broad enough and strong enough foundation to mathematical reasoning. The standard form of axiomatic set theory is denoted ZFC and it consists of the Zermelo-Fraenkel (ZF) axioms combined with the axiom of choice (C). Each of the axioms included in this theory expresses a property of sets that is widely accepted by mathematicians. It is unfortunately true that careless use of set theory can lead to contradictions. Avoiding such contradictions was one of the original motivations for the axiomatization of set theory. 1 2 CHAPTER 1. LOGIC AND SET THEORY A rigorous analysis of set theory belongs to the foundations of mathematics and mathematical logic.
    [Show full text]
  • A Conceptual Framework for Investigating Organizational Control and Resistance in Crowd-Based Platforms
    Proceedings of the 50th Hawaii International Conference on System Sciences | 2017 A Conceptual Framework for Investigating Organizational Control and Resistance in Crowd-Based Platforms David A. Askay California Polytechnic State University [email protected] Abstract Crowd-based platforms coordinate action through This paper presents a research agenda for crowd decomposing tasks and encouraging individuals to behavior research by drawing from the participate by providing intrinsic (e.g., fun, organizational control literature. It addresses the enjoyment) and/or extrinsic (e.g., status, money, need for research into the organizational and social social interaction, etc.) motivators [3]. Three recent structures that guide user behavior and contributions Information Systems (IS) reviews of crowdsourcing in crowd-based platforms. Crowd behavior is research [6, 4, 7] emphasize the importance of situated within a conceptual framework of designing effective incentive systems. However, organizational control. This framework helps research on motivation is somewhat disparate, with scholars more fully articulate the full range of various categorizations and often inconsistent control mechanisms operating in crowd-based findings as to which incentives are the most effective platforms, contextualizes these mechanisms into the [4]. Moreover, this approach can be limited by its context of crowd-based platforms, challenges existing often deterministic and rational assumptions of user rational assumptions about incentive systems, and behavior and motivation, which overlooks normative clarifies theoretical constructs of organizational and social aspects of human behavior [8]. To more control to foster stronger integration between fully understand the dynamics of crowd behavior and information systems research and organizational and governance of crowd-based projects, IS researchers management science.
    [Show full text]
  • John P. Burgess Department of Philosophy Princeton University Princeton, NJ 08544-1006, USA [email protected]
    John P. Burgess Department of Philosophy Princeton University Princeton, NJ 08544-1006, USA [email protected] LOGIC & PHILOSOPHICAL METHODOLOGY Introduction For present purposes “logic” will be understood to mean the subject whose development is described in Kneale & Kneale [1961] and of which a concise history is given in Scholz [1961]. As the terminological discussion at the beginning of the latter reference makes clear, this subject has at different times been known by different names, “analytics” and “organon” and “dialectic”, while inversely the name “logic” has at different times been applied much more broadly and loosely than it will be here. At certain times and in certain places — perhaps especially in Germany from the days of Kant through the days of Hegel — the label has come to be used so very broadly and loosely as to threaten to take in nearly the whole of metaphysics and epistemology. Logic in our sense has often been distinguished from “logic” in other, sometimes unmanageably broad and loose, senses by adding the adjectives “formal” or “deductive”. The scope of the art and science of logic, once one gets beyond elementary logic of the kind covered in introductory textbooks, is indicated by two other standard references, the Handbooks of mathematical and philosophical logic, Barwise [1977] and Gabbay & Guenthner [1983-89], though the latter includes also parts that are identified as applications of logic rather than logic proper. The term “philosophical logic” as currently used, for instance, in the Journal of Philosophical Logic, is a near-synonym for “nonclassical logic”. There is an older use of the term as a near-synonym for “philosophy of language”.
    [Show full text]
  • The Holy Spirit and the Physical Uníverse: the Impact of Scjentific Paradigm Shifts on Contemporary Pneumatology
    Theological Studies 70 (2009) . THE HOLY SPIRIT AND THE PHYSICAL UNÍVERSE: THE IMPACT OF SCJENTIFIC PARADIGM SHIFTS ON CONTEMPORARY PNEUMATOLOGY WOLFGANG VONDEY A methodological shift occurred in the sciences in the 20th century that has irreversible repercussions for a contemporary theology of the Holy Spirit. Newton and Einstein followed fundamentally different trajectories that provide radically dissimilar frame- works for the pneumatological endeavor. Pneumatology after Einstein is located in a different cosmological framework constituted by the notions of order, rationality, relationality, symmetry, and movement. These notions provide the immediate challenges to a contemporary understanding of the Spirit in the physical universe. HPHE PARADIGM SHIFT IN SCIENCE from Ptolemaic to Copernican cosmo- Â logy is clearly reflected in post-Enlightenment theology. The wide- ranging implications of placing the sun instead of the earth at the center of the universe marked the beginnings of both the scientific and religious revolutions of the 16th century. A century later, Isaac Newton provided for the first time a comprehensive system of physical causality that heralded space and time as the absolute constituents of experiential reality from the perspective of both natural philosophy and theology.^ Despite the echoes WOLFGANG VONDEY received his Ph.D. in systematic theology and ethics at Marquette University and is currently associate professor of systematic theology in the School of Divinity, Regent University, Virginia. A prolific writer on Pneu- matology, ecclesiology, and the dialogue of science and theology, he has most recently published: People of Bread: Rediscovering Ecclesiology (2008); "Pentecos- tal Perspectives on The Nature and Mission of the Church" in "The Nature and Mission of the Church": Ecclesial Reality and Ecumenical Horizons for the Twenty- First Century, ed.
    [Show full text]
  • The Relative Use of Formal and Informal Information in The
    THE RELATIVE USE OF FORMAL AND INFORMAL INFORMATION IN THE EVALUATION OF INDIVIDUAL PERFORMANCE by GENE H. JOHNSON, B.B.A., M.S. in Acct. A DISSERTATION IN BUSINESS ADMINISTRATION Submitted to the Graduate Faculty of Texas Tech University in Partial Fulfillment of the Requirements for the Degree of DOCTOR OF PHILOSOPHY December, 1986 • //^,;¥ (c) 1986 Gene H. Johnson ACKNOWLEDGMENTS Funding for this research project was provided by the National Association of Accountants, and was especially beneficial in that it allowed the author to complete the project in a timely manner. Subjects for the project were provided by the research entity which must, for the sake of anonymity, remain unnamed. Nonetheless, their partici­ pation is greatly appreciated. Early conceptual development of the project was facilitated by a number of individuals, including the doctoral students and Professors Don Clancy and Frank Collins of Texas Tech University. Also helpful were the experiences of Louis Johnson, John Johnson, Sam Nichols, Darrell Adams, and Del Shumate. The members of the committee provided valuable guidance and support throughout the project; and although not a member of the committee. Professor Roy Howell provided valuable assistance with data analysis. Finally, Professor Donald K. Clancy served not only as committee chairman but also as a role model/mentor for the author. His participation made the project interesting, educational, and enjoyable. 11 CONTENTS ACKNOWLEDGMENTS ii ABSTRACT vi LIST OF TABLES viii LIST OF FIGURES ix I. INTRODUCTION AND BACKGROUND 1 Formal and Informal Information 2 Performance Evaluation 4 Purpose, Objectives, and Significance . 6 Organization 7 II. PREVIOUS STUDIES OF INFORMATION FOR PERFORMANCE EVALUATION 8 Goals and Goal-Directed Behavior 9 Early Studies on Performance Measures .
    [Show full text]
  • GRAPH DATABASE THEORY Comparing Graph and Relational Data Models
    GRAPH DATABASE THEORY Comparing Graph and Relational Data Models Sridhar Ramachandran LambdaZen © 2015 Contents Introduction .................................................................................................................................................. 3 Relational Data Model .............................................................................................................................. 3 Graph databases ....................................................................................................................................... 3 Graph Schemas ............................................................................................................................................. 4 Selecting vertex labels .............................................................................................................................. 4 Examples of label selection ....................................................................................................................... 4 Drawing a graph schema ........................................................................................................................... 6 Summary ................................................................................................................................................... 7 Converting ER models to graph schemas...................................................................................................... 9 ER models and diagrams ..........................................................................................................................
    [Show full text]
  • E.W. Dijkstra Archive: on the Cruelty of Really Teaching Computing Science
    On the cruelty of really teaching computing science Edsger W. Dijkstra. (EWD1036) http://www.cs.utexas.edu/users/EWD/ewd10xx/EWD1036.PDF The second part of this talk pursues some of the scientific and educational consequences of the assumption that computers represent a radical novelty. In order to give this assumption clear contents, we have to be much more precise as to what we mean in this context by the adjective "radical". We shall do so in the first part of this talk, in which we shall furthermore supply evidence in support of our assumption. The usual way in which we plan today for tomorrow is in yesterday’s vocabulary. We do so, because we try to get away with the concepts we are familiar with and that have acquired their meanings in our past experience. Of course, the words and the concepts don’t quite fit because our future differs from our past, but then we stretch them a little bit. Linguists are quite familiar with the phenomenon that the meanings of words evolve over time, but also know that this is a slow and gradual process. It is the most common way of trying to cope with novelty: by means of metaphors and analogies we try to link the new to the old, the novel to the familiar. Under sufficiently slow and gradual change, it works reasonably well; in the case of a sharp discontinuity, however, the method breaks down: though we may glorify it with the name "common sense", our past experience is no longer relevant, the analogies become too shallow, and the metaphors become more misleading than illuminating.
    [Show full text]
  • Juhani Pallasmaa, Architect, Professor Emeritus
    1 CROSSING WORLDS: MATHEMATICAL LOGIC, PHILOSOPHY, ART Honouring Juliette Kennedy University oF Helsinki, Small Hall Friday, 3 June, 2016-05-28 Juhani Pallasmaa, Architect, ProFessor Emeritus Draft 28 May 2016 THE SIXTH SENSE - diffuse perception, mood and embodied Wisdom ”Whether people are fully conscious oF this or not, they actually derive countenance and sustenance From the atmosphere oF things they live in and with”.1 Frank Lloyd Wright . --- Why do certain spaces and places make us Feel a strong aFFinity and emotional identification, while others leave us cold, or even frighten us? Why do we feel as insiders and participants in some spaces, Whereas others make us experience alienation and ”existential outsideness”, to use a notion of Edward Relph ?2 Isn’t it because the settings of the first type embrace and stimulate us, make us willingly surrender ourselves to them, and feel protected and sensually nourished? These spaces, places and environments strengthen our sense of reality and selF, whereas disturbing and alienating settings weaken our sense oF identity and reality. Resonance with the cosmos and a distinct harmonious tuning were essential qualities oF architecture since the Antiquity until the instrumentalized and aestheticized construction of the industrial era. Historically, the Fundamental task oF architecture Was to create a harmonic resonance betWeen the microcosm oF the human realm and the macrocosm oF the Universe. This harmony Was sought through proportionality based on small natural numbers FolloWing Pythagorean harmonics, on Which the harmony oF the Universe Was understood to be based. The Renaissance era also introduced the competing proportional ideal of the Golden Section.
    [Show full text]
  • Mathematical Logic
    Copyright c 1998–2005 by Stephen G. Simpson Mathematical Logic Stephen G. Simpson December 15, 2005 Department of Mathematics The Pennsylvania State University University Park, State College PA 16802 http://www.math.psu.edu/simpson/ This is a set of lecture notes for introductory courses in mathematical logic offered at the Pennsylvania State University. Contents Contents 1 1 Propositional Calculus 3 1.1 Formulas ............................... 3 1.2 Assignments and Satisfiability . 6 1.3 LogicalEquivalence. 10 1.4 TheTableauMethod......................... 12 1.5 TheCompletenessTheorem . 18 1.6 TreesandK¨onig’sLemma . 20 1.7 TheCompactnessTheorem . 21 1.8 CombinatorialApplications . 22 2 Predicate Calculus 24 2.1 FormulasandSentences . 24 2.2 StructuresandSatisfiability . 26 2.3 TheTableauMethod......................... 31 2.4 LogicalEquivalence. 37 2.5 TheCompletenessTheorem . 40 2.6 TheCompactnessTheorem . 46 2.7 SatisfiabilityinaDomain . 47 3 Proof Systems for Predicate Calculus 50 3.1 IntroductiontoProofSystems. 50 3.2 TheCompanionTheorem . 51 3.3 Hilbert-StyleProofSystems . 56 3.4 Gentzen-StyleProofSystems . 61 3.5 TheInterpolationTheorem . 66 4 Extensions of Predicate Calculus 71 4.1 PredicateCalculuswithIdentity . 71 4.2 TheSpectrumProblem . .. .. .. .. .. .. .. .. .. 75 4.3 PredicateCalculusWithOperations . 78 4.4 Predicate Calculus with Identity and Operations . ... 82 4.5 Many-SortedPredicateCalculus . 84 1 5 Theories, Models, Definability 87 5.1 TheoriesandModels ......................... 87 5.2 MathematicalTheories. 89 5.3 DefinabilityoveraModel . 97 5.4 DefinitionalExtensionsofTheories . 100 5.5 FoundationalTheories . 103 5.6 AxiomaticSetTheory . 106 5.7 Interpretability . 111 5.8 Beth’sDefinabilityTheorem. 112 6 Arithmetization of Predicate Calculus 114 6.1 Primitive Recursive Arithmetic . 114 6.2 Interpretability of PRA in Z1 ....................114 6.3 G¨odelNumbers ............................ 114 6.4 UndefinabilityofTruth. 117 6.5 TheProvabilityPredicate .
    [Show full text]
  • Mathematical Logic and Foundations of Mathematics
    Mathematical Logic and Foundations of Mathematics Stephen G. Simpson Pennsylvania State University Open House / Graduate Conference April 2–3, 2010 1 Foundations of mathematics (f.o.m.) is the study of the most basic concepts and logical structure of mathematics as a whole. Among the most basic mathematical concepts are: number, shape, set, function, algorithm, mathematical proof, mathematical definition, mathematical axiom, mathematical theorem. Some typical questions in f.o.m. are: 1. What is a number? 2. What is a shape? . 6. What is a mathematical proof? . 10. What are the appropriate axioms for mathematics? Mathematical logic gives some mathematically rigorous answers to some of these questions. 2 The concepts of “mathematical theorem” and “mathematical proof” are greatly clarified by the predicate calculus. Actually, the predicate calculus applies to non-mathematical subjects as well. Let Lxy be a 2-place predicate meaning “x loves y”. We can express properties of loving as sentences of the predicate calculus. ∀x ∃y Lxy ∃x ∀y Lyx ∀x (Lxx ⇒¬∃y Lyx) ∀x ∀y ∀z (((¬ Lyx) ∧ (¬ Lzy)) ⇒ Lzx) ∀x ((∃y Lxy) ⇒ Lxx) 3 There is a deterministic algorithm (the Tableau Method) which shows us (after a finite number of steps) that particular sentences are logically valid. For instance, the tableau ∃x (Sx ∧∀y (Eyx ⇔ (Sy ∧ ¬ Eyy))) Sa ∧∀y (Eya ⇔ Sy ∧ ¬ Eyy) Sa ∀y (Eya ⇔ Sy ∧ ¬ Eyy) Eaa ⇔ (Sa ∧ ¬ Eaa) / \ Eaa ¬ Eaa Sa ∧ ¬ Eaa ¬ (Sa ∧ ¬ Eaa) Sa / \ ¬ Sa ¬ ¬ Eaa ¬ Eaa Eaa tells us that the sentence ¬∃x (Sx ∧∀y (Eyx ⇔ (Sy ∧ ¬ Eyy))) is logically valid. This is the Russell Paradox. 4 Two significant results in mathematical logic: (G¨odel, Tarski, .
    [Show full text]
  • A Mathematical Theory of Computation?
    A Mathematical Theory of Computation? Simone Martini Dipartimento di Informatica { Scienza e Ingegneria Alma mater studiorum • Universit`adi Bologna and INRIA FoCUS { Sophia / Bologna Lille, February 1, 2017 1 / 57 Reflect and trace the interaction of mathematical logic and programming (languages), identifying some of the driving forces of this process. Previous episodes: Types HaPOC 2015, Pisa: from 1955 to 1970 (circa) Cie 2016, Paris: from 1965 to 1975 (circa) 2 / 57 Why types? Modern programming languages: control flow specification: small fraction abstraction mechanisms to model application domains. • Types are a crucial building block of these abstractions • And they are a mathematical logic concept, aren't they? 3 / 57 Why types? Modern programming languages: control flow specification: small fraction abstraction mechanisms to model application domains. • Types are a crucial building block of these abstractions • And they are a mathematical logic concept, aren't they? 4 / 57 We today conflate: Types as an implementation (representation) issue Types as an abstraction mechanism Types as a classification mechanism (from mathematical logic) 5 / 57 The quest for a \Mathematical Theory of Computation" How does mathematical logic fit into this theory? And for what purposes? 6 / 57 The quest for a \Mathematical Theory of Computation" How does mathematical logic fit into this theory? And for what purposes? 7 / 57 Prehistory 1947 8 / 57 Goldstine and von Neumann [. ] coding [. ] has to be viewed as a logical problem and one that represents a new branch of formal logics. Hermann Goldstine and John von Neumann Planning and Coding of problems for an Electronic Computing Instrument Report on the mathematical and logical aspects of an electronic computing instrument, Part II, Volume 1-3, April 1947.
    [Show full text]
  • Data Definition Language (Ddl)
    DATA DEFINITION LANGUAGE (DDL) CREATE CREATE SCHEMA AUTHORISATION Authentication: process the DBMS uses to verify that only registered users access the database - If using an enterprise RDBMS, you must be authenticated by the RDBMS - To be authenticated, you must log on to the RDBMS using an ID and password created by the database administrator - Every user ID is associated with a database schema Schema: a logical group of database objects that are related to each other - A schema belongs to a single user or application - A single database can hold multiple schemas that belong to different users or applications - Enforce a level of security by allowing each user to only see the tables that belong to them Syntax: CREATE SCHEMA AUTHORIZATION {creator}; - Command must be issued by the user who owns the schema o Eg. If you log on as JONES, you can only use CREATE SCHEMA AUTHORIZATION JONES; CREATE TABLE Syntax: CREATE TABLE table_name ( column1 data type [constraint], column2 data type [constraint], PRIMARY KEY(column1, column2), FOREIGN KEY(column2) REFERENCES table_name2; ); CREATE TABLE AS You can create a new table based on selected columns and rows of an existing table. The new table will copy the attribute names, data characteristics and rows of the original table. Example of creating a new table from components of another table: CREATE TABLE project AS SELECT emp_proj_code AS proj_code emp_proj_name AS proj_name emp_proj_desc AS proj_description emp_proj_date AS proj_start_date emp_proj_man AS proj_manager FROM employee; 3 CONSTRAINTS There are 2 types of constraints: - Column constraint – created with the column definition o Applies to a single column o Syntactically clearer and more meaningful o Can be expressed as a table constraint - Table constraint – created when you use the CONTRAINT keyword o Can apply to multiple columns in a table o Can be given a meaningful name and therefore modified by referencing its name o Cannot be expressed as a column constraint NOT NULL This constraint can only be a column constraint and cannot be named.
    [Show full text]