Export settings - need help understanding what to do

[expired user #5868]'s profile image [expired user #5868] posted 13 years ago in Import/Export Permalink
It shouldn be hard, but it looks hard and probably it will mess it all up. Can someone tell me exactly what I need to do if I just want a raw copy of the data in a database and all its tables?

Once I click export in Heidi, and I select one big file, and in addition to that I write a file name, what else do I select?

What is up with the field called Data where my options are:

- No data
- Delete + Insert (what does that mean?)
- Insert (what does that mean?)
- 3 more (what do they mean?)

In addition to that I can click off 4 boxes. Drop and create. Do I need to click those? What do they mean?

I really hope someone can help me, I just want something VERY basic and its made very complicated :/
ansgar's profile image ansgar posted 13 years ago Permalink
Exporting a database is just not that trivial, and you should not expect everything to be self-explainable. Lucky you I did not add a myriad of additional functionality to that dialog, as some users expected me to do. But at least you should know what DROP, CREATE, and INSERT means.

However, do a "normal" backup as follows:
- Database: [ ] Drop [x] Create
- Tables: [ ] Drop [x] Create
- Data: Insert
[expired user #5868]'s profile image [expired user #5868] posted 13 years ago Permalink
Output as one big file right? And then hit save and it should download it as sql correct?
ansgar's profile image ansgar posted 13 years ago Permalink
Exactly.

Afterwards, don't forget to make yourself familiar with words like INSERT, DROP and CREATE - these are fundamental in database work.
[expired user #5868]'s profile image [expired user #5868] posted 13 years ago Permalink
Ok now I did it.

But a couple of more questions:

1) It says 0 / 0% at some of the tables. Why is that? Some of the other says 17 / 100% or 11 / 100%.

2) It said the file was going to be 700MB before I started downloading. When it was finished the file was only 512MB. Could that be because some of those 0% are indeed not downloaded?
[expired user #5868]'s profile image [expired user #5868] posted 13 years ago Permalink
If you could give me a tutorial or url to where the INSERT, DROP and CREATE is explained in regards to understanding how they work when doing a db dump that would be great :)
ansgar's profile image ansgar posted 13 years ago Permalink
1) Please look at the column header, it says "Rows". So you have 0 rows = 0%, or 17 rows = 100%

> 2) It said the file was going to be 700MB before I started
> downloading.

How was that file created?

I guess evertything's ok, unless you de-clicked some tables in your database before pushing the save button.

By the way, please update to the latest build (Help > Check for updates)

For tutorials you're welcome to use Google :)
[expired user #6053]'s profile image [expired user #6053] posted 12 years ago Permalink
A little thread resurrection...

I've seen it said that the dialog is self-explanatory. I'm not so sure. I think the problem here, and usually when this sort of thing is asked about HeidiSQL, ISN'T that people don't understand what CREATE, INSERT and DROP do. The issue is that they don't understand how HeidiSQL will react. Do they apply to only the source? Only the destination? Both in fashion?

For example, if I'm doing an export and select either DROP option, does that mean the source will be dropped after export, thereby erasing my original database? Or just that the destination will be dropped/overwritten and the source is safe?

See what I mean? It's not that the commands are necessarily misunderstood. It's that HeidiSQL is misunderstood. People may be worried that they will destroy their export source when all they wanted to do was a backup.

While additional features are certainly not necessary (and indeed it appears not desired), some verbiage on the dialog may help to make people clear on how HeidiSQL will handle the action.
ansgar's profile image ansgar posted 12 years ago Permalink
Understand. Then, how should I enhance phrasing in that dialog, any suggestions? Probably change "Database(s)" to "Target database(s)" (too long for the space but that may be solvable somehow)
kalvaro's profile image kalvaro posted 12 years ago Permalink
If I recall correctly, older HeidiSQL versions used to have a text box with dynamic sample SQL that was updated to reflect the SQL commands to be generated. E.g. for these options:

Database: [ ] Drop [X] Create
Table(s): [ ] Drop [X] Create
Data: INSERT

... you'd see this:

CREATE DATABASE foo;
CREATE TABLE bar (...);
INSERT INTO bar (...) VALUES (...);

I supposed it was remove when the dialogue was revamped. I really liked that.

Whatever, it's pretty hard to design a bullet-proof interface for someone who expects that "export" can remove the source data...
[expired user #6053]'s profile image [expired user #6053] posted 12 years ago Permalink
@anse

Maybe just a header over the options that says "Target Database Options"? Your idea is cleaner though. Just widen the dialog a bit.

@kalvaro - "Whatever, it's pretty hard to design a bullet-proof interface for someone who expects that "export" can remove the source data... "

Indeed the word "export" could be taken at its face. But, one can never know what the developer had in mind when it was written. What one man thinks is appropriate and what another thinks is appropriate are often two different things. Maybe it's intended to be a "move" feature, hmm? Who knows? It's ambiguous.

Please login to leave a reply, or register at first.