This can be answered visiting the Banshee FAQ page on their website, namely this section of it:
Where does Banshee store configuration files/the library database?
It is stored under ~/.config/banshee-1/. The library database itself is called banshee.db and is a SQLite 3 database.
It is then kept at the home of the user under the folder
/.config/banshee-1/ and its a SQLite3 database.
To be able to open such a file you can use most of the SQL browsers out there that support SQLite3 file database connections.
One of such utilities is
sqlitebrowser, look for it in the Ubuntu Software Center or install the package with
apt-get in a terminal.
I am assuming that if you save the
.db file (just copy it or the complete folder to another location) you will be just able to restore it to a new installation as long as the Banshee versions are not so far apart.