SQL Server and ASP.NET FAQ: วิธีการเก็บและดึงข้อมูล BLOBs ใน SQL Server
-
19 มีนาคม 2555 8:58ผู้ดูแลSQL Server and ASP.NET FAQ: วิธีการเก็บและดึงข้อมูล BLOBs ใน SQL Server
Supa Sethasiripong [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
ตอบทั้งหมด
-
19 มีนาคม 2555 9:00ผู้ดูแล
BLOBs (binary large objects) เป็นตัวแปรทาง binary หรือcharacter data, เอกสาร (.txt, .doc) และรูปภาพ(.jpeg, .gif, .bmp)
ซึ่งเราสามารถเก็บข้อมูลเหล่านี้ไว้ในdatabase ได้
ใน SQL Server, BLOBs อาจเป็น text, ntext, image nvarchar(max), varchar(max) และ varbinary(max) data type
ข้อมูลเพิ่มเติม
How to read and write a file to or from a BLOB column by using ADO.NET and Visual C# .NET
http://support.microsoft.com/kb/317016
How to read and write a file to or from a BLOB column by using ADO.NET and Visual Basic .NET
http://support.microsoft.com/kb/316887
Working with Batched Data
http://www.asp.net/learn/data-access/#batched
ขอแนะนำให้ใช้ nvarchar(max), varchar(max), และ varbinary(max) แทนการใช้ ntext, text, และ image
เอกสารที่เกี่ยวข้อง
Using Large-Value Data Types
http://msdn.microsoft.com/en-us/library/ms178158(SQL.90).aspx
โดยทั่วไปจะมี 2 วิธีที่ใช้ในการเก็บข้อมูล BLOBs (binary large objects): database หรือ file system โดยเราจะต้องพิจารณาในเรื่องของค่าใช้จ่าย
ค่าบำรุงรักษา และประสิทธิภาพ เพื่อประกอบการตัดสินใจ
เอกสารที่เกี่ยวข้อง
http://research.microsoft.com/apps/pubs/default.aspx?id=64525
ฟอรัมที่เกี่ยวข้อง
http://forums.asp.net/t/1096999.aspx
Supa Sethasiripong [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- แก้ไขโดย supa_sModerator 19 มีนาคม 2555 9:01
- ทำเครื่องหมายเป็นคำตอบโดย supa_sModerator 22 มีนาคม 2555 3:13