you can use sqlite and wrapper for it if you don’t like C API.
Wrapper: easySQLite.
You can use any database engine it only must be in C/C*+ cocos2dx gives you path where you can save your database.
So please don;t search about database for cocos2dx simply look for database libs in C/C*+
I suggest you to use SQLite because this is most popular and also in 1 file. Also cocos has it in extensions path?
Example usage:
set: CCUserDefault::sharedUserDefault()->setIntegerForKey("localGamesLost", 0);
get with default value if the key do not exist: CCUserDefault::sharedUserDefault()->getIntegerForKey("localGamesLost", 0);