I am planning to apply web hosting in godaddy.com they offer 10 databases and 1GB each. I am creating a site that saving a lots of records. My question is:
1) How can I check the database if it is near 1GB ?
2) How can I automatically select the next database if the previous database reached its limit(1GB) ?
3) How can I echo all results(in those 10 databases), that is related to the set
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB", sum( data_free )/ 1024 / 1024 "Free Space in MB" FROM information_schema.TABLES GROUP BY table_schema ;
2) You can't do this automaticly
3) You should write own solution for that. Normaly is something as database shard https://en.wikipedia.org/wiki/Shard_(database_architecture). But is used to scalability large databases configured to work with many nodes.
4) like point 3
But is wrong way at all. They give 10 small databases to separate project not for scaling large one. Writing solution like that by yourself will be more expensive than cost large database and maybe never work fine.