PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > Is there a quick way to copy database information?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Is there a quick way to copy database information?

Réponse
 
LinkBack Outils de la discussion
Vieux 13/10/2007, 01h05   #1
nino9stars@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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 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

  Réponse avec citation
Vieux 13/10/2007, 10h16   #2
Paul Lautman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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 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


  Réponse avec citation
Vieux 13/10/2007, 13h10   #3
strawberry
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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 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

  Réponse avec citation
Vieux 24/10/2007, 20h10   #4
nino9stars@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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 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

  Réponse avec citation
Vieux 25/10/2007, 00h18   #5
strawberry
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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 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.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 00h44.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,19224 seconds with 13 queries