account_holder ||

This commit is contained in:
2025-11-08 06:15:58 +01:00
parent 1753a067d5
commit e536a97adb
6 changed files with 20 additions and 1788 deletions

View File

@@ -45,32 +45,26 @@ Cela évite les **colonnes inutiles** et permet des **contraintes spécifiques**
La clé étrangère `references holder(id)` dans `person`.
```mermaid
---
config:
layout: elk
look: handDrawn
theme: dark
---
erDiagram
person {
bigint id PK
text firstname
text lastname
date birthdate
}
person {
bigint id PK
text firstname
text lastname
date birthdate
}
company {
bigint id PK
text name
text registration_number
date creation_date
}
company {
bigint id PK
text name
text registration_number
date creation_date
}
holder {
bigint id PK
timestamp creation_date
text type
}
holder {
bigint id PK
timestamp creation_date
text type
}
%% Relations
@@ -101,11 +95,6 @@ erDiagram
date creation_date
}
bank {
bigint id PK
text name
}
holder {
bigint id PK
timestamp creation_date
@@ -128,9 +117,8 @@ erDiagram
person |o--|| holder : is
company |o--|| holder : is
bank |o--|| holder : is
holder }|--|{ account_holder : a
account_holder }|--|{ account : hold
account_holder ||--|{ account : hold
```
### 3. Les opérations
@@ -189,7 +177,7 @@ erDiagram
company |o--|| holder : is
bank |o--|| holder : is
holder }|--|{ account_holder : a
account_holder }|--|{ account : hold
account_holder ||--|{ account : hold
operation }o--|| account : concerne
```
@@ -398,7 +386,7 @@ erDiagram
company |o--|| holder : is
bank |o--|| holder : is
holder }|--|{ account_holder : a
account_holder }|--|{ account : hold
account_holder ||--|{ account : hold
currency ||--|{ account : tenu
exchange_rate }o--|| currency : a
transaction }o--|| operation : contient
@@ -502,8 +490,6 @@ Nous allons donc écrire une **procédure stockée** `create_account` qui vérif
* prend en paramètre :
* `p_iban text`,
* `p_name text`,
* `p_holders int[]` (tableau des identifiants de titulaires),
* `p_shares numeric[]` (tableau des parts correspondantes).