How does WordPress store data?

I have looked inside WordPress database.

Never do that unless you need to have an external utility to be able to read data from the DB. For wordpress development always use the proper API for what you need, there was a lot of time invested into making the APIs efficient and there is no need to reinvent the wheel.

In options case just use the options API to set and retrieve the option values. And let them handle how to best write the data to the DB.