🧠Second Brain
Search
Relational Model
The relational model is an approach to managing data using a structure and language consistent with first-order predicate logic, first described in 1969 by English computer scientist Edgar F. Codd, where all data is represented in terms of tuples, and grouped into relations.
Opposite Data Modeling techniques to Dimensional Modeling where relational model usually applied on the OLTP database and dimensional on OLAP or other analytics close solutions.
It’s the theoretical foundation of Relational Databases.
# Key terms
Term | Description |
---|---|
Relation | Equivalent to a table; a set of tuples with the same attributes. |
Tuple | A single row in a table, representing a single item or entity. |
Attribute | Corresponds to a column in a table, with a specific data type. |
Domain | The set of all possible values an attribute can have. |
Primary Key | A unique identifier for each tuple in a relation. No duplicate values are allowed. |
Foreign Key | An attribute that links two tables, referring to the primary key in another table. |
Schema | The formal description of a database’s structure, including tables, fields, relationships, views, and indexes. |
Cardinality | The number of elements in a set, or the number of tuples in a relation. |
Degree | The number of attributes in a relation. |
Integrity Constraints | Rules to ensure accuracy and consistency of data across the database. |
View | A virtual table based on the result set of a query. Does not physically store data. |
# Translation Layer (ORM)
If you use a relational model, and you use a Object-Oriented Programming languages, usually you need an akwardly layer that translates bettwen the relational model to the object-oriented model.
Usually these are called ORMs
Origin:
References:
Created 2023-03-22