You are here: Re: Learning php Sql « PHP SQL « IT news, forums, messages
Re: Learning php Sql

Posted by Frankly on 06/14/06 15:20

"Frankly" <PHPmySQL1@yahoo.com> wrote in message news:...
>
>
>>> "J.O. Aho" <user@example.net> wrote in message
>>
>> Seattle WA98108,WA98109,...
>>
>> will be slower to search than
>>
>> Seattle WA98108
>> Seattle WA98109
>>
>> and the fist one makes you can't have real relations between the ZipTable
>> and other tables (JOIN won't work), so the later is always a better one.
>>
>>
>>
>> //Aho
>

I started this a couple of days ago and have been away since.

That is how I will do it.
I remember a while back when we talked about the RelationManagementBuildings
table.
I wasnt sure if i should put a primary key there and you replied something
like.
it is a good idea to have "A" primary key in that table. Some of the stuff
I
read says that in some cases it might be better to have both ManagementID
and BuildingsID set as primaries. However you said "A" primary key. I
want to build this database according to what you think is best. do you
think it is better to only use A primary key or should i set both. I am
thinking that the relation table will hold the foreign keys.

in the begining i felt it was better to explore my choices and build tables
from within the Admin. however at this point you are so right. I just
created the tables and here goes.
I am not sure if Management and buildings table should hold the primary keys
or
the relations building should hold both.

time to hold my nose and jump in - now the fun starts. i am a bit nervous
about what I have already forgotten to do
in the tables below. if you feel something looks like i didnt put enough
effort into it please tell me the terms I should look up.

Management Table

ManID - Int Auto unless relations table holds both primary keys.
Name - varchar (45)
Contact - varchar (45)
Phone - Varchar (45)
Address - Varchar (45)
City - varchar (45) default New York
State varchar (2) default NY
ZipCode - Varchar (10)
Website - Varchar (50)

Buildings Table

BuildingID INT Auto
Name - Varchar (45)
Address - varchar ( 50 )
Cross streetA - Varchar 50
Cross StreetB - Varchar 50
WebSite - Varchar 50
Picture - Varchar 50
Elevator- varchar 1
Laundry - varchar 1
Pets - varchar 1 - sometimes they do allow pets that are smaller than 12lbs.
so i am thinking pets comments feild.
pets comments if pets = 1
Gym -varchar 1
video intercome varchar 1
contact varchar 45
contact phone varchar 45
Area varchar 45
Zip Code Varchar 45

RelationManagementBuilding table

ManagementID INT
BuildingID INT

Apartments Table

ApartmentID - int
BuildingID - int
Rent - dec
AptNumber - varchar 6
Bedroom - dec 3
bathroom - dec 3
WebSite varchar 50
Picture varchar 50
Notes - text - there will be 4 picture fields and 1 note field for each
picture.
MoveInDate - Date 0000-00-00
Still Available Varchar 2

ZipArea table
ZipCode varchar 10
Area varchar 45

i feel like i am handing in a very important test and this is the easy part.
how bad did i do.
i know i have forgotten alot of what i read.
after this I am going to look into creating relations using the admin tool.

Thank you
Frank

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация