Elgg has a simple, but flexible data model. It supports entities, relationships, and extenders:
- Entities are roughly nouns. A user, group, or blog post are all examples of entities.
- Relationships connect two entities. Two users are friends. A user is a member of a group. A user is notified when another user posts a comment.
- Extenders describe entities. There are two types of extenders: metadata and annotations. A photo has 10 views. A file has been downloaded 300 times. A user's location is Brazil. These are examples of data that is stored as metadata or annotations on an entity.
ElggEntity is the parent class of all entities. It is an abstract class and is extended by four classes: