By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,723 Members | 842 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,723 IT Pros & Developers. It's quick & easy.

I wish I could store and retrieve Sound to and from database.

P: n/a
Hi

I don’t want to change my name or anything :) but I wish I was able to save Sound into SQL server and retrieve it

So my question is How do you save a wav file into a SQL server and how do you retrieve it

Thanks so much

Lisa Jone

Nov 20 '05 #1
Share this Question
Share on Google+
19 Replies


P: n/a
This article shows you how to store images, but a blob is a blob
http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp

However, whether or not you want to do this is another story. You'll find
quite a few people with tales of woe trying to store a lot of BLOB data in a
DB only to find it killed performance...
"Lisa Jones" <an*******@discussions.microsoft.com> wrote in message
news:7D**********************************@microsof t.com...
Hi

I don't want to change my name or anything :) but I wish I was able to save Sound into SQL server and retrieve it.
So my question is How do you save a wav file into a SQL server and how do you retrieve it?
Thanks so much
Lisa Jones

Nov 20 '05 #2

P: n/a
Why not store the file path to the DB and then save the file to the path. This would help to keep the DB Size down and speed up DB lookups

Glenn
Nov 20 '05 #3

P: n/a
I'm with you 100%. I posted a link on how to do it but I really think it's
ill advised unless it's a loooowww traffic db, and even then, it's a lot
easier to store it on a drive and you get the side benefit of being able to
access it without writing a good bit of code.
"Glenn Wilson" <an*******@discussions.microsoft.com> wrote in message
news:64**********************************@microsof t.com...
Why not store the file path to the DB and then save the file to the path. This would help to keep the DB Size down and speed up DB lookups.
Glenn

Nov 20 '05 #4

P: n/a
We have implemented this on several of our systems, and I am now in the process of writing some stored proces and adding fields so that we can refference the files if they are stored on backup tapes
As I work in a telephony Company storing hundreds of thousands of messages we need to have them stored on disk for easy access, but as time goes on these files are not needed straight away. I am writing a process that will remove the path of the file but leave the name, and then add two fields to the records that store a bit value if it is on tape, and then another that lists the tape name. This way the app (Which is also being moderfied) can return what tape needs to be access to find the record

Glenn
Nov 20 '05 #5

P: n/a
Cool, thanks for the post
"Glenn Wilson" <an*******@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
We have implemented this on several of our systems, and I am now in the process of writing some stored proces and adding fields so that we can
refference the files if they are stored on backup tapes. As I work in a telephony Company storing hundreds of thousands of messages we need to have them stored on disk for easy access, but as time goes on
these files are not needed straight away. I am writing a process that will
remove the path of the file but leave the name, and then add two fields to
the records that store a bit value if it is on tape, and then another that
lists the tape name. This way the app (Which is also being moderfied) can
return what tape needs to be access to find the record.
Glenn

Nov 20 '05 #6

P: n/a
Hi
Yes I was thinking of storing only the path but there is only one problem and that is security. These are for medical transcripts. So if i store it as file how would i address the security consideration
Thank
Lis

Nov 20 '05 #7

P: n/a
Remember that the database is not really that secure, anyone with admin access to the database could view them, and if the database files (SQLServer) are detatched and moved any one can restore them to another DB and open them

One way to secure it would be to encrypt the stream as you save the file, Then the file would just be jiberish and only the app and a proper key could retrive them. As a side note you could also use component ones classes (Availible from the resource kit) to zip or compress the stream as you save it, this would add to the security and also give you a saving on disk space

Glenn
Nov 20 '05 #8

P: n/a
Thanks i might just do that.
Nov 20 '05 #9

P: n/a
Hi Lisa,

I agree with Glen and I agree with you.

However the most I agree with you that saving it in a database gives for
your purpose in my opinion a more certain way to manage it.

The wav file is a very old hugh sound format, did you ever thought on a more
modern compact sound format.

Cor
Nov 20 '05 #10

P: n/a
Hi Cor
I am now looking into that... any suggestions
Thank
Lis
Nov 20 '05 #11

P: n/a
* "Cor Ligthert" <no**********@planet.nl> scripsit:
[...]

I don't have an opinion on this topic ;-).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #12

P: n/a
Not about the topic,

About my text I did give the advise to take a smaller sound format, and than
I think for that is Herfried my first man to give a good advise.

The database part is no problem for me at all, I can assure you that you are
not the first who I would ask for that.

Cor
Nov 20 '05 #13

P: n/a
Cor,

* "Cor Ligthert" <no**********@planet.nl> scripsit:
About my text I did give the advise to take a smaller sound format, and than
I think for that is Herfried my first man to give a good advise.


It depends on what you want to do with the audio data. If access must
be possible in little time, decompression should be fast. If data is
streamed over a network, the format must be "streamable" and often data
is heavily (lossy) compressed. There is no general answer.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #14

P: n/a
> * "Cor Ligthert" <no**********@planet.nl> scripsit:
About my text I did give the advise to take a smaller sound format, and than I think for that is Herfried my first man to give a good advise.


It depends on what you want to do with the audio data. If access must
be possible in little time, decompression should be fast. If data is
streamed over a network, the format must be "streamable" and often data
is heavily (lossy) compressed. There is no general answer.

Linda said that and I agree with here, so my idea was how can you get that
data smaller.
I have seen that serializing and deserializing is possible with any media.
(I have now a complete collection of samples for that in as I think in every
kind of way). I do not think that compressing a sound file makes sense
however if that is possible give your advise, I am absolute a nitwit in
that, without the fact that I know that a wav file is much larger than
nowadays is possible.

This is the text from Linda
----------------------------------------------------------------------------
---------------------
Yes I was thinking of storing only the path but there is only one problem
and that is security. These are for medical transcripts. So if i store it as
file how would i address the security consideration?
----------------------------------------------------------------------------
---------------------

So what is your opinion?

'Cor
Nov 20 '05 #15

P: n/a
> I have seen that serializing and deserializing is possible with any media.
(I have now a complete collection of samples for that in as I think in every kind of way). I do not think that compressing a sound file makes sense
however if that is possible give your advise, I am absolute a nitwit in
that, without the fact that I know that a wav file is much larger than
nowadays is possible.


There are many different compression formats to choose from. mp3, ogg, wma,
aac, realaudio...etc.
It does really depend on what kind of sound needs to be compressed. What
kind of sound is the OP storing with the medical transcripts? Is it 1
second sound effect or perhaps it is a doctor's audio notes that are a few
minutes in length?

How important is the quality of the sound? The more you compress the more
you degrade the quality.

Nov 20 '05 #16

P: n/a

"Lisa Jones" <an*******@discussions.microsoft.com> wrote in message
news:9C**********************************@microsof t.com...
Hi all
Thanks all for your comments. Thanks to Cor my name now is Linda :)
Question regarding what kind of vice, these are doc recording. the idea is offline the speech must be converted to text so Quality if recording is very
important. Thanks
Lisa

Speech can be compressed much more than music. There are codecs that are
designed specifically for speech.
You may take a look at the Speex codec which is open source and freely
available.
There are others such as GSM.
Nov 20 '05 #17

P: n/a
Thanks I don't know anything about them but will look them up
Lisa
Nov 20 '05 #18

P: n/a
Hi *Lisa*

And if you are further,
Herfried knows how to compress
Slonocode knows what sound codec
I know how to serialize

(And probably we know all something about it)

Feel free to ask again.

Success

:-)

Cor
Nov 20 '05 #19

P: n/a
Thanks so much
Lisa
Nov 20 '05 #20

This discussion thread is closed

Replies have been disabled for this discussion.