Skype main.db - the difference between chats and conversations

I looked through the Skype main.db database a couple of times, and this is something that I still do not understand. Naturally, this question will be very specific to the Skype structure main.db. (Denial of responsibility)

It seems that I need all the necessary information in the Conversations , Messages , Participants tables.

Table

Message contains the actual log that was specified, the recipient (s), timestamp and foreign key convo_id (although not forced) to connect to the Conversation to which the message belongs.

Conversation exists to store Message aggregates and the contacts in which they participate.

Table

Participants works with many connector tables between the Conversations table and Contacts .

What gets me are the Chats and Chatmembers . Chatmembers works with Chats , that the Participants table works with the Conversations table; connecting contacts and conversations or “chats”.

Which in Chats similar to Conversations , except that it does not have any aggregate in the Message table. It is not possible to map the Messages table to the Chats table to which the message log belongs ( Messages table line).

Chats and Conversations share a foreign key; the Conversations table has a column called chat_dbid that joins the Chats table. But in the Conversations table there are rows with chat_dbid zero, and not all rows in Chats have an id field that corresponds to the chat_dbid field in the Chats table.

The Chats table is still being updated, and I will find out some of the chats or conversations that I recently used based on the timestamp and members in it.

Does anyone know what the Chats table does? Rather, what is the difference and rationale for the Chats table and the Conversations table?

When I was desperately looking for this, I could only find one that talked about the structure of main.db , and that was not very useful.

According to the Chats link

Provides chats in which the user participated.

and Conversations

Provides a list of conversations in which the user participated.

What is their terminology about Chats and Conversations? How do they differ?

It drove me crazy.

+7
source share
2 answers

Yesterday I also looked at the main.db table in skype. Below are my findings.

The conversation table uniquely identifies the conversation with a specific contact (or the contact of the group that you created). A conversation includes all messages: chat messages, voice messages, file transfers, calls that you make with a specific contact. Most tables have links to an entry in this table. The message table has convo__id, the chat table has conv_dbid, Transmissions have convo_id and similar.

Message table: recording messages is not always chats. If the entry is a chat, then its chatname field is populated. Chats and messages seem to have from one to many relationships. chat is a set of messages supported by a specific identifier (most likely, the day is not sure). "type = 61" seems like a normal message: a message entered by the user. Other types seem to be auto-generated messages, for example. msg You get if the call is disconnected.

Hope this helps.

+4
source

Chats seem to be redundant. Messages are grouped into chats as thoughtful, you can have several Chats inside one Conversation, and then some messages outside of Chat. The grouping rules are unclear, perhaps in time.

Grouping is done by setting the chatname field of the chatname bundle to the same value. #SenderId/$TargetId;ChatId names look like #SenderId/$TargetId;ChatId or #SenderId/ChatId for group chat chats.

ChatIds do not seem to have a specific meaning and may be different on different PCs.

Not every chat gets a record in the Chats table: SELECT DISTINCT(chatname) FROM Messages gives much more records than SELECT * FROM Chats . Not everything that enters the chatname is the chat name from Chats. Sometimes this is a conversation identifier (== groupchat id or skypename).

Different instances of Skype also group identical synchronized messages into chats in different ways.

Thus, in general, chats are not important, they group messages arbitrarily, they do not contain any key data about who sent what to whom.

This is how I understand that other tables work:

Contacts is everything whose skypename is listed in the database, even people you never knew (that said something in the group you were listening to at that time). is_permanent denotes those listed in your contact list.

Conversations are a combination of your actual contacts and group activities that you have ever joined. This is what you need to see as a "contact list." If you need contacts, you have never had messages, add Contacts WHERE is_permanent=1 . If you only need current contacts, filter out is_bookmarked or something like that.

It seems that there are no duplicates and sections. One contact = one conversation, one group = one conversation. If you are talking to a contact one-on-one, and you add the other side, the previous messages remain in this “Conversation” contact, and the following receive their own conversation.

Messages are all messages and events ever sent or received:

  • convo_id - always set, always refers to the conversation. Here's how you determine which contact / group you sent messages to.

  • chatname - always install, sometimes refers to a chat from Chats, sometimes to a chat that is not included in chats, sometimes a group identifier or skypename from a conversation. This can mostly be ignored, or you can visually group messages by this field.

  • author , from_name - who sent this message and their nickname at that time was always correctly configured.

  • dialog_partner - very unreliable, different values ​​for the same message on different PCs

  • participant_count - sometimes set, sometimes not, the same as with dialog_partner: unreliable.

  • identities - mentions all skypenames associated with the event, or sometimes not. The rules are unclear, unreliable.

+2
source

All Articles