Relational Python

In 1985, we wrote a small relational engine using Lattice C 2.0 on MS-DOS. It was a small team (about 4 of us) in Bangalore, India. We had no background on designing an SQL engine and the only source available to us was the "Introduction to Relational Database Systems" by C.J.Date. We took two decisions. One is to layer the database on top of an ISAM engine and another was to implement SQL as a set of relational algebraic operations (restrict, project, join). We later licensed the technology to The Santa Cruz Operations and sold it for a while as Integra SQL.

When I saw this article by James Tauber, on Relational Python, all those memories came flooding back to me.

The goal is not to try to implement a SQL database in pure Python.
Rather the goal is to extend Python's rich data structures like
dictionaries and sets with additional concepts from relational theory.

I think enriching Python with a set of relational operators is a great idea. There are several interesting possibilities with this approach. If these opeators are recursive and can work fast with in-memory data, they may help faster processing of XPath. This may result in more flexible architectures for buiding XSLT and XQuery and later SPARQL.

I have been thinking about relational Python like capability for a
project I am currently working on. This project requires you to build
an in-memory streaming database and provide continuous queries.
Currently we are playing with a prototype built on top of Telegraph CQ
and are looking at other alternative implementations. Using an approach
similar to Relational Python is definitely one possibility.

4 thoughts on “Relational Python

  1. Hi Dorai,

    I did not know you blog. I was searching for something and one of the results was ‘Dorai’s LearnLog’. Reasoning how many Dorai’s can there be I hit the link and here I am reading about the origins of the first DB product I worked on and AIML etc.

    I haven’t had the time to read your many other insightful articles, but I will do so in time.

    Thanks,
    Prasad

  2. Hi RP,
    Thanks. You know the appeal of relational operators to me. The first version of Integra SQL was built on Select, Project, Join as explicit calls since they had a cleaner API interface and was easy to optimize application.

    — Dorai

  3. Greg,
    Thanks. Will check it out. I was planning to update this topic in the near future. So this link would certainly help.

    Thanks for adding the comment and wish you a very Happy and Wonderful New Year.

    Dorai

Comments are closed.