Text this: Logic, algebra and databases