- Shopping Bag ( 0 items )
LogiQL is a new state-of-the-art programming language based on Datalog. It can be used to build applications that combine transactional, analytical, graph, probabilistic, and mathematical programming. LogiQL makes it possible to build hybrid applications that previously required multiple programming languages and databases. In this first book to cover LogiQL, the authors explain how to design, implement, and query deductive databases using this new programming language.
LogiQL’s declarative approach enables complex data structures and business rules to be simply specified and then automatically executed. It is especially suited to business applications requiring complex rules to be implemented efficiently, for example predictive analytics and supply chain optimization.
Suitable for both novices and experienced developers, the book is written in easy-to-understand language. It includes many examples and exercises throughout to illustrate the main concepts and consolidate understanding.
Preface
Acknowledgment
Key LogiQL Concepts
Quick Start
Authors
Basics
Databases, Predicates, and Facts
Declaring Entity Types and Refmodes
Entering Facts
Expressing Domain Relationships with Predicates
Constraining the Data
Declaring Functional Predicates
Declaring Derivation Rules
Querying a Workspace
Consolidation Exercise 1
Part 1: Country of Birth
Part 2: Birth and Death Dates
Part 3: Age at Death
Part 4: Reigns and Ancestry
Answers to Exercises
Intermediate Aspects
Inverse-Functional Predicates
N-ary Predicates
Inclusive-or and External Uniqueness Constraints
Subtyping and Subsetting
Subtypes
Subset Constraints
Recursive Rules and Ring Constraints
Recursion
Ring Constraints
Hard and Soft Constraints
The Count and Total Functions
Computing Counts
Dealing with Empty Predicates
Computing Totals and Averages
Consolidation Exercise 2
Part 1: Books
Part 2: Book Sales
Part 3: Personnel
Answers to Exercises
Diving Deeper
The max and min Functions
Argmin and Argmax
Summary of Aggregation Functions
Safety Conditions for Rules and Queries
Derivation Rule Semantics
Delta Rules and Pulse Predicates
Delta Modifiers
Delta Logic
Pulse Predicates
Transaction Processing
Transactions
Transaction Processing Example
Stage Suffixes
Summary
Additional Built-in Operators and Functions
Arithmetic
String Manipulation
Aggregate Functions for Ordering
Consolidation Exercise 3
Answers to Exercises
Advanced Aspects
Emulating Imperative Programming Constructs
Statements
Switch Statement
Iteration Statements
Further Constraints
Equality Constraints
Value Constraints
Frequency Constraints
Subset and Exclusion Constraints Involving Join Paths
Derived Entities and Constructors
N-ary Constructors
Program Organization
Legacy Code
Program Organization
Projects
Modules and Concrete Blocks
Namespaces Revisited
Separate Compilation and Libraries
Summary
Miscellaneous Topics
Materialized and Derived-Only Views
Hierarchical Syntax
File Predicates
Consolidation Exercise 4
Answers to Exercises
Glossary
Appendices
Running Your Programs
Running the LogiQL REPL
LogiQL Syntax
Built-In Operators and Predicates
Summary of Constraints
Programming Conventions
LogiQL and Predicate Logic
LogiQL and SQL
Testing Your Programs
Improving Your Program’s Performance
Overview
LogiQL is a new state-of-the-art programming language based on Datalog. It can be used to build applications that combine transactional, analytical, graph, probabilistic, and mathematical programming. LogiQL makes it possible to build hybrid applications that previously required multiple programming languages and databases. In this first book to cover LogiQL, the authors explain how to design, implement, and query deductive databases using this new programming language.
LogiQL’s...