You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/20-concepts/02-relational.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,7 +203,6 @@ The most common way to interact with relational databases is through the Structu
203
203
When speaking with database programmers and computer scientists, you will often run into different terminologies. Practical database programmers speak of tables and rows while theoretical data modelers may describe the same things as *relations* and *tuples*.
204
204
205
205
:::{table} The difference in terminology used in relational theory and relational databases.
Copy file name to clipboardExpand all lines: book/30-database-design/010-schema.ipynb
+2-44Lines changed: 2 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -3,49 +3,7 @@
3
3
{
4
4
"cell_type": "markdown",
5
5
"metadata": {},
6
-
"source": [
7
-
"---\n",
8
-
"title: Create Schemas\n",
9
-
"authors:\n",
10
-
" - name: Dimitri Yatsenko\n",
11
-
" - date: 2025-01-12\n",
12
-
"---\n",
13
-
"\n",
14
-
"# What is a schema?\n",
15
-
"\n",
16
-
"The term schema has two related meanings in the context of databases:\n",
17
-
"\n",
18
-
"## 1. Schema as a Data Blueprint\n",
19
-
"A **schema** is a formal specification of the structure of data and the rules governing its integrity.\n",
20
-
"It serves as a blueprint that defines how data is organized, stored, and accessed within a database.\n",
21
-
"This ensures that the database reflects the rules and requirements of the underlying business or research project it supports.\n",
22
-
"\n",
23
-
"In structured data models, such as the relational model, a schema provides a robust framework for defining:\n",
24
-
"* The structure of tables (relations) and their attributes (columns).\n",
25
-
"* Rules and constraints that ensure data consistency, accuracy, and reliability.\n",
26
-
"* Relationships between tables, such as primary keys (unique identifiers for records) and foreign keys (references to related records in other tables).\n",
27
-
"\n",
28
-
"### Aims of Good Schema Design\n",
29
-
"* **Data Integrity**: Ensures consistency and prevents anomalies.\n",
30
-
"* **Query Efficiency**: Facilitates fast and accurate data retrieval, supports complex queries, and optimizes database performance.\n",
31
-
"* **Scalability**: Allows the database to grow and adapt as data volumes increase.\n",
32
-
"\n",
33
-
"### Key Elements of Schema Design\n",
34
-
"* **Tables and Attributes**: Each table is defined with specific attributes (columns), each assigned a data type.\n",
35
-
"* **Primary Keys**: Uniquely identify each record in a table.\n",
36
-
"* **Foreign Keys**: Establish relationships between entities in tables.\n",
37
-
"* **Indexes**: Support efficient queries.\n",
38
-
"\n",
39
-
"Through careful schema design, database architects create systems that are both efficient and flexible, meeting the current and future needs of an organization. The schema acts as a living document that guides the structure, operations, and integrity of the database.\n",
40
-
"\n",
41
-
"## 2. Schema as a Database Module\n",
42
-
"\n",
43
-
"In complex database designs, the term \"schema\" is also used to describe a distinct module of a larger database with its own namespace that groups related tables together. \n",
44
-
"This modular approach:\n",
45
-
"* Separates tables into logical groups for better organization.\n",
46
-
"* Avoids naming conflicts in large databases with multiple schemas.\n",
47
-
"\n"
48
-
]
6
+
"source": "---\ntitle: Create Schemas\nauthors:\n - name: Dimitri Yatsenko\n---\n\n# What is a schema?\n\nThe term schema has two related meanings in the context of databases:\n\n## 1. Schema as a Data Blueprint\nA **schema** is a formal specification of the structure of data and the rules governing its integrity.\nIt serves as a blueprint that defines how data is organized, stored, and accessed within a database.\nThis ensures that the database reflects the rules and requirements of the underlying business or research project it supports.\n\nIn structured data models, such as the relational model, a schema provides a robust framework for defining:\n* The structure of tables (relations) and their attributes (columns).\n* Rules and constraints that ensure data consistency, accuracy, and reliability.\n* Relationships between tables, such as primary keys (unique identifiers for records) and foreign keys (references to related records in other tables).\n\n### Aims of Good Schema Design\n* **Data Integrity**: Ensures consistency and prevents anomalies.\n* **Query Efficiency**: Facilitates fast and accurate data retrieval, supports complex queries, and optimizes database performance.\n* **Scalability**: Allows the database to grow and adapt as data volumes increase.\n\n### Key Elements of Schema Design\n* **Tables and Attributes**: Each table is defined with specific attributes (columns), each assigned a data type.\n* **Primary Keys**: Uniquely identify each record in a table.\n* **Foreign Keys**: Establish relationships between entities in tables.\n* **Indexes**: Support efficient queries.\n\nThrough careful schema design, database architects create systems that are both efficient and flexible, meeting the current and future needs of an organization. The schema acts as a living document that guides the structure, operations, and integrity of the database.\n\n## 2. Schema as a Database Module\n\nIn complex database designs, the term \"schema\" is also used to describe a distinct module of a larger database with its own namespace that groups related tables together. \nThis modular approach:\n* Separates tables into logical groups for better organization.\n* Avoids naming conflicts in large databases with multiple schemas."
0 commit comments