HELP (REPOST)

HELP (REPOST)

am 08.04.2005 21:09:53 von Groves David

Hello,

I'm not sure if I can ask this, but here goes. I'm designing my own db for
my site, and have the following:

Tables:
datasearch
ID=PK county town postcode price;

initialdisplay
ID=PK picture house_type;

maininterior
ID=PK description lounge dinning_room bed_room kitchen
bathroom;

exterior
ID=PK garden_front garden_rear garage conservatory;

additional
ID=PK planning virtual_tour;

customer_base
ID=PK first_name last_name phone fax email;

My problems are: have I broken it down to far?
My search will be by: County, and/or Town, post code and price.

I want an initial display of just, photograph, house type and price. Then
proceeding to full property description. Then should they decide to make and
offer clients details disclosed.

As follows:

1. Form Searched,
2. Initial display (up-to ten per file)
3. Two links, (one picture(two simple hyper-text link))
4. Bring-up main description file, if necessary next-button to proceed to
exterior field and additional field, of database.
5. Make an offer button to proceed to customer field in database.
6. email sent to customer and myself confirming step (5) has been taken,

The problems are, if this is not to many tables, then ID in datasearch table
(which will be auto generated) needs to be entered into all the other
tables to connect them, YES? as the clients will be uploading their own
details how can that be achieved?

Hope some Very, Very kind sole will reply to this, (in the affirmative that
is)

Kind Regards

DG


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: HELP (REPOST)

am 08.04.2005 21:54:47 von Daniel da Veiga

This is off-topic, since this is a win32 MySQL list, and your question
is a design question, not even a technical problem... What you need is
to study a little of how databases work (it seems to me that you see
each table as a page in your web frontend, that is not the best way to
do this), and take a look at some examples (Google is a good way to
find some).

How to do this depends on your web language, your server, the ammount
of data, and a lot of other variables.

Best luck, if you have any problem regarding MySQL on win32, be back
and many of us will be glad to help.

On Apr 8, 2005 4:09 PM, david groves wrote:
> Hello,
>
> I'm not sure if I can ask this, but here goes. I'm designing my own db for
> my site, and have the following:
>
> Tables:
> datasearch
> ID=PK county town postcode price;
>
> initialdisplay
> ID=PK picture house_type;
>
> maininterior
> ID=PK description lounge dinning_room bed_room kitchen
> bathroom;
>
> exterior
> ID=PK garden_front garden_rear garage conservatory;
>
> additional
> ID=PK planning virtual_tour;
>
> customer_base
> ID=PK first_name last_name phone fax email;
>
> My problems are: have I broken it down to far?
> My search will be by: County, and/or Town, post code and price.
>
> I want an initial display of just, photograph, house type and price. Then
> proceeding to full property description. Then should they decide to make and
> offer clients details disclosed.
>
> As follows:
>
> 1. Form Searched,
> 2. Initial display (up-to ten per file)
> 3. Two links, (one picture(two simple hyper-text link))
> 4. Bring-up main description file, if necessary next-button to proceed to
> exterior field and additional field, of database.
> 5. Make an offer button to proceed to customer field in database.
> 6. email sent to customer and myself confirming step (5) has been taken,
>
> The problems are, if this is not to many tables, then ID in datasearch table
> (which will be auto generated) needs to be entered into all the other
> tables to connect them, YES? as the clients will be uploading their own
> details how can that be achieved?
>
> Hope some Very, Very kind sole will reply to this, (in the affirmative that
> is)
>
> Kind Regards
>
> DG
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=danieldaveiga@gmail.com
>
>


--
Daniel da Veiga
Computer Operator - RS - Brazil

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: HELP (REPOST)

am 08.04.2005 22:25:33 von SGreen

--=_alternative 00707C2E85256FDD_=
Content-Type: text/plain; charset="US-ASCII"

"david groves" wrote on 04/08/2005 03:09:53
PM:

> Hello,
>
> I'm not sure if I can ask this, but here goes. I'm designing my own db
for
> my site, and have the following:
>
> Tables:
> datasearch
> ID=PK county town postcode price;
>
> initialdisplay
> ID=PK picture house_type;
>
> maininterior
> ID=PK description lounge dinning_room bed_room kitchen
> bathroom;
>
> exterior
> ID=PK garden_front garden_rear garage conservatory;
>
> additional
> ID=PK planning virtual_tour;
>
> customer_base
> ID=PK first_name last_name phone fax email;
>
> My problems are: have I broken it down to far?
> My search will be by: County, and/or Town, post code and price.
>
> I want an initial display of just, photograph, house type and price.
Then
> proceeding to full property description. Then should they decide to make
and
> offer clients details disclosed.
>
> As follows:
>
> 1. Form Searched,
> 2. Initial display (up-to ten per file)
> 3. Two links, (one picture(two simple hyper-text link))
> 4. Bring-up main description file, if necessary next-button to proceed
to
> exterior field and additional field, of database.
> 5. Make an offer button to proceed to customer field in database.
> 6. email sent to customer and myself confirming step (5) has been taken,
>
> The problems are, if this is not to many tables, then ID in datasearch
table
> (which will be auto generated) needs to be entered into all the other
> tables to connect them, YES? as the clients will be uploading their own
> details how can that be achieved?
>
> Hope some Very, Very kind sole will reply to this, (in the affirmative
that
> is)
>
> Kind Regards
>
> DG
>

Generally, if any two "things" exist in a 1:1 ratio (like a "roof
composition" to a "house") then they usually reside in the same table.
However if you have an n:1 ratio (like the "room"(s) of a "house") then
you create a new table that supports that information (name of room, sqft,
type of flooring, type of ceiling, wall treatments, what floor it's on,
type of closet(if it has one), type of heat(if it gets any), type of
a/c(if it gets any), # of outlets, notes ("this was used as a
photographer's darkroom"), etc.) and link each row on that child (room)
table to the correct row on the parent (house) table. Exceptions may exist
but this is an excellent place to start.

Your basic business "thing" seems to be a "customer" so make a table for
their information. Each customer can list one or more "house" thingies.
Make a table to for them, too. Make sure there is a column on the "house"
table that identifies which customer the house belongs to. Each "house"
thingy contains other things and details (some in 1:1 ratios and some in
n:1 ratios). The 1:1 details probably belong on the "house" (address,
school district, gas company, electric company, etc) table while the n:1
details probably need their own tables (links to photos, room
descriptions, etc.). You probably should list all of the elements of a
generic house and see if you can organize them into general things
("rooms", "yards", "garages", "outbuildings", etc.) and details (year of
construction, number of floors). Each sub-thing gets a table while each
detail shares space on the house table with all of the other details.

Usually, your data storage requirements ARE NOT your application (web
site) design requirements. This is a fact that confuses many new
designers. Many try to work from the front-end backwards to a database
when really the two have totally separate needs. If you have a good
database, you can make your front-end look and behave exactly as you like
because your data will be well-organized and you will be able to get to it
easily. Many sites look nothing like the data that lies behind them.
Databases need to support the data that supports the business. The
front-end makes the data look pretty and makes it useful (formatting
search results, data entry, etc.)

Do a Google for tutorials and articles on "normalization" and you can get
some additional ideas on how to keep your database well-organized.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
--=_alternative 00707C2E85256FDD_=--