There are 2 tables. The first is user users who can refer to an unlimited number of entries in the site . It turns out the attitude of many to many when each user belongs to many sites, and each site to many users. How to arrange such links in the form of a table? They say you need to create the 3rd table, but it is not clear how. I would be very grateful for a small but illustrative example. Thank.
CREATE TABLE user ( id SERIAL PRIMARY KEY, name TEXT UNIQUE NOT NULL ); CREATE TABLE site ( id SERIAL PRIMARY KEY, src TEXT UNIQUE NOT NULL );