由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - Memo Field一问
相关主题
SQL问题请教: add one more columnCOMBINE RECORDS
求解,把一table 倒入SQL Server 出错Any firm looking for DBMS on cloud
help needstored procedure running 很慢的问题
Why SQL Server 7 Enterprise Manager is so slow?Which server shoule I use
怎样在T-SQl中执行一条放在varchar中的命令Questions on SQL
请大侠帮帮忙!SQL server error问题。初级问题
Urgent - Create Table with VARCHAR types in Sybase through JDBCQuestion about T-SQL
谁给比较一下PostgreSQL和mysqlSQL help.
相关话题的讨论汇总
话题: memo话题: field话题: varchar话题: text话题: 4000
进入Database版参与讨论
1 (共1页)
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?

1 (共1页)
进入Database版参与讨论
相关主题
SQL help.怎样在T-SQl中执行一条放在varchar中的命令
[转载] SQL 2000不能装在win2000上吗???请大侠帮帮忙!SQL server error问题。
怎么移植一个SQL server数据库Urgent - Create Table with VARCHAR types in Sybase through JDBC
How to migrate a database from one sql server to another?谁给比较一下PostgreSQL和mysql
SQL问题请教: add one more columnCOMBINE RECORDS
求解,把一table 倒入SQL Server 出错Any firm looking for DBMS on cloud
help needstored procedure running 很慢的问题
Why SQL Server 7 Enterprise Manager is so slow?Which server shoule I use
相关话题的讨论汇总
话题: memo话题: field话题: varchar话题: text话题: 4000