刚接触c++不久,看了下,好像一般使用SQLite做为数据库,但是这个是轻量级的数据库。现在我的数据量可能很大,上千万什么的。sqlite应该就不适合了吧,考虑常见的mysql。现在有个疑问,我要用mysql做数据库,这样一来,我要开发类似QQ这类面向大众用户的软件,那是不是得需要每个安装软件的人安装mysql?所以就没法这样了呢?
---------------------
大部分回答估计都没理解我想表达的意思。我的意思是sqlite轻量型的数据库,可能无法满足我的需求。而Mysql一般用做服务端的,可能无法满足我的需求。
我刚刚查了一下,sqlite还是适用于大量数据场景的
http://www.sqlite.org/limits....
回头看到了这个问题,最后的解决方案是使用leveldb.能支撑上亿的数据量。http://baike.baidu.com/link?u...
天蓬老师2017-04-17 13:46:25
Databases like mysql are generally used to provide services. They only need to send a request from the client. At most, the client only needs to do some caching or software configuration.
ringa_lee2017-04-17 13:46:25
Like QQ, maintain a database yourself and then provide a RESTFul interface. All people who use the software can access your interface.
PHP中文网2017-04-17 13:46:25
If you have to store data locally, it would be better to use SQLite.
Of course, if possible, you can let the user update the server-side MySQL data to the local SQLite and then read the local database when the user is connected to the Internet.
天蓬老师2017-04-17 13:46:25
For local storage, use a file database such as SQLite. The interface is simple, and millions of simple data only takes up dozens of megabytes of space.