Write initial db lib