FAQ Database Discussion Community


How to reference groups of records in relational databases

relational-database,normalization,referential-integrity
Suppose we have the following table structures: Humans | HumanID | FirstName | LastName | Gender | |---------+-----------+----------+--------| | 1 | Issac | Newton | M | | 2 | Marie | Curie | F | | 3 | Tim | Duncan | M | Animals | AmimalID | Species...

MySQL structural integrity versus simplicity?

php,mysql,foreign-keys,referential-integrity
My problem: On a PHP/MySQL application I have to distinguish the registered accounts from the simple visitors. Both of them can perform actions which are written into the database. Now I use a separate table for visitors and a separate table for registered accounts. My example solutions so far: Option...