What is the best way to store Binary data (images, pdf’s, mp3’s, videos ect) in mysql and why? What i would love to know is how you do it(as developers) and why? Also how the big sites do it?
Thank you in advance 😉
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To store Binary data in MySQL Blob can be used: MySQL Manuel: 10.4.3. The BLOB and TEXT Types
Although if it isn’t really necessary I wouldn’t store binary data in a database, because the central reasons for storing data in MySQL etc. (like Join, Index, …) can hardly be used with this data types. Blob also is degrading the overall database performance.
Perhaps you build a separate table for files where you store several aspects and a filesystem path…