Shotwell normally stores its database and photo thumbnails in the directory ~/.shotwell . This directory does not hold photos, but the database in this directory contains a list of all the photos in the Shotwell library.
As an advanced feature, it's possible for you to have multiple Shotwell libraries, each of which has its own set of photos. Each library needs its own database directory. To launch Shotwell with an alternate library, specify an alternate database directory on the command line as follows:
shotwell -d [library-directory]