Alright well, I'm a college student majoring in CS, and database administration has always triggered an interest, I love how in depth it can get just storing data and setting up the best possible ways to access it, archiving databases, securing them from your own end, etc.
Well I've been working on a fairly large project in PHP/MySQL - Using codeigniter, and well I've been dealing with databases for a while and I understand the concept of foreign keys, except I've yet to be able to implement them, for example, if I have a table users, and a table posts, I'll simply put author_id field in the posts table. So when I need to select a users posts, I can do a join query, or whatever. Now after discussing the concept of it with one of my professors, she said as a general rule of thumb, before 10,000 records, I really shouldn't have to worry about optimizing a database to the fullest, however I should still plan out tables well.
So I have a series of tables in my latest projects, and using the profiling tools in codeigniter, the most complicated of queries is showing in the .0010's of seconds (ten thousandths I believe :-/). So should I really be worried about optimizing my database, and if so, how would the concept of foreign keys help speed/efficiency? She also told me to seriously look into indexing, however I read some things that said it causes general overhead in the database server.
I see the forum has a lot of great minds, so any input would definitely be beneficial, any at all. Thank you.