[英]DB or flat file?
Just one little question. 只是一个小问题。 Shall i put the HTML textarea content into a DB or a flat file?
我应该将HTML textarea内容放入DB或平面文件中吗? The textarea content can be very long (like an article or a project).
textarea内容可能很长(如文章或项目)。
Thanks for helping. 谢谢你的帮助。 Silvio.
西尔维奥。
Use text type instead of string, varchar type in db. 在db中使用文本类型而不是字符串,varchar类型。
Note :-Text fields in mysql are limited to 65kb 注意 :mysql中的文本字段限制为65kb
EDIT 编辑
OR You should look at using MySQL's LONGBLOB or LONGTEXT data type. 或者你应该看看使用MySQL的LONGBLOB或LONGTEXT数据类型。 They can store up to 4 gigabytes of binary or textual data, respectively.
它们可以分别存储多达4千兆字节的二进制或文本数据。
Database without a doubt. 数据库毫无疑问。
There's not much point in flat files because when you start expanding which you will do then you have to create more files and it's easier to lose track. 平面文件没有多大意义,因为当你开始扩展时,你必须创建更多的文件,并且更容易失去跟踪。
Start with a database and when you grow you can do things much faster and more complex selections by using structured query language
the name says it all. 从数据库开始,随着您的成长,您可以通过使用
structured query language
来更快,更复杂地进行选择。
Here are some pros and cons off the top of my head (I've done it both ways with varying levels of success): 这里有一些优点和缺点(我已经两种方式完成了不同程度的成功):
Database Pros 数据库优点
Database Cons 数据库缺点
Flat File Pros 平面文件优点
Flat File Cons 平面文件缺点
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.