Added simple build DB step and some partition set utils for inverting