What's the correct way to store my own data in the database?

I want to store different roles into the elgg's database so i can retrieve it later from it, what's the best way to achieve this?

I think that i should create a new type of object called role (elgg_entity_subtypes), and then create entities of that subtype (elgg_entities and elgg_objects_entity) with the data for each role i want to store. For example:

create type for role in elgg_entity_subtypes

create entities for: admin, manager, developer, analist ... in elgg_entities and elgg_objects_entity

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking