database moved to lib
id renamed to id_ to avoid name conflict with id()