I worked at place where we were very SEO friendly.
If you are using Apache look up mod_rewrite to take your
actual URL and rewrite it to something that looks like directory
level stuff:
Here is a wiki link that can get you started.
http://en.wikipedia.org/wiki/Mod_rewrite
But honestly if you are just doing ?id=5 you should be fine.
It is only when you have an large URL with variables and ampersands
that you start seeing Search Engine depreciation for you your site.
Plus search engines change there algorithms regularly, that means
you would have to see what they prefer and keep up with them. You
would better spend your efforts on page content, unless your site
is amazingly big....
Frank