no, database-testing is outside the scope of TestNG, which is a general purpose testing framework.
However, it gives you a little bit more than JUnit in terms of support for integration/end-to-end tests in general, so you can organize your tests better. Thanks to features like groups, dependent test methods or timeouts, you can make your tests fail fast and have a more precise information about the real bug. TestNG also supports running test methods with many threads which you might find useful.
Book author: Practical Unit Testing with TestNG and Mockito
TestNG itself doesn't support database-related testing, but there's a facility called dbUnit that does. I use dbUnit extensively with jUnit - among other things it allows me to ensure that I have valid JPA QL statements in my DAOs, since QL is interpreted and cannot be validated at compile-time. I also use it at a higher level for testing table interactions.
If I haven't crossed my wires, TestNG is especially popular in conjunction with dbUnit.
An IDE is no substitute for an Intelligent Developer.
Tim Holloway wrote:If I haven't crossed my wires, TestNG is especially popular in conjunction with dbUnit.
In fact dbUnit is closely related to JUnit, however it is possible to use it with TestNG as well. And BTW. you could also try Unitils which, among other impressive stuff, gives some support for database testing.