Jump to content
xisto Community
Sign in to follow this  
tatatititututoto

Embedding Object In MySQL Embedding binary object in MySQL

Recommended Posts

I would like to ask, is it possible to embed binarry object into an MySQL database, like the MSSQL database & MS Access database. I would like to embed a few small txt based files into the mysql database. These text files are actually the settings of my web application so that the use can get the text file from the database. So any one with any clue, could u please gimme a hand here. Thanks mates.

Share this post


Link to post
Share on other sites

If you are talking about storing binary data in stead of textual data on a MySQL database then the answer is yes. It is the BLOB data type and there are four ypes of BLOB data

BLOBĀ  types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB.

You can read more about these types of data and their use at the MySQL Page HERE.
This would be any kind of binary data such as avi mp3 or jpg and stuff along those lines. Hope that helps you out some.

Share this post


Link to post
Share on other sites

Why do you want to store a text file in a database? I mean after you get it from the database it'd be just the same text file and you'd need to parse it just like if you read it straight from the disk. Instead it would be much smarter to put the setting in a database table from which you can easily and fast read them to memory and then use.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.