I am quite concerned about my table structure, my database is filling up fast and I have a few concerns about the structure of my tables.
I have 5 tables in my database and they are all related to each other. On some occasions it is necessary to search across 3 tables and display the results. I have a primary key (id) on each table which I now think is wrong.
Should I not have 1 primary key only, and the rest as foreign keys. When I tried to run a simple query the other day it did not work and I am wondering if it is becuase of my poor table structure. I ended up producing a very poor work around, which is laughable but does the job. The simple query I tried is below and it caused an error and I am thinking it is becuase of my structure and the use of primary keys.
For example blah blah
select * from table1,table2 where table1.id=table2.id AND id=$id
Will having a poor table structure cause me problems later on and lead to errors?
What is maximum file size of a table in mysql, my hosts use linux redhat I know that their is a difference between os?
The more I look at the tables the more I think, there was no need for that, or for this as it is already covered in the other tables, for example I posted the date across four tables, that was before I learnt how to search two tables so this will definetely be removed as the date is only needed on one table. I dont mind admitting to my bad mistakes, its the only way I learn. I also posted a user password on two tables which again is not needed once I had learnt about searching two tables. lol.
Your help would be greatly appreciated. I dont wont to look at the website one day and find that mysql has gone tits up.