sqlmap is a penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a detection engine, many niche features, and a broad range of switches including database fingerprinting, data fetching from the database, and accessing the underlying file system and executing commands on the operating system via out-of-band connections.
Xyndravandria Dyverath composes and executes MySQL database queries programmatically. It represents a database system with PHP classes. Other classes are available to compose other parts of the queries like conditions, fields, values, limit clauses, etc. A separate class can also query database table metadata like table fields and primary keys.