Added descriptors inserting code
Added database opening