Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 28th, 2005, 06:28 AM
Authorized User
 
Join Date: Aug 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to harsh_hot
Default STORING IMAGES & EXPORTING SQLSERVER TABLES

hello everybody...
i am a fan of mysql...but now i am facing a problem...

the problem is whether i can store images in database or not...if yes how?
secondly..i wanna know whether sqlserver files(tables) can be imported to mysql or viceversa....tell me how if ans is yes..

i will be thankful to u

 
Old September 1st, 2005, 06:06 PM
Authorized User
 
Join Date: Jul 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths
Default


harsh_hot,

  your question about images comes up a lot; the short answer is, yes it is possible, but it is bad, for performance reasons, except for in certain rare circumstances. The way I would usually go about implementing this would be to store the image in the filesystem and store a pointer to the image (read:path) in the database.

That being said, if you really must do this, you can use a BLOB (Binary Large OBject) data type:

CREATE TABLE Images(
  ImageID INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
  Image_Name VARCHAR(128) NOT NULL,
  Image_Data MEDIUMBLOB NOT NULL
);


As for data from SQL Server, the files are not binary compatible, however you can get the MySQL ODBC driver (check out sourceforge if it didn't come w/ your distribution) and Data Transformation Services which is part of the MS SQL Server Enterprise Manager. Create a job that will copy tables from one database to the other -- it's pretty straight forward. Note that with the MySQL ODBC drivers on a windows machine, you can copy data to a MySQL process running on a UNIX.


Regards,
Meredith Shaebanyan

 
Old September 8th, 2005, 02:10 AM
Authorized User
 
Join Date: Aug 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to harsh_hot
Default

Thanks a lot for your valuable information.....






Similar Threads
Thread Thread Starter Forum Replies Last Post
Storing images in Database and displaying them Manoj Bisht ASP.NET 1.x and 2.0 Application Design 4 February 6th, 2010 03:06 AM
Storing Images into database usprasad_m SQL Server 2000 4 May 17th, 2007 05:16 PM
Storing Images In Oracle & Manipulate Through VB 6 tutul128 Beginning VB 6 1 August 2nd, 2004 03:26 AM
Exporting reports with embedded images KARENM Access VBA 5 August 8th, 2003 10:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.