AI Glossary / Data engineering and architecture / Advanced
Legal Extension
Definition
A legal extension is a particular state of a relation that satisfies the constraints specified for its schema. In discussions of functional dependencies, it means that the relation's tuples obey the stated dependency set. Extension here refers to the actual collection of tuples, not an extra feature added to software. Legal means permitted by the formal data rules; it does not establish compliance with legislation or prove that every recorded fact is true.
What it means
A schema describes the structure and rules, while an extension supplies the records at a particular point. Several different collections of records can satisfy the same rules. For example, a fictional course relation may require each course identifier to have one title, while allowing many learners to be associated with that course. A dataset that gives the same course identifier conflicting titles violates the dependency. A dataset that consistently uses the wrong title can still satisfy that particular rule. The distinction is between formal consistency with specified constraints and accuracy against the outside world.
How it works
For a functional dependency X determines Y, examine tuples that agree on X and require them to agree on Y. The Database System Concepts authors describe using dependencies both to test an instance and to specify the permissible instances of a schema. They also distinguish a dependency that happens to hold in one dataset from a rule that holds across all legal instances. Consequently, checking today's records is not enough to infer every permanent rule. The domain's meaning determines which dependencies should be required; the instance check then tests whether the supplied records satisfy them.
Three practical examples
- A data-modeling exercise checks whether repeated course identifiers always carry the same title under an explicitly stated dependency.
- A migration review tests a candidate relation state against the agreed constraints before treating the transformed data as acceptable.
- An AI-generated sample dataset is checked for dependency violations so a plausible-looking table does not silently contradict the model used in training materials.
Think of it this way
Imagine several completed crossword grids that must obey the same set of crossing rules. A grid is acceptable with respect to a crossing rule when the shared letters agree. Agreement does not prove that every answer is the intended word. Similarly, a legal relation state satisfies the stated formal conditions, while further checks may be needed to establish meaning, accuracy or completeness.
Worked example
Consider an original relation R(CourseID, Title, LearnerID) with the functional dependency CourseID determines Title. The tuples (C1,Foundations,L1), (C1,Foundations,L2) and (C2,Practice,L1) satisfy it. The two tuples with C1 agree on Title, and the C2 tuple has no conflicting partner. Add (C1,Advanced,L3), and the new extension violates the dependency because C1 now determines two different title values. Replacing that new tuple's title with Foundations removes this particular violation. It does not prove that Foundations is C1's true title. Nor does the dependency require LearnerID to be unique: L1 can appear in both C1 and C2. The example assumes ordinary non-null values and only the stated dependency; other schema constraints could impose additional requirements.
Illustrative case study
In a fictional AI course-content project, an assistant generates tables for database lessons. One table assigns two department names to the same department identifier even though the exercise states that the identifier determines the name. Reviewers add an explicit constraint check and construct one deliberately invalid example for learners to diagnose. They also check whether the valid example teaches the intended distinction, rather than merely containing no repeated identifiers. The scenario illustrates validation against an educational model. It does not claim that automatic dependency checks establish the truth of the fictional departments or replace subject review of the lesson.
Common misconceptions and mistakes
Legal extension does not mean extending a database without breaking the law. It is a technical description of an instance relative to formal constraints. Another mistake is assuming that any dependency observed in a small sample is part of the schema. If every row happens to have a different title, the sample may suggest uniqueness that the business never promised. A functional dependency also expresses determination of values, not causation. Finally, passing a dependency check does not demonstrate completeness, correctness of every value, or satisfaction of constraints that were not included in the check.
Business use
For an AI-assisted migration or data-generation workflow, record which constraints define an acceptable output state. In the fictional course relation, a reviewer can identify exactly which pair of tuples violates the course-to-title rule. Use such counterexamples to make failures understandable and to decide whether the data or the proposed rule is wrong. Test valid repeated values as well as conflicting ones. Keep the validation scope explicit when reporting results: saying that a dataset satisfies specified dependencies is more informative than calling it universally correct. This helps teams distinguish formal checks from broader data-quality assessment.
People also ask
Can many different extensions be legal for one schema?
Yes. Different records can satisfy the same specified constraints.
Does a dependency seen in one sample necessarily hold on the schema?
No. It may be an accidental property of that sample rather than an intended rule.
Does a legal extension prove the data is accurate?
No. Formal consistency and real-world accuracy are different questions.
Check your understanding
Why is the added C1,Advanced,L3 tuple invalid under the toy dependency?
Answer: Another C1 tuple has the title Foundations.
Does L1 appearing in two courses violate CourseID determines Title?
Answer: No. That dependency does not require learner uniqueness.
What does changing Advanced to Foundations establish?
Answer: Satisfaction of that particular dependency in the resulting example, not the truth of the course title.
Related terms
- Relation Instance
- Relation Schema
- Functional dependency
- Integrity Constraint
- legal relation state
- data validation
Learn next
Define a three-attribute relation and one functional dependency. Construct a legal extension with repeated determinant values, then add one tuple that breaks the rule. Identify the exact conflicting pair. Finally, create a dependency that happens to hold in your small sample but should not be assumed as a permanent business rule, and explain the difference.
More in Data engineering and architecture
- Late Binding - Late binding means deferring a binding decision until a program runs.
- Layered queueing network - A layered queueing network is a performance model that represents software services and the resources they use across interacting layers.
- Lean integration - Lean integration applies lean improvement principles to the continuing work of connecting data, applications and business processes.
- Library classification - Library classification is the systematic arrangement of library materials into subject-based classes using an established scheme.
- Linda-like systems - Linda-like systems coordinate concurrent processes through a shared tuple space inspired by the Linda model.
- Linear belief function
Sources
Abraham Silberschatz, Henry F. Korth and S. Sudarshan, Database System Concepts, fifth-edition Chapter 7 slides, functional dependencies and legal relations: https://www.db-book.com/Previous-editions/db5/slide-dir/ch7.pdf The course tuples, crossword analogy and educational-content scenario are original illustrations. The entry uses legal extension in the relational-model sense and limits each validation claim to its specified constraints.
Previous: Lebesgue integral Next: Legendre pseudospectral method