In a move intended to strengthen its database-software lineup against rivals Oracle and Microsoft, IBM said on Tuesday it has agreed to buy the database business of Informix for $1 billion in cash.