|
Posted by J.O. Aho on 10/09/88 11:48
Frankly wrote:
> "J.O. Aho" <user@example.net> wrote in message
> news:4but6tF13ulrrU1@individual.net...
>> You can make relations in the following way
>>
>> Management table:
>> ManagementID
>> Contact
>> Phone
>> Address
>> Notes
>>
>> Buildings table:
>> BuildingID
>> Building
>> Street
>> CrossStreetA
>> CrossStreetB
>> CommonOutdoorSpace
>> BuildingContact
>> ContactPhone
>> BuildingNote
>> Area
>> ZipCode
>>
>> RelationManagementBuilding table:
>> ManagementID
>> BuildingID
>>
>> It's IMHO easier to join with this method and you can have multiple
>> relations. You can have one row in Management table to be linked to more
>> than one Building, which in it's case can be linked to many Apartments.
>> Your setup limits a one to one relation all the time.
>> One way is to create a ZipTable were you have
>
>
>
> I know I am not the fasted index in a database but are you using the
> relationManagementBuilding table as a linking table to create a Many to Many
> relation?
Yes, thats right, a good idea is to make the ManagementID and BuildingID to be
the primary key, this way you won't get doublets.
> I have been using Access while i wait for my host to upgrade MySQL to the
> current version.
> I am begining to wonder if i should or if i can do that upgrade myself.
If you aren't the admin of the host where you have the web page, then you are
out of luck of updating the mysql.
> I tried this in Access with out any luck. i was able to create a combo box
> in a form with fields for Area and Zipcode.. however when i selected the
> Area it wouldnt automatically bring the zip code. in other forms i was able
> to include fields from other talbes that would get filled according to a
> selection i made in a combo box.
This requires some javascript coding too, if you want the zip code box to be
automatically filled when you entered the area. Otherwise if you allow people
to leave the box empty, you can let the receiving php page to fetch the zip
code (keep in mind that an area may have more than one zip code, so it's
really better to do it the other way around, fill the zip code and let the php
script fetch the area name from the database and then save it into the row).
> If I am able to do the MySQL install on my own I wonder how long it would
> take.
To install things on your own computer won't take long, there are packages for
microsoft that includes apache (web server), php and mysql. For doing
installation on web hotels, you will need to have admin access on them, which
are only for employees on the company hosting the web hotel.
> Because of all the different flavors of SQL like MySQL and how directions
> are version specific i think i would rather just learn SQL.
The base in SQL is the same for most flavors, but they do have things that are
special for them too, but if you learn how to use SQL in MySQL will make it
quite easy for you to work with Oracle too.
> i tried to
> bypass PHPmyAdmin a few times by going straight to the SQL window with
> tutorials nothing seemed to work. I wasnt sure how my current version
> would differ from the latest version so i didnt get into it like i should
> have.
If you are directly in the mysql client, then you get error messages that
tells you where you done something wrong, a major difference with using a
frontend as phpmyadmin is that you need to add ; in the end of your SQL-query
SELECT * FROM Management;
All basic SQL things works fine in all versions of MySQL that you encounter
today (3.x, 4.x and 5.x), while some more advanced things like SUBSELECTION
works only in newer versions.
//Aho
Navigation:
[Reply to this message]
|