Interface de saisie

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.

Structure des données

Attività (es. periodo/descrizione attività svolta da un autore).
Champ Type Flags
id BigAutoField PK Unique
description CharField
start DateField
end DateField
note TextField

Categoria generica per classificare Audience o altri oggetti.
Champ Type Flags
id BigAutoField PK Unique
description CharField Unique

Model for the genre of a comedyArchive.Play.

Unique fields:
- description
Champ Type Flags
id BigAutoField PK Unique
description CharField Unique

Model for a language used in comedyArchive.Play and comedyArchive.Author

Unique fields:
- name
Champ Type Flags
id BigAutoField PK Unique
note TextField
name CharField Unique

Model for the location of an event used in comedyArchive.Event

Unique fields:
- name
Champ Type Flags
id BigAutoField PK Unique
note TextField
name CharField Unique

Professione/Mestiere dell'Author.
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

Model for a state used in comedyArchive.City

Unique fields:
- name
Champ Type Flags
id BigAutoField PK Unique
name CharField Unique

Model to express the level of certainty of a relation like comedyArchive.Title. and comedyArchive.PlayAuthor

Unique fields:
- description
Champ Type Flags
id BigAutoField PK Unique
description CharField Unique
level DecimalField

Model to express the order of some relations :model: `comedyArchive.Representation` having the same foreign key :model: `comedyArchive.Event`

Unique fields:
- description
Champ Type Flags
id BigAutoField PK Unique
description CharField Unique
level PositiveIntegerField

Model for an author.

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

Relational model to link a play to an author.

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

Model for a play

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

Pubblico/platea per un Evento (conteggio, prezzo medio biglietto e categoria).
Champ Type Flags
id BigAutoField PK Unique
number PositiveIntegerField
ticket_price DecimalField
category ForeignKey Index Rel

Relational model to link a play to an event.

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

Relazione tra una Person e una Representation con la descrizione del ruolo svolto.

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

Model for an event.

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

Model for a source.

Unique fields:
- name
Champ Type Flags
id BigAutoField PK Unique
note TextField
name CharField Unique
title CharField
author CharField
link CharField

OriginalTitleModel(id, note, title, certainty)
Champ Type Flags
id BigAutoField PK Unique
note TextField
title CharField
certainty ForeignKey Index Rel

Model for the variant title of a play.
Champ Type Flags
id BigAutoField PK Unique
note TextField
title CharField
certainty ForeignKey Index Rel
play ForeignKey Index Rel
type ForeignKey Index Rel

Model for the kind of contribution of a person to a play of a comedyArchive.PlayAuthor.

Unique fields:
- description
Champ Type Flags
id BigAutoField PK Unique
description CharField Unique

Model for the type of a comedyArchive.Play.

Unique fields:
- description
Champ Type Flags
id BigAutoField PK Unique
description CharField Unique

Model for the type of comedyArchive.Title.

Unique fields:
- description
Champ Type Flags
id BigAutoField PK Unique
description CharField Unique

Model for a city that belongs to a comedyArchive.State used in comedyArchive.Author for the birth_place and death_place

Unique together:
- name and country
Champ Type Flags
id BigAutoField PK Unique
name CharField Unique
country ForeignKey Index Rel