Sorry if that's obvious to some, I'm just starting with databases..

So, I read it's good to normalise databases and so I do, I have a table
for papers, one for author and one for journal, with, in paper, the id of
author and journal.

So far so good, but how do I enter my data ?? Supposing I have filled in
authors and journals, I now want to enter data for papers, is there a way
to do something like:

INSERT INTO papers(title, journal_id, author_id, whatever) 
values ('The title',
select journal_id from journal where name='The journal',
select author_id from author where name='The author',
etc..);

Obviously the above doesn't work, or I wouldn't be writing this but is
there a way to build similar command (ie without going for script) ?

Thanks,

Thomas.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to