CREATE TABLE Products ( product_id SERIAL PRIMARY KEY, product_name VARCHAR(1000), account_id VARCHAR(100), -- comma-separated list -- . . . );
This chapter explains why using a comma-separated lists to store multivalue data is a bad practice by providing many case:
SELECT * FROM Products WHERE account_id REGEXP '[[:<:]]12[[:>:]]' ;
The solution is to create an intersection table.
The best part of this chapter is that the author is telling you how to think about a specific design is suitable or not. By providing use cases, you can compare two choices of design and consider which one is better.