the eCommerce database:
ecommerce-database/
is the only empty template that we offer.
you can use this as a starting point to add your own columns to if you like.
What do you mean by:
I always mess up "foreign keys"
in what way do you mess them up?
Theres not really a lot you can do to mess up a foreign key
Foreign keys are columns that create a relation to another table
for example users -> Users Groups
users:
userID - Primary Key
userUserGroupID - relates to usergroups.userGroupID used as foreign key
UserName
etc...
usergroups:
userGroupID - Primary Key
userGroupName
it's not necessary to set the users.userUserGroupID column as a foreign key in the database in order to use it as a foreign key, that is really used for data integrity. In other words, to make sure that you cant delete a usergroup from the database without delete the users first. But with something like a user group this is not really needed, because you may want to define the Supper Admin user level without actually having any supper admins set up yet