You'd probably want to make sure that each file has a unique name. If the name loses meaning to you in the renaming process, since you're using MySQL, you can attach a short description to each file.
As for separating the filename and extension: [man]explode/man
$split_name = explode(".", $filename);