database final structure