Relational database


is it possible to create relational database for category and subcategories (for example category A has a child category B and category B has child category C and …) in the realm. i should have a database in the mobile which contain many articles and for example article 1 is for example in category B, i must have search filter for articles, for example when some one filter category B, and search something, all articles in category B and subcategory C and subcategories must search.
i really thanks if someone helping me in designing this database.


Realm is an object database so modelling is different compared to a relational database.

Maybe the answer in can help you modelling your data.


The question actually has nothing to do with relational databases, you just want something like

class Category extends RealmObject {
    RealmList<Category> subcategories;