Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

which data type for audio in mysql

Posted on 2013-12-20
4
Medium Priority
?
1,598 Views
Last Modified: 2013-12-20
what data type do i use in mysql if i want to store audio files in the database????
0
Comment
Question by:selhamwy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 39733228
It would be binary blob http://dev.mysql.com/doc/refman/5.5/en/blob.html .  But it's generally not a good idea.  You usually have to extract media data back to files so the players will know what to do with them.  The usual recommendation is to store the audio files in the file system and the file names and paths in the database.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39733229
Note that blobs are stored outside the database as files.  So to use a blob for an audio file, you would have to read it from the database, write it to a file with the right extension, and then let the player read the file to play.  That's a lot of disk activity compared to reading the file name and passing it to the player.
0
 

Author Closing Comment

by:selhamwy
ID: 39733266
that is the best alternative thanks for pointing it out...
it is late and i am not thinking straight
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39733269
Thanks for the points.  Get some rest, things will work out better.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question