This has got to be an easy one.

I want to write a query that shows all database devices (data and log) and their corresponding database. Joining sysdatabases and sysdevices doesn't work as sysdevices does not include the dbid. What am I missing?