{'fraction_non_alphanumeric': 0.015363128491620111, 'fraction_numerical': 0.0, 'mean_word_length': 4.709163346613546, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Extended Tuple Constraint Type in Relational and XML Data Model: Definition and Enforcement

A database management system (DBMS) should provide capabilities for defining and enforcing certain integrity constraints that must hold for the data recorded in the database. These constraints are derived from the semantics of the data and from the rules of the system under study (SuS) that database represents. Every DBMS is based on a data model that provides the means to achieve data abstraction and to express database schema. Each data model has a specific set of integrity constraints types. Some of constraint types are common for several data models and some of them are typical for a data model. Beyond well-known constraint types there are more complex ones that are difficult to express and enforce within the data model. In this paper we deal with the extended tuple constraint (ETC) type. It is the extension of tuple constraint that is one of constraint types of relational data model. In this paper we explain the usage of extended tuple constraint in relational data model and its implementation in relational DBMSs. XML data model does not recognize ETC type. We specify the extended tuple constraint in XML data model and propose two techniques for implementation of ETC in XML DBMSs. Each of them depends on the characteristics of a selected XML DBMS. We use XQuery functions in eXist DBMS, and triggers in Sedna DBMS.