ASP.NET尽快将MP3上传到SQL Server! [英] ASP.NET uploading MP3 to SQL Server ASAP!!!

查看:79
本文介绍了ASP.NET尽快将MP3上传到SQL Server!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我可以获得如何将mp3上传到sql server数据库的代码......



please could i have the code of how to upload an mp3 to a sql server database...

推荐答案

我不推荐它。我的MP3平均每个大约4MB,在这个大小的数据库使用量开始迅速增加 - 这导致备份速度慢,访问速度慢等等。



如果将MP3文件存储在临时名称下的文件夹中,我会怎么做 - GUID很好 - 并将文件的位置和原始文件名存储在我的数据库中。这样,我在检索文件时不会占用数据库连接等稀缺资源。保存它们也变得微不足道 - 你所存储的只是几个字符串。
I wouldn't recommend it. My MP3's average out around 4MB each, and at that size database usage starts to mount up rapidly - which causes it to be slow to backup, slow to access, and so forth.

What I would do if store the MP3 file in a folder under a temporary name - a GUID is good - and store the location of the file and the original file name in my DB. That way, I don't tie up scarce resources like database connections while retrieving the files. Saving them also becomes a trivial operation - all you are storing is a couple of strings.


这篇关于ASP.NET尽快将MP3上传到SQL Server!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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