There is a chat, it has group dialogs. And there is one room shared by all users. What is the best way to do when designing a database?
Create a common room with id 1.
Do not add this room to the database, and in other tables refer to it via dialog_id = 0.
I tend to the second method, but then you will not be able to use a foreign key that refers to dialogs.dialog_id.