Hello all,
I wanted to ask for some help. I'm taking a giant step. My goal is to learn about stored procedures, PEAR in php, OOP in php and good DB Design. The project that i choose for myself has all this.
I was hoping if the community here can tell me if im' doing a good job or not or what i should change or consider addign... so here it is.
My Project: I want to create a MYSPACE.COM, FRIENDSTER.COM type of site. I have created over 44 tables, and the most important is below.
The table below was designed to encompass all attributes of other table.. a table of foreign keys...
I figured that when a person signs in, and they perform a search to find people in there area, or people with similar interest, or back ground.. it would access this table.
Would this be a good setup.. Is the table too big and can it slow down my search ? Waht about creating indexes ( i dont know waht this is .. still researching..)
CREATE TABLE TblMemberProfiles (
TblMember_member_id int(11) NOT NULL default '0',
gender int(1) NOT NULL default '0',
birthday int(8) NOT NULL default '0',
zip_code int(5) NOT NULL default '0',
TblCountries_id int(11) NOT NULL default '0',
TblPhotos_id int(11) NOT NULL default '0',
AboutMe blob NOT NULL,
WhoYouWanttoMeet blob NOT NULL,
ReceiveNewslettersandSpecialUpdates int(1) NOT NULL default '0',
ReceiveFriendUpdates int(1) NOT NULL default '0',
DisplayMyBirthdaytoFriends int(1) NOT NULL default '0',
block_list varchar(255) NOT NULL default '',
TblActivityLevel_id int(11) NOT NULL default '0',
TblAppearance_id int(11) NOT NULL default '0',
TblAttractiveFeatures_id int(11) NOT NULL default '0',
TblComplexion_id int(11) NOT NULL default '0',
TblEyeColor_id int(11) NOT NULL default '0',
TblEyeSight_id int(11) NOT NULL default '0',
TblHairColor_id int(11) NOT NULL default '0',
TblUSZipCodes_id int(11) NOT NULL default '0',
TblBody_id int(11) NOT NULL default '0',
TblHeight_id int(11) NOT NULL default '0',
TblExercise_id int(11) NOT NULL default '0',
TblDiet_id int(11) NOT NULL default '0',
TblCareer_id int(11) NOT NULL default '0',
TblOccupation_id int(11) NOT NULL default '0',
TblEducation_id int(11) NOT NULL default '0',
TblIncome_id int(11) NOT NULL default '0',
TblLanguage_id int(11) NOT NULL default '0',
TblMaritalStatus_id int(11) NOT NULL default '0',
TblChildren_id int(11) NOT NULL default '0',
TblFavouriteActivities_id int(11) NOT NULL default '0',
TblFavouriteCuisines_id int(11) NOT NULL default '0',
TblFavouriteMusic_id int(11) NOT NULL default '0',
TblFavouritePlaces_id int(11) NOT NULL default '0',
TblFavouriteReading_id int(11) NOT NULL default '0',
TblPersonalityTraits_id int(11) NOT NULL default '0',
TblPhysicalActivites_id int(11) NOT NULL default '0',
TblOutgoing_id int(11) NOT NULL default '0',
TblPreferTo_id int(11) NOT NULL default '0',
TblPolitics_id int(11) NOT NULL default '0',
TblPreference_id int(11) NOT NULL default '0',
TblReligiousBelief_id int(11) NOT NULL default '0',
TblDrinking_id int(11) NOT NULL default '0',
TblSmoking_id int(11) NOT NULL default '0',
TblWeight_id int(11) NOT NULL default '0',
PRIMARY KEY (TblMember_member_id)
) TYPE=MyISAM;