Forum Moderators: travelin cat

Message Too Old, No Replies

mySQL desktop management...

...is it possible on Mac?

         

mivox

1:35 am on Mar 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK, I have a shopping site currently up and running on a small cart program using flat-file CSV databases... I'm currently moving the store to osCommerce, which uses mySQL.

My original database has hundreds of items, and don't want to do the copy-paste routine to get them into the new store. What I'd like to find is a freeware/shareware desktop utility for my Mac that will allow me to import the old CSV database file, update it's structure to match the new store system, and then upload it to the server.

Is there such a beast? I shame-facedly confess I know next to nothing about database systems, so I'm kinda flying blind at the moment.

EliteWeb

2:06 am on Mar 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When you search VersionTracker.com for mysql do any of those applications assist you with what you need to do? Theres less than a handful for Classic, and a few more for OS X.

bodine

2:27 am on Mar 11, 2003 (gmt 0)

10+ Year Member



Are you running osCommerce on Mac OS X, or another platform?

One of the things I am not sure of is if the MySQL databases are the same on all platforms (e.g., is the MySQL Mac OS X data the same as one for RedHat Linux?). You can easily use the 'LOAD DATA INFILE' function of MySQL to do what you want to do.

jamesa

3:30 am on Mar 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> the same on all platforms

They are identical

> update it's structure to match the new store system

I'm guessing that the new system can import data from a flat file but you just need to change the field order? A simple Perl/PHP script should do it, but barring that have you tried importing into a spreadsheet? Then you can just rearrange the columns and export back out.

bodine

3:27 pm on Mar 11, 2003 (gmt 0)

10+ Year Member



Actually, yeah, you may have to import the data into something like FileMaker Pro or a spreadsheet app to do some manipulation of it (the date, for instance, has to be "YYYY-MM-DD"). Whatever app you choose to use, you will need to open the file in BBEdit to change the newline characters from the Mac's carriage return to the Unix's line feed. (This is something I forget almost every time!)

mivox

7:40 pm on Mar 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The site is running on Linux, I'm using Mac OS9 on my desktop... the linefeed format isn't an issue, since I have BBEdit set to save with unix linefeeds by default, and the only other manipulation of those files happens on the server, by the existing shopping cart script we're using.

FileMaker Pro or a spreadsheet app to do some manipulation of it

That's what I'm looking for... something to import the flat file data, and let me manipulate it to match the structure of the osCommerce database.

Filemaker Pro seems like overkill, since I only need to update the existing data once... seems kinda like using Photoshop to fix the red-eye in the family reuinion snapshots, y'know? I couldn't convince my boss to buy a program that high-end for what is essentially aone-time project.

I'll check Versiontracker today...

bodine

8:59 pm on Mar 11, 2003 (gmt 0)

10+ Year Member



I thought originally that you were wanting to download your data, make some changes, load the data into a local MySQL database, and then upload that data set to the server. But, as jamesa said, I assume you have an existing database with osCommerce and need to change the order of fields and, like I said, date formats.

> Filemaker Pro seems like overkill

I thought you may have had a copy of FMP handy. I agree, it is overkill if you have to buy it. Excel should work as long as the file is small enough (it should do "hundreds of items" easily). You could also find/replace in BBEdit. :) I'm not sure what else you may find out there, but if you find something that does what you want, please let me/us know-- those kinda things come in handy from time to time!

mivox

9:32 pm on Mar 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What I have is a CSV file generated by a different shopping cart system... The database structure is totally different than it will be in the new osCommerce system... so what I wanted to do is this:

Create a few 'sample' products in the osCommerce store, then download the osC mySQL data into "Program X" so I can get a look at the structure of the fields and data.

Then I want to open up my old CSV file with Program X and re-arrange it to match the structure of the mySQL 'sample' data.

Then I want to export the updated file from "Program X" in the right format so I can upload it to my server, and have osCommerce able to use the data.

So the question is, what are my options for "Program X"? I only need to do this once, to migrate the data to the osC system... hence the reason I'd like to find a shareware/freeware option.

Like I said, I know nothing about database work. I don't own FMP, Excel, or anything else even remotely resembling a database or spreadsheet program... unless AppleWorks is up to the task. ;)

sun818

9:58 pm on Mar 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi, it looks like there is some sort of "EasyPopulate" [support.hanut.com] feature in osCommerce. I suggest you search on EasyPopulate on the osCommerce forum. I suppose you could work in text editor, but visually it would be easier to use some sort of GUI program like Excel. I'm not up on Mac software, but I imagine there is a freeware DB/spreadsheet program you can use to load the exported CSV.

bodine

10:15 pm on Mar 11, 2003 (gmt 0)

10+ Year Member



good find, sun818! There is another post on there about this same problem.

The guy still had to change the data before import, though. AppleWorks should work fine for that, as long as the data files are not too big.

BTW, mivox, What kind of cheap boss do you have, anyway? No real spreadsheet app. No real database app. Just the free AppleWorks that comes with most Macs! The good thing, at least, is that you have a Mac and not a Windows machine. ;)

mivox

10:18 pm on Mar 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks! Looks like that will get the data into osC... and I should be able to use AppleWorks to re-arrange the data into the field order EasyPopulate requires (I hope).

SQLBoss is a single program I found that looks like it might work, so I'll give that a shot first (I'd rather use one program than two). Will report back if it works or not. Has a 30day demo and a <$100 price tag...

If not, it looks like EasyPopulate and AppleWorks will do.

BTW, mivox, What kind of cheap boss do you have, anyway? No real spreadsheet app. No real database app. Just the free AppleWorks that comes with most Macs!

If I'd asked for a database or spreadsheet app when I was hired, I'd have gotten one... I don't WANT to do a bunch of database or spreadsheet work unless I absolutely have to. ;) (And AppleWorks is on my personal laptop at home, not my office machine... hehehe)

I was hired to do web and print design, and he did spend a few thousand $$ when I was hired buying a brand-new Mac and graphics software. He was going to buy me the full MSOffice suite as well, but I convinced him I really only needed Word... ;)

tstaheli

8:35 pm on Mar 17, 2003 (gmt 0)

10+ Year Member



Do you have a version of PHP MyAdmin? If so, you can insert the CSV file directly throught it's interface into the MySQL table.
We use this function daily for updating our shopping carts, it's slick!