Unit testing by mocking the data layer or using embedded database
===

For unit testing is it better to mock the data layer or use an embedded database like derby?

I know that it also depends on the purpose of the testing. But if I go with derby I don't have to mock all the objects and I assume that would be easier. On the other hand I understand that that is more towards integration testing. So which one is more common for unit testing?

Thanks.