If you have hald running, you can also use its API to get this information. For example:
Code:
hal-get-property --udi $(hal-find-by-property --key block.device --string '/dev/sda') --key storage.drive_type
hal-get-property --udi $(hal-find-by-property --key block.device --string '/dev/sda') --key storage.bus