{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T04:16:25Z","timestamp":1750220185949,"version":"3.41.0"},"reference-count":27,"publisher":"Association for Computing Machinery (ACM)","issue":"1","license":[{"start":{"date-parts":[[2022,5,31]],"date-time":"2022-05-31T00:00:00Z","timestamp":1653955200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["SIGMOD Rec."],"published-print":{"date-parts":[[2022,5,31]]},"abstract":"<jats:p>Since the early days of relational databases, it was realized that acyclic hypergraphs give rise to database schemas with desirable structural and algorithmic properties. In a bynow classical paper, Beeri, Fagin, Maier, and Yannakakis established several different equivalent characterizations of acyclicity; in particular, they showed that the sets of attributes of a schema form an acyclic hypergraph if and only if the local-to-global consistency property for relations over that schema holds, which means that every collection of pairwise consistent relations over the schema is globally consistent. Even though real-life databases consist of bags (multisets), there has not been a study of the interplay between local consistency and global consistency for bags. We embark on such a study here and we first show that the sets of attributes of a schema form an acyclic hypergraph if and only if the local-to-global consistency property for bags over that schema holds. After this, we explore algorithmic aspects of global consistency for bags by analyzing the computational complexity of the global consistency problem for bags: given a collection of bags, are these bags globally consistent? We show that this problem is in NP, even when the schema is part of the input. We then establish the following dichotomy theorem for fixed schemas: if the schema is acyclic, then the global consistency problem for bags is solvable in polynomial time, while if the schema is cyclic, then the global consistency problem for bags is NP-complete. The latter result contrasts sharply with the state of affairs for relations, where, for each fixed schema, the global consistency problem for relations is solvable in polynomial time.<\/jats:p>","DOI":"10.1145\/3542700.3542719","type":"journal-article","created":{"date-parts":[[2022,6,1]],"date-time":"2022-06-01T22:10:16Z","timestamp":1654121416000},"page":"78-85","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Structure and Complexity of Bag Consistency"],"prefix":"10.1145","volume":"51","author":[{"given":"Albert","family":"Atserias","sequence":"first","affiliation":[{"name":"Universitat Polit\u00e8cnica de Catalunya Barcelona, Catalonia Spain"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Phokion G.","family":"Kolaitis","sequence":"additional","affiliation":[{"name":"UC Santa Cruz and IBM Research Santa Cruz, California USA"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2022,6]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-41660-6_2"},{"key":"e_1_2_1_2_1","first-page":"113","article-title":"From quantum mechanics to logic, databases, constraints, and complexity","author":"Abramsky S.","year":"2014","unstructured":"S. Abramsky . Contextual semantics : From quantum mechanics to logic, databases, constraints, and complexity . Bull. EATCS , 113 , 2014 . S. Abramsky. Contextual semantics: From quantum mechanics to logic, databases, constraints, and complexity. Bull. EATCS, 113, 2014.","journal-title":"Bull. EATCS"},{"key":"e_1_2_1_3_1","first-page":"211","volume-title":"24th EACSL Annual Conference on Computer Science Logic, CSL 2015","author":"Abramsky S.","year":"2015","unstructured":"S. Abramsky , R. S. Barbosa , K. Kishida , R. Lal , and S. Mansfield . Contextuality, cohomology and paradox . In 24th EACSL Annual Conference on Computer Science Logic, CSL 2015 , pages 211 -- 228 , 2015 . S. Abramsky, R. S. Barbosa, K. Kishida, R. Lal, and S. Mansfield. Contextuality, cohomology and paradox. In 24th EACSL Annual Conference on Computer Science Logic, CSL 2015, pages 211--228, 2015."},{"key":"e_1_2_1_4_1","volume-title":"A unified sheaf-theoretic account of non-locality and contextuality. CoRR, abs\/1102.0264","author":"Abramsky S.","year":"2011","unstructured":"S. Abramsky and A. Brandenburger . A unified sheaf-theoretic account of non-locality and contextuality. CoRR, abs\/1102.0264 , 2011 . S. Abramsky and A. Brandenburger. A unified sheaf-theoretic account of non-locality and contextuality. CoRR, abs\/1102.0264, 2011."},{"key":"e_1_2_1_5_1","first-page":"1","volume-title":"Proc. 8th Intern. Workshop on Quantum Physics and Logic, QPL 2011","volume":"95","author":"Abramsky S.","year":"2011","unstructured":"S. Abramsky , S. Mansfield , and R. S. Barbosa . The cohomology of non-locality and contextuality . In Proc. 8th Intern. Workshop on Quantum Physics and Logic, QPL 2011 , volume 95 of EPTCS, pages 1 -- 14 , 2011 . S. Abramsky, S. Mansfield, and R. S. Barbosa. The cohomology of non-locality and contextuality. In Proc. 8th Intern. Workshop on Quantum Physics and Logic, QPL 2011, volume 95 of EPTCS, pages 1--14, 2011."},{"key":"e_1_2_1_6_1","volume-title":"Consistency, acyclicity, and positive semirings. CoRR, abs\/2009.09488","author":"Atserias A.","year":"2020","unstructured":"A. Atserias and P. G. Kolaitis . Consistency, acyclicity, and positive semirings. CoRR, abs\/2009.09488 , 2020 . To appear in a volume dedicated to Samson Abramsky in the series Outstanding Contributions to Logic. A. Atserias and P. G. Kolaitis. Consistency, acyclicity, and positive semirings. CoRR, abs\/2009.09488, 2020. To appear in a volume dedicated to Samson Abramsky in the series Outstanding Contributions to Logic."},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/3452021.3458329"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.5555\/1286643.1286659"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/2402.322389"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1103\/PhysicsPhysiqueFizika.1.195"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/800105.803397"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/153850.153856"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.orl.2005.09.008"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/1265530.1265535"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1016\/0020-0190(80)90114-3"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/211414.211419"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1137\/S0097539790191010"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/319628.319630"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/3375395.3387645"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/3294052.3319689"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1137\/S0097539702403803"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/329.318580"},{"key":"e_1_2_1_23_1","first-page":"115","volume-title":"Structures in Constructive Mathematics and Mathematical Logic","author":"Tseitin G. S.","year":"1968","unstructured":"G. S. Tseitin . On the complexity of derivation in propositional calculus . Structures in Constructive Mathematics and Mathematical Logic , pages 115 -- 125 , 1968 . G. S. Tseitin. On the complexity of derivation in propositional calculus. Structures in Constructive Mathematics and Mathematical Logic, pages 115--125, 1968."},{"key":"e_1_2_1_24_1","first-page":"10","volume-title":"Proc. of the ACM Symposium on Principles of Database Systems","author":"Ullman J. D.","year":"1982","unstructured":"J. D. Ullman . The U.R. strikes back . In Proc. of the ACM Symposium on Principles of Database Systems , pages 10 -- 22 , 1982 . J. D. Ullman. The U.R. strikes back. In Proc. of the ACM Symposium on Principles of Database Systems, pages 10--22, 1982."},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1137\/1107014"},{"key":"e_1_2_1_26_1","volume-title":"Algorithms and complexity (2. ed.). A K Peters","author":"Wilf H. S.","year":"2002","unstructured":"H. S. Wilf . Algorithms and complexity (2. ed.). A K Peters , 2002 . H. S. Wilf. Algorithms and complexity (2. ed.). A K Peters, 2002."},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/235666.235670"}],"container-title":["ACM SIGMOD Record"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3542700.3542719","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3542700.3542719","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T19:02:22Z","timestamp":1750186942000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3542700.3542719"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,5,31]]},"references-count":27,"journal-issue":{"issue":"1","published-print":{"date-parts":[[2022,5,31]]}},"alternative-id":["10.1145\/3542700.3542719"],"URL":"https:\/\/doi.org\/10.1145\/3542700.3542719","relation":{},"ISSN":["0163-5808"],"issn-type":[{"type":"print","value":"0163-5808"}],"subject":[],"published":{"date-parts":[[2022,5,31]]},"assertion":[{"value":"2022-06-01","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}