Hi!
I'm a bit stuck. I am trying to put up a test system (prototype school project) and I try to use phpMyAdmin to setup a relational database.
I'm fairly new in database knowledge 😕, but as I've understood the indexing part in phpMyAdmin requires the same datatype in both tables to work in a relational way. If the PRIM KEY is an INT in tab 1, then the SEC.KEY must be an INT in tab 2?
Now, what if my primary key in my tab 1 is a combination of two attributes with different datatypes, i.e. VARCHAR and INT? How can I setup this in my second tables SECONDARY KEY, and still manage the relations updating automatically? What datatype to choose??
Also, what's the opinion on using surrogat keys instead of natural ones in phpMyAdmin, as I find them so much easier to deal with in a relational way?