Frank-readresolve / itp3-file-storage

Projet de groupe, service de stockage defichiers
2 stars 0 forks source link

Create Contact Role, design data model #37

Open milena-771 opened 1 year ago

milena-771 commented 1 year ago

Related feature: #3

Physical model

Technical id? computed columns? primary, foreign and unique keys naming conventions, types and precisions, null constraints...

Lindsay92 commented 1 year ago

MCD :

Image

MLD :

Image

Voici notre physical model (no script) table : contact_roles contact_role_code CHAR(5) NOT NULL UNIQUE contact_role_name VARHAR(100) NOT NULL UNIQUE

MPD (update customer)

CREATE TABLE customers ( id SERIAL, customer_number INTEGER NOT NULL UNIQUE, customer_name VARCHAR(100) NOT NULL UNIQUE, first_name VARCHAR(100) NOT NULL, last_name VARCHAR(100) NOT NULL, email VARCHAR(255) NOT NULL UNIQUE, consent BOOLEAN, role_id INTEGER, CONSTRAINT pk_customer_id PRIMARY KEY(id), CONSTRAINT fk_roles_id FOREIGN KEY(role_id) REFERENCES roles(id)

);