educative.io

General question. The conflict between OOD and Relational Database or NoSQL

Hi Design Gurus and anyone who reads this post.

A problem is messing me up all day. I’m trying to code out the wholeLibrary Management System in Python, and using OOP, everything goes well till I figure out that a practical Library MS must have a database rather than using the memory to collect all the objects.
However, seems neither of table-based SQL database and document-based NoSQL is appropriate. Like, we create objects and they are in memory, we store all information one item by one item to a table-based database, after closing the app, all memory objects are gone, no data relation exists. Then we restart the app, query and retrieve the data, get some data of interest, are we gonna use the data to recreate the object and continue to use or is there a better way?
Some say to use an object-oriented database, but I don’t think it’s the common method to program with.
Could you please explain some or find me some best practice code to read?
Or is the OOD only a concept that cannot be fully implemented in code? What’s it like in a real project.

Thank you very much.

Could anyone help me?

I think it’s system design scope. In this case it’s definitely relational database as no sql is generally used to save unstructured data. About the saving issue, there’s too much we can dive into. There’s cache, memcache and database.

I am facing the same issue. Not able to understand the end to end picture. Is there an example where we can clearly see how OOD that we use works end to end (with DB interactions)?