Some web applications require interaction with mobile devices. A key ingredient when writing such application for mobile devices is figuring out which device "talks" with our server, serve it with best fit markup, and make correct business-logic decisions (i.e. send the correct video format, setup package, etc.)
There are several tools that help us to cope with these challenges, all of them are built on top of a database (mostly XML files) which contains a mapping between devices and User Agents.