You are performing a join which in R is performed using the function merge
merge(db, df)
Using the dplyr
package allows more natural verbs:
library(dplyr)
inner_join(db, df)
or perhaps (if you want non-matches to be shown; see ?left_join
for further information):
left_join(db, df)