Hi,
I have come across this:-
https://gist.github.com/nschum/1cf00aee2f1ac8869df4
It is about sometimes the chat.db items are not updated across an updated creating some incompatible files.
This process allows you to, 1) sort out the older files and 2) then merge them (if you have the "right" Darwin version).
As you can see the files are identified as SQL files (lite version) which it seems is on the Mac but only accessible by the System.
I don't know enough about SQL to say if you could "merge" other text data as it were even if you obtained a SQL app.
The three chat.db items seem in some ways to have taken over from the com.apple.iChat.LSSharedFileList.plist file.
This used to hold the details of the Recent Chats you had.
You can no longer Display these lists in Messages (used to be in the File Menu).
However they are more detailed as not only do they contain the iMessages "history" even if you don't Save Chats but they seem to have an index of all the Saved chats even if they are AIM and Jabber (or Yahoo and Bonjour) ones.
You can keep Chats on the iPhone but they will fill up the memory.
How long it takes before this is an issue will depend on what else is stored on your iPhone.
Currently the only way to gain space and "save" the iPhone ones is to extract the text from an iTunes back up and save it as a text file.
This is the Messages Feedback page http://www.apple.com/feedback/ichat.html
It was the iChat one before that.
Apple have never been very good at updating it. (they do best now the page is on the list to update when a new OS version comes out)
It is complicated now by the fact that both Mavericks and Yosemite list Messages as "version 8" whilst there were at least three update during Mavericks and there have been at least one in Yosemite (They no longer give the changes sub set numbers).
Add everything you need to in the free text area.
8:48 p.m. Friday; June 26, 2015
iMac 2.5Ghz i5 2011 (Mavericks 10.9)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
Couple of iPhones and an iPad