Relational database


#1

hi
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.


#2

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

Maybe the answer in https://stackoverflow.com/questions/45829957/what-is-a-realm/45834698#45834698 can help you modelling your data.


#3

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

class Category extends RealmObject {
    RealmList<Category> subcategories;
}