Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 7th, 2003, 06:24 PM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to thecharking
creating google like subdirectories

alright so I wondering,
For such places as google, yahoo, different directories on the web, how are they made? IE, I want to make a directory, maybe called People. Now I want to make sure people can find specific people, say, jennifer aniston. Now I don't want to have to make a a jennifer aniston directory. I just want it if I need it. Should I just let a user create a new directory? Is there some way to sort information easily, putting multiple entries into one place? Or is this jsut something I should set up when I make the directory?
Thanks for your help guys.
__________________
hey it's the CHARKING

Last edited by thecharking : September 8th, 2003 at 08:41 PM.

Reply With Quote
  #2  
Old September 8th, 2003, 07:51 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Use a database. That's all there is too it.

Reply With Quote
  #3  
Old September 8th, 2003, 08:40 PM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to thecharking
thanks

yes, I was going to usea database anyway, I jsut meant for the presenting of the data. I think I am jsut going to make the different areas manually at start up, and try to be broad enough that I don't have to add many more. Thank you though. Oh and sorry, I just realized my post title {hope someone sees this} was way too broad. Sorry.

Reply With Quote
  #4  
Old September 8th, 2003, 08:52 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Presententation of the data? Not really clear what you mean. A good a navigation system, and search engine is all you will really need.

Reply With Quote
  #5  
Old September 9th, 2003, 02:23 AM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to thecharking
sorry

man i am not being specific lately eh? sorry about that. what I meant was...

let's say I have a database row table called tv. In this I have a row called people.

but lets say there are many posts put into people, all the same type, lets say three for jennifer aniston. Although I imagine the table would remian the same
(
just $name=jennifer aniston;
mysql_query("SELECT * FROM tv WHERE people= '" . $name . "'");
then show the results...
)

I want the users to see subdirectories, such as,

people > jennifer aniston

I actually just had an idea: would this be done by count? just runa query and see if there are maybe 5 or more entries that are equal? If so, I jsut thought a problem with that:
When the user loads the page, unless they are searching for a particular person (jennifer aniston), it can't compare db values can it? Because it can't say if($count) >= 5, do this... I can't word it right I don't think, I hope you understand what I mean by this. It has no inital thing to compare to, to count against. So... is this the right way of doing it? I jsut thought of it, so I am doubtful. Thanks for your help so far, hope I cleared up what I meant.

Reply With Quote
  #6  
Old September 9th, 2003, 02:54 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
What kind of info are you storing on each person? Say you wanted to store a list of actors, and movies, and what movies each actor had been in.
You would have a seperate table for people, it would look something like:
TABLE: people
personid
fname
lname
description

TABLE: movies (only hold movie info)
movieid
movie_name
description

TABLE: people_movies (the bridging table)
movieid
personid

Then, to see what movies Jennifer Anniston has been in, you'd perform a query which JOINS the movies and people_movies tables
Code:
SELECT movie_name
FROM movies m INNER JOIN
people_movies pm ON m.movieid = pm.movieid
WHERE pm.personid = X
(where X is jennifer's ID)

Reply With Quote
  #7  
Old September 9th, 2003, 03:33 PM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to thecharking
thanks again

interesting idea, but I'm not sure if that's what I'm going for. Although I think it will come in handy later on. I'm really just looking to make things consolidate as they are entered, really has not much to do with the db I don't think...

A google search for jennifer aniston brought up this catagory:

Arts > Celebrities > A > Aniston, Jennifer

Now, I can see that it wouldn't be too hard to set it up to have an arts section, and then celebrities, and even a, as the alphabet is pretty generic, but it seemed crazy to me that google manually entered information to make a subdirectory for jennifer aniston. I hope you get me now... maybe I didn't understand your last post. Bu what I'm getting at I think is an appearance setting... maybe it's jsut a table called A that stores different names, and hers was stored after so many queries maybe?

Reply With Quote
  #8  
Old September 9th, 2003, 05:57 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Google wouldn't actually store "A" any where in their system. It would purely be a presentation thing. As I mentioned, there would still be a people table. The data is presented like this:
SELECT DISTINCT substr(fname,1) FROM people
to get a first-letter listing.

You need to think about how your DB would be designed so that data is normalised (no redundancy). Having a table just containing the letters of the alphabet is redundant.

Reply With Quote
  #9  
Old September 10th, 2003, 04:39 AM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to thecharking
correct

okay, yeah an alphabet table would be pretty ridiculous.
I was wondering, I haven't used JOIN before really in queries, I am still quite new at php. Is there a reason with the "movies m" and "people_movies pm" in the query? I've never seen this abbrieviated letters after selecting the table.
But I think I am still lost on the directory system, sorry. I can see how it would be easy to get a first letter listing. But I don't understand how thes elinks are made! Ahh the frsutration.

Reply With Quote
  #10  
Old September 10th, 2003, 05:14 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Forget about the directory structure stuff. It only exists because of the database. It's purely a presentation type thing.

Join's are a major part of database design - I strongly recommend that you grab a book on database building. You won't get far without it.

The abbreviation after my table names are called aliases. They are simply used as a shortcut to referring to your tables later on (e.g. "m.movieid = pm.movieid WHERE pm.personid").

Reply With Quote
  #11  
Old September 14th, 2003, 11:32 PM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to thecharking
thinking about it

okay so i thought about this some more, and put it off, and then thought about it more, and I think I have an idea.

Maybe I'm missing the point, but I think this would work, too.

The user goes into virtual dir. in site.

this displays letters a-z. these are not db related; just dislayed. But when clicked, the db query is searching for items LIKE %#.
Maybe use substring. Anyway, not important right now.

This displays catagories that begin with a, WHICH I THINK are achieved by simply searching through the diff rows for words that begin with a and then making a count of it. If words are over a certain limit (like 50), then that is a catagory, and so on.

Is this it? or will this work? Thanks for the reply's I really appreciate them. And I suppose I'll need to buy a php/mysql book; I jsut haven't run into a problem I can't solve yet( with help oc), although I bet I could make my scripts MUCH better. I jsut rewrote a few scripts into one page because they were all similar; but the error checking was TEDIOUS. Any way, thanks.

Reply With Quote
  #12  
Old September 14th, 2003, 11:52 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Are you now talking about something else? I'm not really following. We've established that for your system to be setup neatly, you'll need a table for people, and perhaps a table for movies.

You mentioned categories. What are these? What are they related to? What functionality do they bring to the site.

Doing '%%' searches is ineffiecient, and the way describe using them to gather your categories sounds like a bit of a hack. i.e - not maintainable, no structure.

Honestly, as system such as this can only really be built with a solid database sturcture underneath, in order for it to be maintable, normalised, efficient, etc.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Development > hope people see this


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT