as already mentioned, one can use BLOB and LONGBLOB, but DON’T DO THIS.
There are several and diverse temptations whether to store images in databases, such as:
TEMPTATIONS
- backup facility
- single and uniform access between multiple nodes
- sql image listing and accounting
however, we have the true heels of Quiles:
REALITY
- backup becomes bulky beyond normal
- Database server memory load is overloaded with non-related data
- Bank server network traffic volume increases substantially
I suggest scheming an intelligent way of organizing data in an intuitive data structure, for example: /version/year/id-product/photos
If you want to perform data centralization and single point access, try distributed or replicated filesystems, there are thousands of alternatives (GFS,GPFS,AFS,DFS mogileFS, extremfs)
And there are also the document bases, where today many have distorted and become NOSQL
(S3, couchdb, mongoDB, etc..)
Use type BLOB, it is not a variable, it is the type of the field. It would be good for you to say which DBMS you use, and if possible post some code and/or leave your question more specific.
– Math
Which programming language you intend to use brother?
– noNihongo
Inform the programming language, the database you want to record this information, because, everything are important variables for a good answer!???????????
– user6026
@Harrypotter true, and even because of that there were complications in the answers below.
– Silvio Andorinha
The truth is that the answers took to the head because of the question that should have been closed before there were answers.
– Jorge B.
The question is good but it should have been better explained, because the answers change according to whether the application is web or desktop, I think if it changes from to keep it active yet.
– Silvio Andorinha
Yeah, but while it’s out, it’s on hold.
– Jorge B.
@Silvioandorinha the question is almost good, if the author had explained what he wants clearly would be good the question, but the way it is is almost impossible to answer. I was surprised with the attempts of answers being that I could not understand what the author wanted to ask.
– Math
@Amazing math is no one having closed the question soon.
– Jorge B.
@Jorgeb. well, I usually wait a little to close, I left my comment and I hoped that the author better, however were appearing answers, maybe the best would have been to close even and if the op better reopened from there
– Math
@Math also think, I start to agree with the closing soon, otherwise it gives wings to these kind of questions until seem interesting and is ruined.
– Jorge B.
Anderson, o Meta é a parte do site onde a gente dicute como funciona o SOPT. Your question was quoted in the comments to this post. Can you give your opinion there? And if you have any questions and want to clarify something do not hesitate to open a question there in [meta].
– brasofilo