I've encountered this strange and rather odd (to me) usage of the preposition 'against', which I quite can't grasp as of now. I've tried to look it up in several dictionaries to no avail.


You can't use a ladder unless it is leaning against a wall or tree or some such object.

Likewise you can't use a SQL statement unless you have a database to run it against.

The database supports the SQL statement. The wall supports the ladder.

When I think of it like that against seems a natural choice.


It is a well used idiom in IT.

It is used as a synonym of "towards"

Have a look at some of the comments/answers here

Against and Towards can be same?

  • 2
    I'd not really think of it as a synonym for 'towards', even if such is technically correct - rather, I'd be likely to explain "execute <statement> against a MySQL database" as meaning that "the operations in <statement> should be applied to the data in the MySQL database". Dec 8 '17 at 15:33
  • I have heard both since I started in IT last millennium ;)
    – mplungjan
    Dec 8 '17 at 15:36
  • There are relatively few situations where towards and against are interchangeable, and I would say this is not one of them; in the last twenty years I have heard of things being executed on, in, against, and even under databases, but not towards. You can point some things toward a database, however.
    – choster
    Dec 8 '17 at 16:11
  • Exactly: The word is used as something to point towards the database
    – mplungjan
    Dec 8 '17 at 16:17
  • Towards doesn't really work for me, either. SQL queries can be used to set up, define the structure of, create records in, retrieve data from, change records in, delete records from and drop tables from databases. They can even delete entire database instances. The term against covers all these but towards seems much weaker.
    – BoldBen
    Dec 9 '17 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.