MySQL insert usage when copying data

This is a discussion on MySQL insert usage when copying data within the MySQL Database forums, part of the Database Forums category; Hello everyone, I have 4 tables that hold information that all relate back to each other. I would like to ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-15-2007
nino9stars@yahoo.com
 
Posts: n/a
Default MySQL insert usage when copying data

Hello everyone,

I have 4 tables that hold information that all relate back to each
other. I would like to copy the information for one set of data (like
a copy/paste function in common editors), while also maintaining the
relations. Is there an easy way to do this in MySQL? Functions, or
anything of the like to ensure that all the information is properly
maintained?

Here's a breakdown:
Programs (what I want to copy):
prog_id, prog_name, prog_requirements

Requirements (tied to Programs) (many to one):
req_prog_id (tie), req_id, req_name_ req_requirements

Groups (tied to Requirements) (many to one):
grp_req_id (tie), grp_id, grp_name, grp_requirements

Data (tied to Groups and Requirements) (very many to one):
data_req_id (tie), data_grp_id (tie), data_id, data_name,
data_information

Any ideas?

For those that just want to question my intentions, here is why I want
to copy an entire Program. Whenever the Data changes over time, a new
program needs to be built to show those changes. There is a bit of
initial work that goes into building a program, so to rebuild ALL that
information is extremely time consuming. The goal is to copy the
program and make the changes to the new one rather than rebuilding
everything.

Thanks for your input/advice,
Nino Skilj

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:27 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0