ALGRES: an advanced database system for complex applications