dbTalk Databases Forums  

using binary files

comp.databases.mysql comp.databases.mysql


Discuss using binary files in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ioson
 
Posts: n/a

Default using binary files - 01-30-2011 , 09:03 AM






Hi,
is possible to use a binary file as a database with mysql?
In other words, i would like to mantain my binary data and use mysql to
write/read in it as it war a database.
The problem is that i have an application ( not source) that use binary
data and i would like to read/change/add/delete data with my php app.

Thanks

Ioson

Reply With Quote
  #2  
Old   
The Natural Philosopher
 
Posts: n/a

Default Re: using binary files - 01-30-2011 , 11:03 AM






ioson wrote:
Quote:
Hi,
is possible to use a binary file as a database with mysql?
In other words, i would like to mantain my binary data and use mysql to
write/read in it as it war a database.
The problem is that i have an application ( not source) that use binary
data and i would like to read/change/add/delete data with my php app.

Thanks

Ioson



Not 100% sure what the problem is. You can store binary data in a BLOB
easily enough.


You probably need to use LOAD_FILE to insert it though, to avoid
possible misinterpretation of the data by mysql..

Reply With Quote
  #3  
Old   
Erick T. Barkhuis
 
Posts: n/a

Default Re: using binary files - 01-30-2011 , 11:22 AM



ioson:


Quote:
is possible to use a binary file as a database with mysql?
Does your 'binary file' contain tables with field definitions and keys?

Reply With Quote
  #4  
Old   
Álvaro G. Vicario
 
Posts: n/a

Default Re: using binary files - 01-31-2011 , 02:23 AM



El 30/01/2011 16:03, ioson escribió/wrote:
Quote:
is possible to use a binary file as a database with mysql?
In other words, i would like to mantain my binary data and use mysql to
write/read in it as it war a database.
The problem is that i have an application ( not source) that use binary
data and i would like to read/change/add/delete data with my php app.
I suppose that you can probably use any arbitrary binary format to store
tables and use MySQL as front-end. You just need to reverse-engineer the
format, write your own MySQL plugin to provide the appropriate storage
format and use such format instead of MyISAM or InnoDB. It'd be a nice
programming exercise.

Or you can use a faster alternative and rewrite the proprietary
application


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Reply With Quote
  #5  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: using binary files - 01-31-2011 , 03:49 AM



=?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?= <alvaro.NOSPAMTHANX (AT) demogracia (DOT) com.invalid> wrote:
Quote:
I suppose that you can probably use any arbitrary binary format to store
tables and use MySQL as front-end. You just need to reverse-engineer the
format, write your own MySQL plugin to provide the appropriate storage
format and use such format instead of MyISAM or InnoDB.
Yeah. MySQL calls this kind of plugin a "storage engine" and beginning
with version 5.1 those can indeed be pluggable (before they had to be
compiled into the server)

The pluggable storage engine API is documented in the manual and on
MySQL Forge: http://forge.mysql.com/wiki/MySQL_In..._Custom_Engine

There is also an example engine in the MySQL sources.

Quote:
It'd be a nice programming exercise.
If done properly (using indexes, transactional) then it would be a
rather lengthy "exercise". My guess is several man-years. Simple
things like "data is CSV, no indexes, no writes" can be implemented
in few days though.


XL

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.