I want to reference 2 of my columns in one table to a primary key from another table. Here is how it looks like in the db structure:
Users
uid (INT) name (VARCHAR)
1 John Doe
2 Jane Doe
SystemProcesses
uid (INT) name (VARCHAR)
1 Hitman
2 Cron
Logs
uid (INT) modelType (VARCHAR) modelUID (INT) Action
1 Users 2 Jane Doe did this
2 Users 1 John Doe did that
3 SystemProcesses 1 Hitman just killed John Doe
How do I reference modelType and modelUID in Logs table to those Users and SystemProcesses?
If it's not possible, what is the the alternative?