You know, there are many types of data stored in the database. If you want to take out typed data, the environment may not support it, so the communication between PHP and mysql is a string.
This is not a defect of words, nor is it a defect. That's the only way. Otherwise, you set an enumeration type in the database and let PHP get it. What happened to PHP?
In short, the data from the database can only be of string type. You can take it out and transform it.
In my opinion, from the perspective of database foreign key system, various database foreign keys and types are only restrictions on the data in the database, a kind of restriction similar to regular expressions.
Settings belonging to the database and the privacy of the database will not be made public.