Documentation des modèles
Cette page présente la manière dont les informations sont organisées dans la base de données,
autrement dit le modèle des données. Cela permet de comprendre comment les données sont
liées les unes aux autres, et donc quelles informations il est possible de connaître avec notre
base de données.
Dans une base de données relationnelle les informations sont organisées dans des tables,
qui correspondent aux objets réels ou virtuels qu'on étudie. Chaque table est décrite par un nom
(comme pièces ou personnes) et par une série d'attributs (comme titre ou
date de naissance) qui la caractérisent et qui ont des contraintes (par exemple, un titre
doit être une série de lettres, et une date doit être une suite de trois numéros).
Certains attributs relient les tables entre elles, en explicitant les relations entre les objets
étudiés. Cela produit une table de relation, ci-dessous celle de la base de données de la
Comédie-Italienne.
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
description |
CharField | – |
start |
DateField | – |
end |
DateField | – |
note |
TextField | – |
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
description |
CharField | Unique |
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
description |
CharField | Unique |
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
name |
CharField | Unique |
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
name |
CharField | Unique |
In precedenza: Occupation (rinominato via migrazione).
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
description |
CharField | Unique |
start |
DateField | – |
end |
DateField | – |
note |
TextField | – |
NB_PARTS |
PositiveIntegerField | – |
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
name |
CharField | Unique |
Unique fields:
-
description| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
description |
CharField | Unique |
level |
DecimalField | – |
Unique fields:
-
description| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
description |
CharField | Unique |
level |
PositiveIntegerField | – |
Unique together:
-
first_name, last_name, birth_date, death_date| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
first_name |
CharField | – |
last_name |
CharField | – |
variant_first_name |
CharField | – |
variant_last_name |
CharField | – |
person_genre |
CharField | – |
language |
ForeignKey | Index Rel |
job |
ForeignKey | Index Rel |
activity |
ForeignKey | Index Rel |
birth_date |
DateField | – |
death_date |
DateField | – |
birth_place |
ForeignKey | Index Rel |
death_place |
ForeignKey | Index Rel |
Unique together:
-
play and author| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
play |
ForeignKey | Index Rel |
author |
ForeignKey | Index Rel |
certainty |
ForeignKey | Index Rel |
kind_of_contribution |
ForeignKey | Index Rel |
Unique fields:
-
original_title| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
original_title |
OneToOneField | Unique Index Rel |
number_of_acts |
PositiveIntegerField | – |
entertainment |
BooleanField | – |
has_prologue |
BooleanField | – |
genre |
ForeignKey | Index Rel |
type |
ForeignKey | Index Rel |
language |
ForeignKey | Index Rel |
edition |
TextField | – |
source |
TextField | – |
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
number |
PositiveIntegerField | – |
ticket_price |
DecimalField | – |
category |
ForeignKey | Index Rel |
Unique together:
-
play and event| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
play |
ForeignKey | Index Rel |
event |
ForeignKey | Index Rel |
representation_order |
ForeignKey | Index Rel |
Unique together:
- representation, person, role
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
representation |
ForeignKey | Index Rel |
person |
ForeignKey | Index Rel |
role |
CharField | – |
certainty |
ForeignKey | Index Rel |
order |
PositiveIntegerField | – |
Unique together:
-
date and location| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
location |
ForeignKey | Index Rel |
date |
DateField | – |
receipts |
PositiveIntegerField | – |
attendance |
PositiveIntegerField | – |
audience |
ForeignKey | Index Rel |
Unique fields:
-
name| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
name |
CharField | Unique |
title |
CharField | – |
author |
CharField | – |
link |
CharField | – |
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
title |
CharField | – |
certainty |
ForeignKey | Index Rel |
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
note |
TextField | – |
title |
CharField | – |
certainty |
ForeignKey | Index Rel |
play |
ForeignKey | Index Rel |
type |
ForeignKey | Index Rel |
Unique fields:
-
description| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
description |
CharField | Unique |
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
description |
CharField | Unique |
| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
description |
CharField | Unique |
birth_place and death_placeUnique together:
-
name and country| Champ | Type | Flags |
|---|---|---|
id |
BigAutoField | PK Unique |
name |
CharField | Unique |
country |
ForeignKey | Index Rel |
