在一个字段上应用两种数据类型? [英] Applying two datatypes on one field ?

查看:144
本文介绍了在一个字段上应用两种数据类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以使用vb.net2008将文本和图像存储在sqlserver2005的一个字段中吗? Plz帮帮我.... :(

Can we store text and image both in one field to sqlserver2005 using vb.net2008... ? Plz help me out .... :(

推荐答案

不要这样做。

参考:如何到存储文本及图像,内式同列 [ ^ ]

在关系数据库中,每个字段都是一个固定的数据类型,只应存储一个数据。阅读更多:关系数据库设计基础 [ ^ ]
Do not do it.
Refer: how-to-store-text-and-image-in-the-same-column[^]
In relational database, every field is of one fixed data type and should only stores one single piece of data. Read more: Fundamentals of Relational Database Design[^]


添加Peter Leow所说的内容:仅仅因为 可以 做某事,并不代表你 应该 做点什么。



可以 喝了一瓶威士忌,然后试着把车开回家。但如果我这样的话,我就是个白痴当我坠毁ort被抓住时,我应该受到惩罚。当你没有别的时候,它会让你拥有即使您只需要文本部分,也可以随时检索大字段。
To add to what Peter Leow has said: just because you can do something, does not mean you should do something.

I can drink a bottle of whiskey and try to drive my car home. But I'd be an idiot if I tried, and I'd deserve the punishment which would be heaped upon me when I crashed ort was caught.

Don't: If nothing else, it makes you have to retrieve a large field at all times, even if you only want the text portion.


可以在jpg文件的某些exif标记中存储文本(参见 http://www.exiv2.org/tags.html )但您将无法查询它,它不是'添加/检索该文本的简单任务
It is possible to store text in some of the exif tags of a jpg file (see http://www.exiv2.org/tags.html) but you won't be able to query on it and it isn't a simple task to add/retrieve that text


这篇关于在一个字段上应用两种数据类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆