Changeset View
Changeset View
Standalone View
Standalone View
src/docs/contributor/database.diviner
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | |||||
significant issues with data inconsistency that foreign keys could help prevent. | significant issues with data inconsistency that foreign keys could help prevent. | ||||
Empirically, we have witnessed first hand as `ON DELETE CASCADE` relationships | Empirically, we have witnessed first hand as `ON DELETE CASCADE` relationships | ||||
accidentally destroy huge amounts of data. We may pursue foreign keys | accidentally destroy huge amounts of data. We may pursue foreign keys | ||||
eventually, but there isn't a strong case for them at the present time. | eventually, but there isn't a strong case for them at the present time. | ||||
PHIDs | PHIDs | ||||
===== | ===== | ||||
Each globally referencable object in Phorge has an associated PHID | Each globally referenceable object in Phorge has an associated PHID | ||||
("Phorge ID") which serves as a global identifier, similar to a GUID. | ("Phorge ID") which serves as a global identifier, similar to a GUID. | ||||
We use PHIDs for referencing data in different databases. | We use PHIDs for referencing data in different databases. | ||||
We use both auto-incrementing IDs and global PHIDs because each is useful in | We use both auto-incrementing IDs and global PHIDs because each is useful in | ||||
different contexts. Auto-incrementing IDs are meaningfully ordered and allow | different contexts. Auto-incrementing IDs are meaningfully ordered and allow | ||||
us to construct short, human-readable object names (like `D2258`) and URIs. | us to construct short, human-readable object names (like `D2258`) and URIs. | ||||
Global PHIDs allow us to represent relationships between different types of | Global PHIDs allow us to represent relationships between different types of | ||||
objects in a homogeneous way. | objects in a homogeneous way. | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0