Trouble normalizing

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
peachiness
Forum Commoner
Posts: 41
Joined: Mon Oct 11, 2010 1:33 pm

Trouble normalizing

Post by peachiness »

So I am trying to move all the authors to their own table and keywords to their own table

from

Image

to

Image

the problem is how do I keep the associations once I move everything from the first table?

I don't want to manually create an association table o.O
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Trouble normalizing

Post by VladSun »

Create a third, many-to-many table.
There are 10 types of people in this world, those who understand binary and those who don't
peachiness
Forum Commoner
Posts: 41
Joined: Mon Oct 11, 2010 1:33 pm

Re: Trouble normalizing

Post by peachiness »

VladSun wrote:Create a third, many-to-many table.
Right, I am trying to create that table..but how do i go about doing that without having to manually enter all the associations?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Trouble normalizing

Post by VladSun »

Create an SQL script to do it for you :) Not so difficult.
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply