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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|