How do the different CC license elements operate for a CC-licensed database?
Under version 4.0, if an NC license has been applied then any use of the licensed database or its contents that is restricted by copyright law or sui generis database rights requires compliance with the NC term, even if the database is not publicly shared. The other license elements (BY, ND, and SA, as applicable) must be complied with only if your use is so restricted and public sharing is involved. Learn more about how to comply when your use implicates copyright and/or sui generis database rights.
Prior CC license versions do not require compliance with the license restrictions or conditions when only sui generis database rights (and not copyright) are implicated. Please see below for more detail about how this works in the current and prior versions of the licenses.
Can I conduct text/data mining on a CC-licensed database?
Yes. However, you should be aware that whether you have to comply with the CC license terms and conditions will depend on whether the type of mining activity you conduct implicates copyright or any applicable sui generis database rights. If you are not exercising an exclusive right held by the database maker, then you do not need to rely on the license to mine. Because there are many different methods for conducting text and data mining, however, there may be some types of mining activities that will implicate the licensed rights.