database pipeline, first version