p
This commit is contained in:
31
banque.md
31
banque.md
@@ -389,8 +389,8 @@ erDiagram
|
|||||||
account_holder ||--|{ account : hold
|
account_holder ||--|{ account : hold
|
||||||
currency ||--|{ account : tenu
|
currency ||--|{ account : tenu
|
||||||
exchange_rate }o--|| currency : a
|
exchange_rate }o--|| currency : a
|
||||||
transaction }o--|| operation : contient
|
transaction ||--|{ operation : a
|
||||||
operation }o--|| account : concerne
|
operation }o--|| account : a
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -403,6 +403,33 @@ Voir la syntaxe de [postgreSQL](syntaxe.md)
|
|||||||
|
|
||||||
### 1. Titulaires
|
### 1. Titulaires
|
||||||
|
|
||||||
|
Création de la table `holder`.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
create table holder (
|
||||||
|
"id" bigint primary key generated always as identity,
|
||||||
|
"type" text,
|
||||||
|
"created_at" timestamp
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
- entier sur 64 bits : `bigint`
|
||||||
|
- clé primaire : `primary key`
|
||||||
|
- incrément automatique : `generated always as identity`
|
||||||
|
|
||||||
|
Création de la table `person`.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
create table person (
|
||||||
|
"id" bigint primary key references holder(id),
|
||||||
|
"firstname" text,
|
||||||
|
"lastname" text,
|
||||||
|
"birthdate" date
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- Créer un compte individuel pour _Françoise Zanetti_, née le 12 avril 1995.
|
- Créer un compte individuel pour _Françoise Zanetti_, née le 12 avril 1995.
|
||||||
- Créer une entreprise nommée _Boulangerie de Valorgue_, créée le 19 août 2014, numéro d’immatriculation FR19803269968.
|
- Créer une entreprise nommée _Boulangerie de Valorgue_, créée le 19 août 2014, numéro d’immatriculation FR19803269968.
|
||||||
- Ajouter un nouveau titulaire : _Justin Hébrard_ né le 11/03/1993.
|
- Ajouter un nouveau titulaire : _Justin Hébrard_ né le 11/03/1993.
|
||||||
|
|||||||
Reference in New Issue
Block a user