Sure, you can store it in a relational database, but you have to map your data to some structure that it doesn't have. That's what we call a hack.
If you use an object database, you can store your data exactly as it is represented in memory. That is much cleaner, IMO.
(Relational databases are like programming languages. Just like you can use any programming language for any task, and you can hack any data you want into the relational model. But that's not always the best way. Sometimes a key/value store, or an object store, or a document store is a better model. Using a better model means you need to write less code, which means your app will have fewer bugs.)
If you use an object database, you can store your data exactly as it is represented in memory. That is much cleaner, IMO.
(Relational databases are like programming languages. Just like you can use any programming language for any task, and you can hack any data you want into the relational model. But that's not always the best way. Sometimes a key/value store, or an object store, or a document store is a better model. Using a better model means you need to write less code, which means your app will have fewer bugs.)