b******u 发帖数: 676 | 1 常看见书上说应该避免用Memo/OLE object field。
可是SQL Server里Varchar can take up to.. 4000 or 5000?
forgot. 有的时候确实不够啊。而如果用text, give it a size
of 16 will takes care of any big block of text.
再说,如果我用两个4000的varchar,是不是即使我insert一个几乎
为空的record, the system will still allocate 8000+ space for
this record? While use text, maybe only 50 bytes?
Memo field到底不好在哪儿呢?I've read something like "for
memo fields, it saves a pointer in the table, and all the data
is actually saved somewhere else..." so what? | a*****a 发帖数: 438 | 2 Memo field is Access only.
SQLServer doesn't have Memo field. It has TEXT/NTEXT though.
varchar is called varchar because its length is variable. so when storing
a 40-byte string into a varchar(4000)field, only 40 bytes are used.
【在 b******u 的大作中提到】 : 常看见书上说应该避免用Memo/OLE object field。 : 可是SQL Server里Varchar can take up to.. 4000 or 5000? : forgot. 有的时候确实不够啊。而如果用text, give it a size : of 16 will takes care of any big block of text. : 再说,如果我用两个4000的varchar,是不是即使我insert一个几乎 : 为空的record, the system will still allocate 8000+ space for : this record? While use text, maybe only 50 bytes? : Memo field到底不好在哪儿呢?I've read something like "for : memo fields, it saves a pointer in the table, and all the data : is actually saved somewhere else..." so what?
| h****e 发帖数: 204 | 3 memo 是个老概念, 最常见于X-Base家族(dbase, foxbase, foxpro, clipper...)
的确memo type field在 dbf中只占一个pointer的地方, 所有数据存于另一个
文件中. 这个文件大小只跟OS有关. memo是很不适合查询的field, 而且memo文件
的存在使X-Base这种没有DBMS的数据库系统来说是个很不安全不干净的隐患.
SQL Server 的varchar 应该是不大于7000+, 所占字节不固定. 你说的那个例子是
char type.
【在 b******u 的大作中提到】 : 常看见书上说应该避免用Memo/OLE object field。 : 可是SQL Server里Varchar can take up to.. 4000 or 5000? : forgot. 有的时候确实不够啊。而如果用text, give it a size : of 16 will takes care of any big block of text. : 再说,如果我用两个4000的varchar,是不是即使我insert一个几乎 : 为空的record, the system will still allocate 8000+ space for : this record? While use text, maybe only 50 bytes? : Memo field到底不好在哪儿呢?I've read something like "for : memo fields, it saves a pointer in the table, and all the data : is actually saved somewhere else..." so what?
|
|