database creation and simple mechanics