Why are my Photos library database/metadata files being modified even when I'm not using the Photos app?
This is the design of iCloud based photo library storage. There are several daemons that run in the background so you'll want to store your these files in a directory where dropbox doesn't perform any syncronizioaion. 

If you need backup, you can script that and store just the periodic backups in dropbox. 

You likely won't be able to change this behavior as Apple is all in with cloud syncing of data and even if you neutered the processes on this version of 10.12, the next security update or patch will likely re-enable this behavior.

If you really need to track down what's happening, you can open the command line (terminal.app) and use fs_usage to see in real time which processes access the files in question. With sudden app termination and power nap, you may find that the system will start processes to run periodically even when the app itself isn't launched. Similarly, when an app is launched, the process can and will be terminated when the system knows they have no work to do.

The analogy isn't perfect, but several years back, most apps were a manual transmission. Now most Apple apps are automatic transmission - you don't control their launch or exit in many cases - just whether the icon shows in the app switcher and dock.