PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > I'm actually planning the application first instead of coding first!!! :)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
I'm actually planning the application first instead of coding first!!! :)

Réponse
 
LinkBack Outils de la discussion
Vieux 23/10/2007, 15h24   #1
Jason Pruim
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut I'm actually planning the application first instead of coding first!!! :)

Hi Everyone,

So having learned my lesson with the last application, I am trying to
plan out the addition of a feature to my database application.
Basically, some of my customers go south for the winter ("Snow
Birds") what I would like to do is have away of storing both their
addresses in the database, and have it so that the people
administering the list can choose between wether they are up north or
down south without having to erase the old address.

For that I was thinking creating a second table "SnowBirds" and list
their southern addresses in there and then when the list admin clicks
on the edit button for their name, it would also be able to pull up a
list of the the addresses stored and associated with that person.

I'm also considering adding a date range for the addresses so that if
they know they'll be south from November to March it will check the
date and switch between the record accordingly BEFORE exporting to
excel.

Now... I haven't really asked a question yet but gave some background
into what I want to do. Sooooo... Here's the question, does anyone
have any advice on the best way to do it? Am I right in thinking that
a second table is required? Would it be called a Relational database?
Or have I missed the terminology?

Any would be greatly appreciated!

Thanks for looking!

ohhh... and in case it makes a difference it's MySQL 5.* and I'll be
writing the stuff to access that database with php 5.

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@raoset.com



  Réponse avec citation
Vieux 26/10/2007, 04h46   #2
Mathieu Bruneau
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: I'm actually planning the application first instead of coding

Jason Pruim a écrit :
> Hi Everyone,
>
> So having learned my lesson with the last application, I am trying to
> plan out the addition of a feature to my database application.
> Basically, some of my customers go south for the winter ("Snow Birds")
> what I would like to do is have away of storing both their addresses in
> the database, and have it so that the people administering the list can
> choose between wether they are up north or down south without having to
> erase the old address.
>
> For that I was thinking creating a second table "SnowBirds" and list
> their southern addresses in there and then when the list admin clicks on
> the edit button for their name, it would also be able to pull up a list
> of the the addresses stored and associated with that person.
>
> I'm also considering adding a date range for the addresses so that if
> they know they'll be south from November to March it will check the date
> and switch between the record accordingly BEFORE exporting to excel.
>
> Now... I haven't really asked a question yet but gave some background
> into what I want to do. Sooooo... Here's the question, does anyone have
> any advice on the best way to do it? Am I right in thinking that a
> second table is required? Would it be called a Relational database? Or
> have I missed the terminology?
>
> Any would be greatly appreciated!
>
> Thanks for looking!
>
> ohhh... and in case it makes a difference it's MySQL 5.* and I'll be
> writing the stuff to access that database with php 5.
>
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 3251 132nd ave
> Holland, MI, 49424
> www.raoset.com
> japruim@raoset.com
>
>
>

Hi,
Well that's a way to add a second address to your current application.
It may or may not be the best way tough.

I think, the cleanest way of doing it would be to modify your current
existing address table to add a field that say the type of address it
is. Something along the line Type: "Primary, Secondary, Temporary" and
possibly along that date field to keep the information about the date if
needed.

This however changes your join type, meaning that stuff that actually
joins with the address table could now return more than 1 row per user
so you'll have to adjust more code than your initial plan.

So depending of the current size of the application and the
maintenance/upgrade possiblity, you may want to consider other
solutions. This one for example has the advantage to allow you to store
more than 2 types of address along a user and keep all the address in
the same table instead of having 2 tables that store more or less the
same kind of information

Regards,

--
Mathieu Bruneau
aka ROunofF

===
GPG keys available @ http://rounoff.darktech.org
  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 05h36.


Édité par : vBulletin® version 3.7.4
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,09065 seconds with 10 queries