A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearHelp me for creating huge database in Mysql - page 1
User InfoPosts
Help me for creating huge database in Mysql#1
We are building a website for business on global wise, for every country major cities are covered in this concept.

I need some suggestions from PHP Mysql People.

Can i create single databse for all cities or multiple databases. Because in this system contains some relations between cities ,every chamber need nearly 50 tables for networking and some other tables.

If I can create separate databases for every chamber there would be nearly 50*1000 tables need because we have 1000 cities.

So Please give suggestions how can i build database for my system.

Thank you
Ravi

posted date: 2009-04-13 22:38:00


Re: Help me for creating huge database in Mysql#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-13 22:38:01


Re: Help me for creating huge database in Mysql#3
What's a chamber? Are you implying you'd create one table per city?

posted date: 2009-04-13 22:51:00


Re: Help me for creating huge database in Mysql#4
After reading your question the only suggestion I can give you is to revise your knowledge about databases... I think you are missing something... the web can help you on this.Anyway if you have 2 object City and Chamber you need 2 tables:Table1: citiesRelation: 1-nTable2: chambers

posted date: 2009-04-13 22:57:00


Re: Help me for creating huge database in Mysql#5
Avoid database designs with fluid table numbers. Tables aren(t rows. It doesn(t make sense to have a new table for every city. Cities each have a name, a location, and a lot of other shared properties relevant to your business. It doesn(t make sense to have a bunch of tables that share the exact same structure. I suggest you create a table for countries a table for cities and another table for a (chamber(. Associate each city with a country. If you(re expecting of working with thousands of cities, well that(s fine. A table in MySQL can easily handle thousands of rows without using up a lot of your servers resources. If there(s something unique about each city, that would require variable fields, you might want to do this differently, but there(s probably never a need to create thousands of tables.

posted date: 2009-04-13 22:59:00


Re: Help me for creating huge database in Mysql#6
relational database design dictates: just one database. splitting your data up over multiple databases may be - under certain circumstances - an option for a performance hack applied by a pro who exactly knows what he does (but neither you nor i are), but normally it just complicates the situation and makes the system slower and harder to maintain.the question is: do you even need dirty performance hacks? having thousands of cities is not a performance problem per se, it all depends on good indices, the server(s), tuning, workload, ...

posted date: 2009-04-13 23:04:00


Re: Help me for creating huge database in Mysql#7
You need to normalize what is the same, irrespective of the city. Or chamber. One way to think of this is to look at all the distinct entities you need. Obviously (city( is one of them. There should be no reason you can(t use one table to represent all the cities. Okay, so now you can identify which city a chamber is in with one more field. So now all chambers can be in one table. This also provides a way to say a chamber belongs to only one city, but a city can have more than one chamber. This is called a one-to-many relationship.Relationships between the same types of object (e.g. cities) is more complex. You need to define quite what the relationship is: specifically what it(s called and what each side is called. If you need a many-to-many relationship, i.e a city is connected to several other cities, you will need another table to list those relationships. Exploring this is a little beyond the scope of this answer box, so I recommend you find a good book or web page about database design, specifically about normalization.

posted date: 2009-04-13 23:08:00


Re: Help me for creating huge database in Mysql#8
Chamber nothing but city,Yes

posted date: 2009-04-13 23:37:00


Re: Help me for creating huge database in Mysql#9
are chambers and cities the same thing, so one chamber per city?

posted date: 2009-04-13 23:41:00


Re: Help me for creating huge database in Mysql#10
I have encouraged people on several questions to start learning some more, never gotten a single point for it :-) But I might as well reward ohter people for bringing the bad news, grtz.

posted date: 2009-04-13 23:44:00


Re: Help me for creating huge database in Mysql#11
yes one chamber per city

posted date: 2009-04-14 00:27:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.