Unix Technical Forum

Is there a quick way to copy database information?

This is a discussion on Is there a quick way to copy database information? within the MySQL forums, part of the Database Server Software category; --> Hello, I have tried searching for this subject, but can never seem to find exactly what I'm looking for. ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 10:28 AM
nino9stars@yahoo.com
 
Posts: n/a
Default Is there a quick way to copy database information?

Hello,

I have tried searching for this subject, but can never seem to find
exactly what I'm looking for. Here is the situation I have at hand.

I want to find a quick (hopefully painless) way to copy information
that I have stored in the database. Here is how the information is
stored:

TABLE: LeagueInfo
league_id auto_increment primary key
league_name, etc...

TABLE: Teams
team_id auto_increment primary key,
teams_league_id (ties to LeagueInfo's league_id)
team_name, etc...

TABLE: Players
players_id auto_increment primary key
players_team_id (ties to Teams' team_id)
players_name, etc...

TABLE: Stats
stats_id auto_increment primary key
stats_player_id (ties to Players' player_id)
stats_game_id, etc

Since a lot of the information provided is tied to each other, how can
I ensure that when I "duplicate" the entire league, all the
appropriate ties stay consistent, and all the new copied information
will have the appropriate new auto_incremented fields. For example:

If I have a league called Football League with 2 teams (Team1 and
Team2), and they have 5 players each with varying rows of stats for
each player, how can I ensure that the new league (let's call it
Basketball League) will easily duplicate all the information.

The reason I'm doing this is because the program I'm running has the
same teams and people join different leagues. All the team and player
information stays the same, but they might join another sports league.
The problem I found is that each team might change their information
JUST SLIGHTLY from league to league. Thus, if the information is
copied over, the manager can easily go in and just make those several
slight changes as opposed to having to go through the entire lengthy
process of entering their team information with each session and each
league.

Hope you all can help and I hope I made some sense. Let me know if
there is anything I failed to mention or if something doesn't entirely
make sense.

Thanks,
Nino Skilj

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 10:28 AM
Paul Lautman
 
Posts: n/a
Default Re: Is there a quick way to copy database information?

nino9stars@yahoo.com wrote:
> Hello,
>
> I have tried searching for this subject, but can never seem to find
> exactly what I'm looking for. Here is the situation I have at hand.
>
> I want to find a quick (hopefully painless) way to copy information
> that I have stored in the database. Here is how the information is
> stored:
>
> TABLE: LeagueInfo
> league_id auto_increment primary key
> league_name, etc...
>
> TABLE: Teams
> team_id auto_increment primary key,
> teams_league_id (ties to LeagueInfo's league_id)
> team_name, etc...
>
> TABLE: Players
> players_id auto_increment primary key
> players_team_id (ties to Teams' team_id)
> players_name, etc...
>
> TABLE: Stats
> stats_id auto_increment primary key
> stats_player_id (ties to Players' player_id)
> stats_game_id, etc
>
> Since a lot of the information provided is tied to each other, how can
> I ensure that when I "duplicate" the entire league, all the
> appropriate ties stay consistent, and all the new copied information
> will have the appropriate new auto_incremented fields. For example:
>
> If I have a league called Football League with 2 teams (Team1 and
> Team2), and they have 5 players each with varying rows of stats for
> each player, how can I ensure that the new league (let's call it
> Basketball League) will easily duplicate all the information.
>
> The reason I'm doing this is because the program I'm running has the
> same teams and people join different leagues. All the team and player
> information stays the same, but they might join another sports league.
> The problem I found is that each team might change their information
> JUST SLIGHTLY from league to league. Thus, if the information is
> copied over, the manager can easily go in and just make those several
> slight changes as opposed to having to go through the entire lengthy
> process of entering their team information with each session and each
> league.
>
> Hope you all can help and I hope I made some sense. Let me know if
> there is anything I failed to mention or if something doesn't entirely
> make sense.
>
> Thanks,
> Nino Skilj


Just dump the tables and load them into the new DB


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 10:28 AM
strawberry
 
Posts: n/a
Default Re: Is there a quick way to copy database information?

On 13 Oct, 09:16, "Paul Lautman" <paul.laut...@btinternet.com> wrote:
> nino9st...@yahoo.com wrote:
> > Hello,

>
> > I have tried searching for this subject, but can never seem to find
> > exactly what I'm looking for. Here is the situation I have at hand.

>
> > I want to find a quick (hopefully painless) way to copy information
> > that I have stored in the database. Here is how the information is
> > stored:

>
> > TABLE: LeagueInfo
> > league_id auto_increment primary key
> > league_name, etc...

>
> > TABLE: Teams
> > team_id auto_increment primary key,
> > teams_league_id (ties to LeagueInfo's league_id)
> > team_name, etc...

>
> > TABLE: Players
> > players_id auto_increment primary key
> > players_team_id (ties to Teams' team_id)
> > players_name, etc...

>
> > TABLE: Stats
> > stats_id auto_increment primary key
> > stats_player_id (ties to Players' player_id)
> > stats_game_id, etc

>
> > Since a lot of the information provided is tied to each other, how can
> > I ensure that when I "duplicate" the entire league, all the
> > appropriate ties stay consistent, and all the new copied information
> > will have the appropriate new auto_incremented fields. For example:

>
> > If I have a league called Football League with 2 teams (Team1 and
> > Team2), and they have 5 players each with varying rows of stats for
> > each player, how can I ensure that the new league (let's call it
> > Basketball League) will easily duplicate all the information.

>
> > The reason I'm doing this is because the program I'm running has the
> > same teams and people join different leagues. All the team and player
> > information stays the same, but they might join another sports league.
> > The problem I found is that each team might change their information
> > JUST SLIGHTLY from league to league. Thus, if the information is
> > copied over, the manager can easily go in and just make those several
> > slight changes as opposed to having to go through the entire lengthy
> > process of entering their team information with each session and each
> > league.

>
> > Hope you all can help and I hope I made some sense. Let me know if
> > there is anything I failed to mention or if something doesn't entirely
> > make sense.

>
> > Thanks,
> > Nino Skilj

>
> Just dump the tables and load them into the new DB


And do it quickly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-28-2008, 10:28 AM
nino9stars@yahoo.com
 
Posts: n/a
Default Re: Is there a quick way to copy database information?

On Oct 13, 4:10 am, strawberry <zac.ca...@gmail.com> wrote:
> On 13 Oct, 09:16, "Paul Lautman" <paul.laut...@btinternet.com> wrote:
>
>
>
> > nino9st...@yahoo.com wrote:
> > > Hello,

>
> > > I have tried searching for this subject, but can never seem to find
> > > exactly what I'm looking for. Here is the situation I have at hand.

>
> > > I want to find a quick (hopefully painless) way to copy information
> > > that I have stored in the database. Here is how the information is
> > > stored:

>
> > > TABLE: LeagueInfo
> > > league_id auto_increment primary key
> > > league_name, etc...

>
> > > TABLE: Teams
> > > team_id auto_increment primary key,
> > > teams_league_id (ties to LeagueInfo's league_id)
> > > team_name, etc...

>
> > > TABLE: Players
> > > players_id auto_increment primary key
> > > players_team_id (ties to Teams' team_id)
> > > players_name, etc...

>
> > > TABLE: Stats
> > > stats_id auto_increment primary key
> > > stats_player_id (ties to Players' player_id)
> > > stats_game_id, etc

>
> > > Since a lot of the information provided is tied to each other, how can
> > > I ensure that when I "duplicate" the entire league, all the
> > > appropriate ties stay consistent, and all the new copied information
> > > will have the appropriate new auto_incremented fields. For example:

>
> > > If I have a league called Football League with 2 teams (Team1 and
> > > Team2), and they have 5 players each with varying rows of stats for
> > > each player, how can I ensure that the new league (let's call it
> > > Basketball League) will easily duplicate all the information.

>
> > > The reason I'm doing this is because the program I'm running has the
> > > same teams and people join different leagues. All the team and player
> > > information stays the same, but they might join another sports league.
> > > The problem I found is that each team might change their information
> > > JUST SLIGHTLY from league to league. Thus, if the information is
> > > copied over, the manager can easily go in and just make those several
> > > slight changes as opposed to having to go through the entire lengthy
> > > process of entering their team information with each session and each
> > > league.

>
> > > Hope you all can help and I hope I made some sense. Let me know if
> > > there is anything I failed to mention or if something doesn't entirely
> > > make sense.

>
> > > Thanks,
> > > Nino Skilj

>
> > Just dump the tables and load them into the new DB

>
> And do it quickly


Actually, I want to copy the same information into the same tables. So
it's like duplicating the data. Think of it like making a copy of a
file in the same folder and renaming it. Or how CVS makes a copy of a
version... That's more along the lines of what I'm going for. Any
ideas?

Nino

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2008, 10:29 AM
strawberry
 
Posts: n/a
Default Re: Is there a quick way to copy database information?

On 24 Oct, 19:10, "nino9st...@yahoo.com" <nino9st...@yahoo.com> wrote:
> On Oct 13, 4:10 am, strawberry <zac.ca...@gmail.com> wrote:
>
>
>
> > On 13 Oct, 09:16, "Paul Lautman" <paul.laut...@btinternet.com> wrote:

>
> > > nino9st...@yahoo.com wrote:
> > > > Hello,

>
> > > > I have tried searching for this subject, but can never seem to find
> > > > exactly what I'm looking for. Here is the situation I have at hand.

>
> > > > I want to find a quick (hopefully painless) way to copy information
> > > > that I have stored in the database. Here is how the information is
> > > > stored:

>
> > > > TABLE: LeagueInfo
> > > > league_id auto_increment primary key
> > > > league_name, etc...

>
> > > > TABLE: Teams
> > > > team_id auto_increment primary key,
> > > > teams_league_id (ties to LeagueInfo's league_id)
> > > > team_name, etc...

>
> > > > TABLE: Players
> > > > players_id auto_increment primary key
> > > > players_team_id (ties to Teams' team_id)
> > > > players_name, etc...

>
> > > > TABLE: Stats
> > > > stats_id auto_increment primary key
> > > > stats_player_id (ties to Players' player_id)
> > > > stats_game_id, etc

>
> > > > Since a lot of the information provided is tied to each other, how can
> > > > I ensure that when I "duplicate" the entire league, all the
> > > > appropriate ties stay consistent, and all the new copied information
> > > > will have the appropriate new auto_incremented fields. For example:

>
> > > > If I have a league called Football League with 2 teams (Team1 and
> > > > Team2), and they have 5 players each with varying rows of stats for
> > > > each player, how can I ensure that the new league (let's call it
> > > > Basketball League) will easily duplicate all the information.

>
> > > > The reason I'm doing this is because the program I'm running has the
> > > > same teams and people join different leagues. All the team and player
> > > > information stays the same, but they might join another sports league.
> > > > The problem I found is that each team might change their information
> > > > JUST SLIGHTLY from league to league. Thus, if the information is
> > > > copied over, the manager can easily go in and just make those several
> > > > slight changes as opposed to having to go through the entire lengthy
> > > > process of entering their team information with each session and each
> > > > league.

>
> > > > Hope you all can help and I hope I made some sense. Let me know if
> > > > there is anything I failed to mention or if something doesn't entirely
> > > > make sense.

>
> > > > Thanks,
> > > > Nino Skilj

>
> > > Just dump the tables and load them into the new DB

>
> > And do it quickly

>
> Actually, I want to copy the same information into the same tables. So
> it's like duplicating the data. Think of it like making a copy of a
> file in the same folder and renaming it. Or how CVS makes a copy of a
> version... That's more along the lines of what I'm going for. Any
> ideas?
>
> Nino


Yep, PL's answer still applies.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:57 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com