The MySQL database has two tables: bag table and bag item relationship table.The query is used to find the superset for each bag using SQL.The SQL query involves two layers of loop traversal and requires three layers of nesting combined with JOIN and EXISTS.In contrast, SPL can easily implement the superset finding using two-layer loops combined with intuitive set operations.