Adds main DB structure.