dbTalk Databases Forums  

MySQL WorkBench Questions...

comp.databases.mysql comp.databases.mysql


Discuss MySQL WorkBench Questions... in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-18-2010 , 01:36 PM






On Dec 18, 11:55*am, John Nagle <na... (AT) animats (DOT) com> wrote:
Quote:
On 12/17/2010 12:57 PM, SpreadTooThin wrote:

On Dec 17, 1:02 pm, John Nagle<na... (AT) animats (DOT) com> *wrote:
On 12/15/2010 12:20 PM, SpreadTooThin wrote:
I'm not moving data! *I'm modifying the database structure! *The
database isn't populated!

* * Oh. *If you had written that in your original message, you would
have received a useful answer by now.

* * Execute the SQL statement

* * * * SHOW CREATE TABLE oldtablename;

This will display the CREATE TABLE statement needed to
create that table. *You can then edit the text of the
CREATE TABLE statement and use it to create a new table.

* * * * * * * * * * * * * * * * John Nagle

Excellent! Thank you.
Of course I could have gotten that by using the IDE to generate the
table creation sql statement.
However I still think this IS the purpose and responsibility of a good
IDE.

Reply With Quote
  #22  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-18-2010 , 01:39 PM






On Dec 17, 2:50*pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
Quote:
On 12/17/2010 2:53 PM, SpreadTooThin wrote:

going back to my db programming days...
The structure of the database can be stored in a table.
then you can simply edit the table using standard 'sql' commands.
Is this what you are referring to?
How would you export the structure of the table to a table?

No, you don't typically export to a table - you export the SQL commands
to a flat file, then edit that flat file. *This is true pretty much all
of the SQL databases out there.

MySQL does store the structure of the database in its internal tables -
but you really don't want to muck with that unless you want to destroy
your database (there is a direct correlation between the internal tables
and the structure of the data file(s). *Seehttp://dev.mysql.com/doc/refman/5.5/en/show-create-table.html.

You can also just duplicate the table structure - seehttp://dev.mysql.com/doc/refman/5.5/en/create-table.html

Then alter the table when you're done. *But that may be harder.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck... (AT) attglobal (DOT) net
==================
At the point of design and development that I'm at.. Simply dropping
the table is ok as there isn't any data in the database.

Reply With Quote
  #23  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-18-2010 , 01:43 PM



On Dec 18, 12:32*pm, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m>
wrote:
Quote:
SpreadTooThin:

On Dec 17, 2:42 pm, Captain Paralytic <paul_laut... (AT) yahoo (DOT) com> wrote:
On Dec 15, 8:20 pm, SpreadTooThin <bjobrie... (AT) gmail (DOT) com> wrote:

I have a table that I want to split into two or more tables...
Why can't I copy and past or drag and drop columns from one
table to *> another?

Because that is not implemented in MySQL Workbench.

No the database is not populated with data. *This is strictly the
design of the tables that I'm working on.

Well, you suggested the proper method yourself: copy the table, and
then delete columns from the original table and the table-copy as
desired.
That would require just a couple of minutes with medium-large tables,
or seconds with small tables.

I just tested it in MySQL Workbench with a table of 15 fields, that
need to be splitted into two tables (5 and 10 fields). Is there any
problem I overlooked (since it seems so simple, I'm not sure where the
problem is)?

--
Erick
Looking at the IDE one has a tab for a table. That tab has tabs for
Table, Columns, Indices etc..
but again you can't have more than one table open at a time and
manipulate table contents from one table to the other.
I guess in the end I'm just complaining... because this thread has
taken more time to explain than the work needed to simply retype all
the fields in the tables!!

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

Default Re: MySQL WorkBench Questions... - 12-18-2010 , 01:57 PM



SpreadTooThin:

Quote:
On Dec 18, 12:32*pm, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m
wrote:
SpreadTooThin:

On Dec 17, 2:42 pm, Captain Paralytic <paul_laut... (AT) yahoo (DOT) com
wrote: >> On Dec 15, 8:20 pm, SpreadTooThin
bjobrie... (AT) gmail (DOT) com> wrote:

I have a table that I want to split into two or more tables...
Why can't I copy and past or drag and drop columns from one
table to *> another?

Because that is not implemented in MySQL Workbench.

No the database is not populated with data. *This is strictly the
design of the tables that I'm working on.

Well, you suggested the proper method yourself: copy the table, and
then delete columns from the original table and the table-copy as
desired.
That would require just a couple of minutes with medium-large
tables, or seconds with small tables.

I just tested it in MySQL Workbench with a table of 15 fields, that
need to be splitted into two tables (5 and 10 fields). Is there any
problem I overlooked (since it seems so simple, I'm not sure where
the problem is)?


Looking at the IDE one has a tab for a table. That tab has tabs for
Table, Columns, Indices etc..
but again you can't have more than one table open at a time and
manipulate table contents from one table to the other.
Have you found the "copy table" command in the context menu of a table
rectangle?

Quote:
I guess in the end I'm just complaining... because this thread has
taken more time to explain than the work needed to simply retype all
the fields in the tables!!
But you don't need to retype anything.
Just right-click, copy the table, and drop fields from either side.
That's what you wanted to do, and that's what the Workbench allows you
to.

--
Erick

Reply With Quote
  #25  
Old   
J.O. Aho
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-18-2010 , 02:44 PM



SpreadTooThin wrote:
Quote:
On Dec 18, 12:04 am, "J.O. Aho" <u... (AT) example (DOT) net> wrote:
SpreadTooThin wrote:

I'm not moving data! I'm modifying the database structure! The
database isn't populated!

So why not just modify the EER Model and then drop the current database and
"import" the redesigned EER Modle to the database.

There IS NO data in the Database there only IS an EER Model that I'm
trying to modify in the MySQL WorkBench.
That IS the issue. I have 1 table that is being split up into more
than one table, but the IDE doesn't give me any method of talking
'columns' (Fields) from one Table, cutting them and Pasting them into
another.

Maybe just make a copy of the "big" table and then modify the copy to be as
you want, this way you can "move" columns.



--

//Aho

Reply With Quote
  #26  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-18-2010 , 07:01 PM



On Dec 18, 12:57*pm, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m>
wrote:
Quote:
SpreadTooThin:



On Dec 18, 12:32*pm, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m
wrote:
SpreadTooThin:

On Dec 17, 2:42 pm, Captain Paralytic <paul_laut... (AT) yahoo (DOT) com
wrote: * >> On Dec 15, 8:20 pm, SpreadTooThin
bjobrie... (AT) gmail (DOT) com> wrote:

I have a table that I want to split into two or more tables...
Why can't I copy and past or drag and drop columns from one
table to *> another?

Because that is not implemented in MySQL Workbench.

No the database is not populated with data. *This is strictly the
design of the tables that I'm working on.

Well, you suggested the proper method yourself: copy the table, and
then delete columns from the original table and the table-copy as
desired.
That would require just a couple of minutes with medium-large
tables, *or seconds with small tables.

I just tested it in MySQL Workbench with a table of 15 fields, that
need to be splitted into two tables (5 and 10 fields). Is there any
problem I overlooked (since it seems so simple, I'm not sure where
the *problem is)?

Looking at the IDE one has a tab for a table. *That tab has tabs for
Table, Columns, Indices etc..
but again you can't have more than one table open at a time and
manipulate table contents from one table to the other.

Have you found the "copy table" command in the context menu of a table
rectangle?

I did, thank you.

Quote:
I guess in the end I'm just complaining... because this thread has
taken more time to explain than the work needed to simply retype all
the fields in the tables!!

But you don't need to retype anything.
Just right-click, copy the table, and drop fields from either side.
That's what you wanted to do, and that's what the Workbench allows you
to.

yep.

Quote:
--
Erick

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

Default Re: MySQL WorkBench Questions... - 12-23-2010 , 02:03 AM



Jerry Stuckle:

Quote:
On 12/16/2010 12:24 AM, SpreadTooThin wrote:

Graduated computer science 1982... You?

Long before that. Just started using SQL around 1985 at IBM.
http://dilbert.com/strips/comic/2010-12-23/

--
Erick

Reply With Quote
  #28  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-23-2010 , 06:19 AM



On 12/23/2010 3:03 AM, Erick T. Barkhuis wrote:
Quote:
Jerry Stuckle:

On 12/16/2010 12:24 AM, SpreadTooThin wrote:

Graduated computer science 1982... You?

Long before that. Just started using SQL around 1985 at IBM.

http://dilbert.com/strips/comic/2010-12-23/

A lot more than the youths do!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #29  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-24-2010 , 08:05 AM



On Dec 23, 5:19*am, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
Quote:
On 12/23/2010 3:03 AM, Erick T. Barkhuis wrote:

Jerry Stuckle:

On 12/16/2010 12:24 AM, SpreadTooThin wrote:

Graduated computer science 1982... You?

Long before that. *Just started using SQL around 1985 at IBM.

http://dilbert.com/strips/comic/2010-12-23/

A lot more than the youths do!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck... (AT) attglobal (DOT) net
==================
Some people have forgotten more about computers than you know!
Or something like that.

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.