数据库是什么?一文帮你搞懂数据库

嘿,谈论数据库?我给大家讲讲我踩过的坑。
Last year before Shanghai I was in Shanghai leading a small team to build an electronic system.我从一开始就选择了MySQL。
为什么? It's cheap, open source, and can be used at will.结果呢? As soon as the first order of the volume came up, it was immediately stuck. Think about it, if ten thousand rows are entered at the same time as Double Eleven, the database will be confused and cannot run at all.我们花了半年时间才弄清楚。
我们必须添加表和缓存以及单独的数据库。
What pains.
See this excel.当 Excel 交付时,我喜欢使用它。
1 . I was given hundreds of rows and made a VLOOKUP.非常有趣。
There was a lot of data after, ten thousand things, and he got stuck when he clicked. I had to manually set each filter, which forced me to learn databases quickly. The search speed of the database is not actually guaranteed.
Talk about security.我花了两年时间帮助客户构建一个系统。
他们的数据非常敏感,所以我建议使用Oracle,它有严格的许可证控制和良好的加密。
That customer just accepted the truth and claimed that MySQL was cheap.如此一来,数据就会被黑客窃取,损失惨重。
So don't skip security.关系数据库,例如MySQL和PostgreSQL,其优点在于它们具有清晰的结构。
使用SQL查询数据特别直观。
For example, our inventory management system uses MySQL, one row for each product and one field for attributes, and results can be obtained in seconds for any query. But if you want to build a social recommendation system with complex user connections, using MySQL is not enough.您必须使用像 Neo4 j 这样的图形数据库。
For non-relational databases, such as Redis and MongoDB, I used Redis for caching. It's really fast and can be done in a few milliseconds. When we were doing a flash sale, all the product information was stored in Redis. Users could scan and directly restore inventory, which was great! But if you want to create a complex relation, it is useless to use Redis because it does not have that function.
选择数据库确实取决于业务。
If you're like a banker and you can't go wrong with your finances, then use a relationship like ACID.如果你从事互联网工作,用户数量呈爆炸式增长,各种数据都有,那就用NoSQL,容易扩展。
不要随意弯曲,适合自己的才是最好的。

数据库是什么?

问题是:滥用文件来存储大量数据。

实用提醒:使用数据库来管理数据,避免低效、复杂的文件存储操作。