Jump to content

manitislate

New Members
  • Posts

    4
  • Joined

  • Last visited

manitislate's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You guys are so awesome. Thanks Psyco for the input. It has reinforced the structure I have winded up with (and couldn't have done it without Ofarchades help). b.t.w. - ever notice that every forum always has a user named psycho who is an expert and guru to boot? Is that because Psycotic people are just really smart people, or is it that really smart people always feel a bit psycotic?
  2. Hi Ofarchades, Thanks so much for your help. I think I'm straight now. I was doing some reading on database design and what you have said has really helped me to put all the pieces together. I figured out that what I am trying to do, with letting users pick more than one group, is a many to many relationship (many users to a group and many groups for each user). I wasn't sure if this was that situation, but what you suggested is definately an example of a many to many. Only thing is I saw on this site that you don't need a primary key, you just make each group a primary key: CREATE TABLE `pivot` ( `user_id` varchar(6) NOT NULL default '', `group_id` varchar(6) NOT NULL default '', PRIMARY KEY (`a_id`,`b_id`) } Any way, much thanks again, you saved me a lot of trouble
  3. Hi Ofarchades, Thanks for the help, I knew I was doing something wrong. I think what you suggested will work, I made a few additions: UserTable: UserID, Email, Likes_ID, Group_ID, etc.. AvailabilityTable: Avail_ID, UserID, Day, Hour, Preference LikesTable: Likes_ID, Description Group Table: Group_ID, Name, Meeting_Day, Meeting_Hour So the use would be to make a php script to match users by availability and likes. Once matched, they can be added to the group table and the group id added to their user table. I figured out that if I use military time (2300 = 11 pm) then it shouldn't be a problem if I wish to add 1/4 hours later. I have two concerns now. 1) How could I add another group if the user wished to have 2 groups? 2) Isn't this a lot of linking and searching? If I had a lot of users, wouldn't it run slow? I attached a mock up of the database so far.
  4. Hi guys, I've been thinking about this design for a while and wanted to get a second opinion if anyone would care to share. I think the concept will work, but somehow I think it's just not right. Here is the idea: I want to connect users together into a groups of 5 to 10 people, depending on how many the group would like. They would select what hour works best for them, and what hours are ok for them (sort of a 1-100 scale of preferability). I'm keeping it basic right now, but I would like to have the option of adding user group names, personal likes (like I like fishing), and what not that may come up in the future. Here are the tables I was thinking of making: User: Userid, UserEmail, passwordhash, Availability Days (save day and hour of availability), prefered group size, likes (fishing, diving), likes (other), avatar, etc... Monday: Userid, Hour 1(what value 1-100 user gave for the hour), Hour 2,...Hour 24 Tuesday: Userid, Hour 1....Hour 24 Wed-Sun: same as monday... It apears like it would work, but it just seems cooky. How can I store days of availability with a weight of preferance? Also, what if later I want to add 1/4 hours? Not too good.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.