I have two tables with this format:
Table 1 - domains
tag0 | tag1 | url | title | domain
Table 2 -favicons
domain | favicon_local
I do a basic join to get the data that I need as such:
const query = `SELECT domains.*, favicons.favicon_local `
+ `FROM domains `
+ `JOIN favicons ON domains.domain=favicons.domain `
+ `ORDER BY domains.tag0`;
I want to create the same table in Mongoose/MongoDB.
How would I do this port. Should I just create a single Schema with all 6 columns?
And then somehow take the JOIN data and insert it directly into Mongoose?