Personal implementation of sql