Database models
Hierarchial model
- Uses parent-child relationships
- Otherwise known as object and objects owned
- Often ends up creating a one way relationship that is much more complex to query in one direction than the other
- One database file contains pointers to another
- Each piece of data in the relationship contains a foreign key to another database file's parent key for a specific record
Downsides
- Very hard to query the child database for every instance of child records which share a parent
Multiple-child pointer system
- In the parent record, create a field with a list of child records' foreign keys
- Allows a single parent record to be used to query every child record
Downsides
- Does not allow for more than the array capacity to be added
- If an MCP field is set to 20, you cannot have 21 child pointers
Linked-list
- In order to reduce the chances of over flow, you can use a linked list
- Add a pointer to each child
- From the first child point to the next
- Continue adding a pointer to each child pointing towards the next
- Use a terminating value to indicate no more child links exist
Downsides
- Records cannot be deleted without breaking the chain
- You must search the entire chain until you find a specific child record
Network Model
- Allows many-to-many (M:N) relationships
- Each child record points back to multiple parents
Downsides
Relational Model
- Requires a vast amount of computing power compared to the databases of its day
- Relies on 2D tables to store data