I am going to start a directory with some categories and for some categories I am going to start a separate databases? For each subcategory I will use a PHPLD script with an SQL database Suppose If there are 100 sub categories I will use 100 databases with 100 PHPLD scripts installed in my webhost server? Will it overload Server?
Yes and no. First, 100 installations of PHPLD in and of itself won't create any more of a load than a single installation service all 100 locations. The real problem comes in the MySQL connection overhead. PHP is pretty good at reusing MySQL connections. If you have a 100 separate databases, you are now changing from what might be say 10 persistant MySQL connections to 100 or more. If the traffic is light, probably no harm done. If the site is busy, you could easily max out MySQL connections or cause a bottleneck there. Why 100 separate databases? Couldn't you use 100 separate sets of tables with different prefixs? Its still a message solution that I wouldn't necessarily recommend, but at least it eliminates the massive number of MySQL connections that could be created with 100 installations of PHPLD.
I think that using seperate tables instead of databases is a much better idea. If the databases are all the same, you could use a single field that separates each directory from the others, and keep them all in the same table, which would be even better yet. The biggest load on mysql is opening new connections. Doing that to a server with 1000 separate databases is going to wreak havoc on it when you get a decent amount of visitors at the same time. Aside from that, it would make managing it a completely daunting task.
The following message came in via PM. I am pasting here and replying here for the benefit of anyone else who is wondering the same thing or may come across this in the future: There are a lot of issues here... Before I answer the core question, let me discuss a few of them... 1. One of the companies I worked for provided a commercial Link Directory/Pay Per Click which sold at that time for between $800 - 3000 depending on which modules and/or options you selected. The database was capable of handling more than 500,000 entries (we loaded the entire DMOZ database onto some of our customer sites). It's all in the design. We used a separate keyword indexing schema so you weren't searching for a word in 3 million entries to provide a search result. We pre-scored links for relevancy so when we did the keyword lookup, we already had a relevance score. Again, It's all in the design. 2. That said, I'm not familiar with the PHPLD table structure and so I can't comment as to what it can or can't handle. It wasn't around when I worked for the other company. All of that aside, here is another consideration... If you have 1,000 databases or even 10,000 separate sets of tables, if the user performs a search in the PHPLD directory as it is now designed, they would only be able to get search results from 1 database or one set of tables. Anything beyond that would require searching multiple databases or sets of tables and would require custom modifications and your server load would go up exponetially for a single search. So, to more directly answer your question, lets make a few assumptions: 1. Let's assume that PHPLD directory CANNOT handle 10,000 categories and 500,000 links in a robust manner and so we need an alternate solution; and 2. Given the option of having say 100 different databases or 1 single database with 100 sets of tables I would say the answer is definitely to have a single database with 100 sets of tables. Remember, in MySQL, each table is a separate file, so its no harder on the server for a single database to have 100 sets of tables or 100 databases to have each 1 set of tables. It's the same space and almost the same memory usage. You might encounter some very slight differences in disk access time but I'd venture to suggest it will be negligible in this setup. You're back to the overhead of having to separately connect to the MySQL server for each different web process and for each different database. This could easily and quickly become a huge bottleneck for the MySQL server and I would venture to suggest would perform far worse than a single database with say 100 sets of tables. Hope you've found the info helpful. I'd prefer to keep the discussion here rather than via PM for the benefit of other users as I'm giving freely of my time and advice to offer this help. If you'd prefer 1 on 1 attention, I'm available for hire (see my signature).
okay also tell me That means you are saying in simple words that more categories cannot be used wiht phpld directory script But I am asking about Freephp directory script (www.freephpdirectoryscript) They say that they have unlimited no of categories That means whether I can have more than 100,000 categories in it and whether it will create any problem?
PHPLD doesn't use separate databases for each category, if that's what you're trying to ask. It's pretty hard to determine server load without knowing a lot of things (traffic, server specs and so on).
I am asking here about freephp directory script ? Because it suppots unlimited categories Yes off course I know it would be very difficult to have more than one categories each having separate databases
Sorry... but as far as I'm concerned, the question is still vague. Are you asking "Does freephp directory script use separate databases for each category?" or are you asking "I am going to use freephp directory script and want to know how to make it use separate databases for each category?" If you're asking the former: I can't see why ANY script would use more than database to store its own data (unless it is intending to share it somehow with other scripts). Now some may use separate database tables for separate categories, but they would be pretty nasty and stupid I would say. If you're asking the latter: I can't see why you would want to do this and so maybe it's best if you explain why you want to...
Freeweb, the problem is there is no simple answer because it depends on a lot of things, particularly on the design of the database, server specs, and server load other than your script/site. I said PHPLD in error. Everything I said is applicable to pretty much any program/setup. It will vary from one to the next.
free php directory script: It is a simple php script and it does not involve complications like PHPLD You can see that at www.freephpdirectoryscript.com Also they say that it supports unlimited no of categories It may be true as they also have OPEN Directory script which is fed by the data from Dmoz
Not sure, your best bet would be to contact free php directory script and ask them. It all goes back to their database design, etc.