Where to put a database in case of IP failover? I understand that to achieve some level of availability of an online application it is possible to organize an environment with a redundancy using an IP failover mechanism and switching between several identical servers in the event a problem arises in any one of them.

But what about with databases? Should the database be on each server with some sort of replication data between them or should it sit on its own dedicated server?

What approach usually is used in SQL Server 2008 R2 or SQL Server 2008 R2 Express?
You'll want to put the SQL Server on its own server.  You may also need to protect the SQL Server from reboots or failed hardware by looking at an HA solution.  You can use Clustering (which requires shared storage), or database mirroring (with or without a witness), or peer to peer replication.