[DB-SIG] Table Oriented Programming

Robert Brewer fumanchu at amor.org
Fri Jan 28 21:35:54 CET 2005


Brad Clements wrote:
> On 12 Feb 2004 at 13:10, Michael Hobbs wrote:
> 
> > Consider this example code:
> >   departments = DepartmentTable
> >   employees = EmployeeTable
> >   johnsDepartment = (departments * employees) / 
> >     (employees.dept == departments.dept) /
> >     (employees.name == 'John') %
> >     departments.name
> >   print johnsDepartment[0].name
> 
> Has  anyone tried expressing sql operations as relational 
> algebra statements in Python, 
> like the example above.
> 
> I see lots of talk in google, but no code.
> 
> Is this idea out of fashion already? I can see lots of 
> performance issues.. but it's still 
> interesting to me.

Why is it interesting to you? What benefits do you see over:

john = employees.findfirst(name='john')
print john.Department.name

Granted, the example was simple. Feel free to expand for more meaningful
discussion. I'm interested in why you're interested. ;)


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org


More information about the DB-SIG mailing list