added foreign keys and load commands