How to determine the MIME types of the files?

I'm making an application, in which I've to upload the files to the database. Now I want to insert into the database the MIME type of the files. Now how can I know that which type of the file is having which MIME type?

where can I get the list of all supported MIME types?

Even if I get the list, then every time I update the file in the database, so every time I have to check the file extension and then insert the MIME type...

this seems to be a tedioius job..

Is there any simple way to do this?

[533 byte] By [harmanjeetsa] at [2007-9-19]
# 1
I could ask "supported by what?" but I assume you will be the one supporting them. Here's a link to the latest list of registered MIME types.
DrClapa at 2007-7-8 > top of java,Core,Core APIs...
# 2
> I could ask "supported by what?" but I assume you will> be the one supporting them. Here's a link to the> latest list of registered MIME types.HERE's the link...ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types
DrClapa at 2007-7-8 > top of java,Core,Core APIs...