diff --git a/docs/developer/refactoring/README.txt b/docs/developer/refactoring/README.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e5a3065b8da91803ff2d37d0b17aad8943a6c633
--- /dev/null
+++ b/docs/developer/refactoring/README.txt
@@ -0,0 +1,99 @@
+Purpose of README to help understand content for refactoring of Naming.
+
+    from     naming-convention-tool    (database, backend, frontend)
+    to       naming-backend            (database, backend)
+
+    The purpose of Naming is to handle Naming of ESS wide physical and logical devices according to ESS Naming Convention.
+
+    Naming backend is a web application implemented as a REST style web service backed by a relational database.
+    The web service is implemented as a Spring Boot application and the database is available as PostgreSQL.
+
+----------------------------------------------------------------------------------------------------
+
+About
+    Mainly documentation for refactoring of naming-convention-tool (existing Naming).
+    Naming backend captures and contains functionality in naming-convention-tool with belonging database.
+    Functionality is transformed into refactored database and backend with REST API.
+
+    1. Background and motivation, followed by database investigation, design, reviews, proof-of-concept (theoretical), migration scripts.
+
+        database suggestion 4 selected for further work
+        see     folder(s)     background_thoughts_database
+
+    2. Early proof-of-concept implementation, performance measurements (and comparisons of REST API performance with different Java versions), preparing presentation.
+
+        see     folder(s)     presentation, prototype
+
+    3. Looking into architecture and expanding proof-of-concept implementation and having presentation and reviews.
+
+        see     folder(s)     architecture, implementation
+
+    4. Expanding sketches and design for frontend, REST API, backend.
+
+        see     folder(s)     planning, rest_api, templates, ui
+
+
+    Understanding
+        One way to better understand application and refactoring is to examine naming-convention-tool from different perspectives.
+            Concepts - what is System structure, Device structure, Name
+            UI       - what is available in UI, menu options in particular, and what it means in terms of server interaction
+            Database - how are structures stored
+            Frontend and backend can not readily be separated
+            See
+                background_thoughts_database
+                planning/what_and_how.txt
+
+    Note
+        While documentation is past, present and future, it is also work-in-progress and may change.
+        Proof-of-concept implementation in close cooperation with existing Naming.
+
+    See also
+        ESS Naming convention
+            https://chess.esss.lu.se/enovia/link/ESS-0000757/21308.51166.45568.45993/valid
+        Git repositories
+            https://gitlab.esss.lu.se/ics-software/naming-convention-tool         (Naming         - existing)
+            https://gitlab.esss.lu.se/ics-software/naming-backend                 (Naming backend - refactored)
+
+----------------------------------------------------------------------------------------------------
+
+Folders, sub folders and key files
+
+    architecture                                            (folder)
+        naming_next_gen_rest_api                                (ods)
+        naming_refactoring_architecture                         (odg, pdf)
+    background_thoughts_database                            (folder)
+        database_diagrams                                       (odg, pdf)
+        database_diagrams_add_on                                (odg, pdf)
+        naming_thoughts_of_refactoring                          (odt, pdf + folders Appendix A1-A5, B1-B2)
+    implementation                                          (folder)
+        http_status_codes                                       (txt)
+        naming_simplification_restapi_beans                     (txt)
+    planning                                                (folder)
+        pictures                                                (folder)
+            existing                                                (folder)
+            refactoring                                             (folder)
+        design_frontend_restapi_backend                         (odg, pdf)
+        refactoring_tasks                                       (ods)
+        what_and_how                                            (txt)
+    presentation                                            (folder)
+        Naming_refactoring                                      (pdf, pptx)
+    prototype                                               (folder)
+        performance_measurement                                 (folder)
+            naming_existing_refactored_times                        (xlsx)
+            script_index                                            (txt)
+    rest_api                                                (folder)
+        endpoints                                               (folder)
+            naming_rest_api                                         (ods)
+            naming_rest_api_refactored                              (ods, xlsx)
+        naming_concepts_and_terminology                         (odt, pdf)
+        naming_rest_api_brief_introduction                      (odt, pdf)
+    templates                                               (folder)
+        test                                                    (folder)
+        NameElementCommand                                          (xlsx)
+        StructureElementCommand                                     (xlsx)
+    ui                                                      (folder)
+        naming_ui_thoughts_sketches                             (odg, pdf)
+        ui_thoughts                                             (txt)
+
+----------------------------------------------------------------------------------------------------
+
diff --git a/docs/developer/refactoring/architecture/naming_next_gen_rest_api.ods b/docs/developer/refactoring/architecture/naming_next_gen_rest_api.ods
new file mode 100644
index 0000000000000000000000000000000000000000..c5694fc07bef02b2f58662cc372b16c35277781b
Binary files /dev/null and b/docs/developer/refactoring/architecture/naming_next_gen_rest_api.ods differ
diff --git a/docs/developer/refactoring/architecture/naming_refactoring_architecture.odg b/docs/developer/refactoring/architecture/naming_refactoring_architecture.odg
new file mode 100644
index 0000000000000000000000000000000000000000..b7f98c6d29a1e27fbe5e5f09c761b4f352e10621
Binary files /dev/null and b/docs/developer/refactoring/architecture/naming_refactoring_architecture.odg differ
diff --git a/docs/developer/refactoring/architecture/naming_refactoring_architecture.pdf b/docs/developer/refactoring/architecture/naming_refactoring_architecture.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..c92fdb6bac3d2a44f2ff071a4f80c9e9ded8c6c4
Binary files /dev/null and b/docs/developer/refactoring/architecture/naming_refactoring_architecture.pdf differ
diff --git a/docs/developer/refactoring/background_throughts_database/Appendix_A1/V1__Initial.sql b/docs/developer/refactoring/background_throughts_database/Appendix_A1/V1__Initial.sql
new file mode 100644
index 0000000000000000000000000000000000000000..cb960e1f00d7bbab44e20698a5959796f18d7e88
--- /dev/null
+++ b/docs/developer/refactoring/background_throughts_database/Appendix_A1/V1__Initial.sql
@@ -0,0 +1,378 @@
+SET statement_timeout = 0;
+SET client_encoding = 'UTF8';
+SET standard_conforming_strings = on;
+SET check_function_bodies = false;
+SET client_min_messages = warning;
+SET search_path = public, pg_catalog;
+SET default_tablespace = '';
+SET default_with_oids = false;
+
+--
+-- Name: appinfo; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE appinfo (
+    id bigint NOT NULL,
+    version integer,
+    schemaversion integer NOT NULL
+);
+
+
+--
+-- Name: appinfo_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE appinfo_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: appinfo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE appinfo_id_seq OWNED BY appinfo.id;
+
+
+--
+-- Name: device; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE device (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255)
+);
+
+
+--
+-- Name: device_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE device_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: device_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE device_id_seq OWNED BY device.id;
+
+
+--
+-- Name: devicerevision; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE devicerevision (
+    id bigint NOT NULL,
+    version integer,
+    additionalinfo character varying(255),
+    conventionname character varying(255),
+    conventionnameeqclass character varying(255),
+    deleted boolean NOT NULL,
+    instanceindex character varying(255),
+    requestdate timestamp without time zone,
+    device_id bigint,
+    devicetype_id bigint,
+    requestedby_id bigint,
+    section_id bigint
+);
+
+
+--
+-- Name: devicerevision_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE devicerevision_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: devicerevision_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE devicerevision_id_seq OWNED BY devicerevision.id;
+
+
+--
+-- Name: namepart; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE namepart (
+    id bigint NOT NULL,
+    version integer,
+    nameparttype character varying(255),
+    uuid character varying(255)
+);
+
+
+--
+-- Name: namepart_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE namepart_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: namepart_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE namepart_id_seq OWNED BY namepart.id;
+
+
+--
+-- Name: namepartrevision; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE namepartrevision (
+    id bigint NOT NULL,
+    version integer,
+    deleted boolean NOT NULL,
+    description character varying(255),
+    mnemonic character varying(255),
+    mnemoniceqclass character varying(255),
+    name character varying(255),
+    processdate timestamp without time zone,
+    processorcomment character varying(255),
+    requestdate timestamp without time zone,
+    requestercomment character varying(255),
+    status character varying(255),
+    namepart_id bigint,
+    parent_id bigint,
+    processedby_id bigint,
+    requestedby_id bigint
+);
+
+
+--
+-- Name: namepartrevision_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE namepartrevision_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: namepartrevision_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE namepartrevision_id_seq OWNED BY namepartrevision.id;
+
+
+--
+-- Name: useraccount; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE useraccount (
+    id bigint NOT NULL,
+    version integer,
+    role character varying(255),
+    username character varying(255)
+);
+
+
+--
+-- Name: useraccount_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE useraccount_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: useraccount_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE useraccount_id_seq OWNED BY useraccount.id;
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY appinfo ALTER COLUMN id SET DEFAULT nextval('appinfo_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY device ALTER COLUMN id SET DEFAULT nextval('device_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY devicerevision ALTER COLUMN id SET DEFAULT nextval('devicerevision_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY namepart ALTER COLUMN id SET DEFAULT nextval('namepart_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY namepartrevision ALTER COLUMN id SET DEFAULT nextval('namepartrevision_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY useraccount ALTER COLUMN id SET DEFAULT nextval('useraccount_id_seq'::regclass);
+
+
+--
+-- Name: appinfo_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+--
+
+ALTER TABLE ONLY appinfo
+    ADD CONSTRAINT appinfo_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: device_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+--
+
+ALTER TABLE ONLY device
+    ADD CONSTRAINT device_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: devicerevision_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+--
+
+ALTER TABLE ONLY devicerevision
+    ADD CONSTRAINT devicerevision_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: namepart_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+--
+
+ALTER TABLE ONLY namepart
+    ADD CONSTRAINT namepart_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: namepartrevision_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+--
+
+ALTER TABLE ONLY namepartrevision
+    ADD CONSTRAINT namepartrevision_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: useraccount_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+--
+
+ALTER TABLE ONLY useraccount
+    ADD CONSTRAINT useraccount_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: fk_3f26vetemhujfdm9q74ecr2u5; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY namepartrevision
+    ADD CONSTRAINT fk_3f26vetemhujfdm9q74ecr2u5 FOREIGN KEY (namepart_id) REFERENCES namepart(id);
+
+
+--
+-- Name: fk_4ucnoos7kd8s1gaqbpwm1xptq; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY devicerevision
+    ADD CONSTRAINT fk_4ucnoos7kd8s1gaqbpwm1xptq FOREIGN KEY (requestedby_id) REFERENCES useraccount(id);
+
+
+--
+-- Name: fk_9vomfk9x1jow27ifx6xc62c5x; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY namepartrevision
+    ADD CONSTRAINT fk_9vomfk9x1jow27ifx6xc62c5x FOREIGN KEY (processedby_id) REFERENCES useraccount(id);
+
+
+--
+-- Name: fk_9xs5oy86lf0j8ukpjokjipeke; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY namepartrevision
+    ADD CONSTRAINT fk_9xs5oy86lf0j8ukpjokjipeke FOREIGN KEY (requestedby_id) REFERENCES useraccount(id);
+
+
+--
+-- Name: fk_d3ocbsb4tl4ttnusn98khq148; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY devicerevision
+    ADD CONSTRAINT fk_d3ocbsb4tl4ttnusn98khq148 FOREIGN KEY (devicetype_id) REFERENCES namepart(id);
+
+
+--
+-- Name: fk_l7kklb4mxixjs27nsso6shone; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY devicerevision
+    ADD CONSTRAINT fk_l7kklb4mxixjs27nsso6shone FOREIGN KEY (section_id) REFERENCES namepart(id);
+
+
+--
+-- Name: fk_l9r1givkfaiol5or2lnr324xp; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY devicerevision
+    ADD CONSTRAINT fk_l9r1givkfaiol5or2lnr324xp FOREIGN KEY (device_id) REFERENCES device(id);
+
+
+--
+-- Name: fk_lufxqy46l9eiq55d445rbukag; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY namepartrevision
+    ADD CONSTRAINT fk_lufxqy46l9eiq55d445rbukag FOREIGN KEY (parent_id) REFERENCES namepart(id);
+
+
+--
+-- Name: public; Type: ACL; Schema: -; Owner: -
+--
+
+REVOKE ALL ON SCHEMA public FROM PUBLIC;
+REVOKE ALL ON SCHEMA public FROM postgres;
+GRANT ALL ON SCHEMA public TO postgres;
+GRANT ALL ON SCHEMA public TO PUBLIC;
+
+
+INSERT INTO appinfo (version, schemaversion) VALUES (1,1);
diff --git a/docs/developer/refactoring/background_throughts_database/Appendix_A1/V2__Commit_Msg_to_Device.sql b/docs/developer/refactoring/background_throughts_database/Appendix_A1/V2__Commit_Msg_to_Device.sql
new file mode 100644
index 0000000000000000000000000000000000000000..acbe8e16f8d0263d724f8af9cfbac516cbf2d6f0
--- /dev/null
+++ b/docs/developer/refactoring/background_throughts_database/Appendix_A1/V2__Commit_Msg_to_Device.sql
@@ -0,0 +1 @@
+ALTER TABLE devicerevision ADD processorcomment varchar(255) NULL;
diff --git a/docs/developer/refactoring/background_throughts_database/Appendix_A1/V3__Notification_CC_List.sql b/docs/developer/refactoring/background_throughts_database/Appendix_A1/V3__Notification_CC_List.sql
new file mode 100644
index 0000000000000000000000000000000000000000..f694a06165c87fc235ed227147238086212a123a
--- /dev/null
+++ b/docs/developer/refactoring/background_throughts_database/Appendix_A1/V3__Notification_CC_List.sql
@@ -0,0 +1,6 @@
+CREATE TABLE user_notification (
+	id bigserial NOT NULL,
+	notification_type varchar(32) NOT NULL,
+	user_login_name varchar(32) NOT NULL,
+	CONSTRAINT user_notification_pk PRIMARY KEY (id)
+);
\ No newline at end of file
diff --git a/docs/developer/refactoring/background_throughts_database/Appendix_A2/script_notes_2_id.txt b/docs/developer/refactoring/background_throughts_database/Appendix_A2/script_notes_2_id.txt
new file mode 100644
index 0000000000000000000000000000000000000000..84572f0b06b38198c234cb7e2829d5ab36ea58e2
--- /dev/null
+++ b/docs/developer/refactoring/background_throughts_database/Appendix_A2/script_notes_2_id.txt
@@ -0,0 +1,571 @@
+-- --------------------------------------------------------------------------------
+-- About
+--     migration script
+--     postgresql 9.6.7
+-- Content
+--     structure
+--     data
+--     index
+--     primary key
+--     foreign key
+-- --------------------------------------------------------------------------------
+-- structure
+-- --------------------------------------------------------------------------------
+CREATE TABLE namepartrevision_systemgroup (
+    id bigint NOT NULL,
+    version integer,
+    namepart_id bigint,
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+CREATE TABLE namepartrevision_system (
+    id bigint NOT NULL,
+    version integer,
+    namepart_id bigint,
+    parent_namepart_id bigint,
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_subsystem (
+    id bigint NOT NULL,
+    version integer,
+    namepart_id bigint,
+    parent_namepart_id bigint,
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE namepartrevision_discipline (
+    id bigint NOT NULL,
+    version integer,
+    namepart_id bigint,
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_devicegroup (
+    id bigint NOT NULL,
+    version integer,
+    namepart_id bigint,
+    parent_namepart_id bigint,
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_devicetype (
+    id bigint NOT NULL,
+    version integer,
+    namepart_id bigint,
+    parent_namepart_id bigint,
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE devicerevision_device(
+    id bigint NOT NULL,
+    version integer,
+    device_id bigint,
+    namepartrevision_systemgroup_namepart_id bigint,
+    namepartrevision_system_namepart_id bigint,
+    namepartrevision_subsystem_namepart_id bigint,
+    namepartrevision_devicetype_namepart_id bigint,
+    instanceIndex character varying(255),
+    conventionName character varying(255),
+    conventionNameEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+-- level 1
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_systemgroup (
+    id,
+    version,
+    namepart_id,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr1.id, npr1."version", npr1.namepart_id, npr1."name", npr1.mnemonic, npr1.mnemoniceqclass, npr1.description, npr1.status, npr1.deleted, 
+npr1.requestdate, ua_r.username as requestedBy, npr1.requestercomment, npr1.processdate, ua_p.username as processedBy, npr1.processorcomment 
+from namepartrevision npr1 
+inner join namepart np1 on npr1.namepart_id = np1.id
+left join useraccount ua_r on npr1.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr1.processedby_id = ua_p.id 
+where np1.nameparttype = 'SECTION' and npr1.parent_id is null;
+
+insert into namepartrevision_discipline (
+    id,
+    version,
+    namepart_id,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr1.id, npr1."version", npr1.namepart_id, npr1."name", npr1.mnemonic, npr1.mnemoniceqclass, npr1.description, npr1.status, npr1.deleted, 
+npr1.requestdate, ua_r.username as requestedBy, npr1.requestercomment, npr1.processdate, ua_p.username as processedBy, npr1.processorcomment 
+from namepartrevision npr1 
+inner join namepart np1 on npr1.namepart_id = np1.id
+left join useraccount ua_r on npr1.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr1.processedby_id = ua_p.id 
+where np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null;
+-- --------------------------------------------------------------------------------
+-- level 2
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_system (
+    id,
+    version,
+    namepart_id,
+    parent_namepart_id,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr2.id, npr2."version", npr2.namepart_id, npr2.parent_id, 
+npr2."name", npr2.mnemonic, npr2.mnemoniceqclass, npr2.description, 
+npr2.status, npr2.deleted, npr2.requestdate, ua_r.username as requestedBy, npr2.requestercomment, npr2.processdate, ua_p.username as processedBy, npr2.processorcomment 
+from namepartrevision npr2
+inner join namepart np2 on npr2.namepart_id = np2.id
+left join useraccount ua_r on npr2.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr2.processedby_id = ua_p.id 
+where np2.nameparttype = 'SECTION' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'SECTION' and npr1.parent_id is null);
+
+insert into namepartrevision_devicegroup (
+    id,
+    version,
+    namepart_id,
+    parent_namepart_id,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr2.id, npr2."version", npr2.namepart_id, npr2.parent_id, 
+npr2."name", npr2.mnemonic, npr2.mnemoniceqclass, npr2.description, 
+npr2.status, npr2.deleted, npr2.requestdate, ua_r.username as requestedBy, npr2.requestercomment, npr2.processdate, ua_p.username as processedBy, npr2.processorcomment 
+from namepartrevision npr2
+inner join namepart np2 on npr2.namepart_id = np2.id
+left join useraccount ua_r on npr2.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr2.processedby_id = ua_p.id 
+where np2.nameparttype = 'DEVICE_TYPE' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null);
+-- --------------------------------------------------------------------------------
+-- level 3
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_subsystem (
+    id,
+    version,
+    namepart_id,
+    parent_namepart_id,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr3.id, npr3."version", npr3.namepart_id, npr3.parent_id, 
+npr3."name", npr3.mnemonic, npr3.mnemoniceqclass, npr3.description, 
+npr3.status, npr3.deleted, npr3.requestdate, ua_r.username as requestedBy, npr3.requestercomment, npr3.processdate, ua_p.username as processedBy, npr3.processorcomment 
+from namepartrevision npr3 
+inner join namepart np3 on npr3.namepart_id = np3.id
+left join useraccount ua_r on npr3.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr3.processedby_id = ua_p.id 
+where np3.nameparttype = 'SECTION' and npr3.parent_id in 
+(
+select npr2.namepart_id from namepartrevision npr2, namepart np2 where npr2.namepart_id = np2.id and np2.nameparttype = 'SECTION' and npr2.parent_id in 
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'SECTION' and npr1.parent_id is null)
+);
+
+insert into namepartrevision_devicetype (
+    id,
+    version,
+    namepart_id,
+    parent_namepart_id,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr3.id, npr3."version", npr3.namepart_id, npr3.parent_id, 
+npr3."name", npr3.mnemonic, npr3.mnemoniceqclass, npr3.description, 
+npr3.status, npr3.deleted, npr3.requestdate, ua_r.username as requestedBy, npr3.requestercomment, npr3.processdate, ua_p.username as processedBy, npr3.processorcomment 
+from namepartrevision npr3 
+inner join namepart np3 on npr3.namepart_id = np3.id
+left join useraccount ua_r on npr3.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr3.processedby_id = ua_p.id 
+where np3.nameparttype = 'DEVICE_TYPE' and npr3.parent_id in 
+(
+select npr2.namepart_id from namepartrevision npr2, namepart np2 where npr2.namepart_id = np2.id and np2.nameparttype = 'DEVICE_TYPE' and npr2.parent_id in 
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null)
+);
+-- --------------------------------------------------------------------------------
+-- data
+-- --------------------------------------------------------------------------------
+-- notes
+-- --------------------------------------------------------------------------------
+-- select count(dr.*) from devicerevision dr, device d where dr.device_id = d.id and dr.devicetype_id is null;
+-- 30
+-- --------------------------------------------------------------------------------
+-- device with 1st level system structure parent
+-- --------------------------------------------------------------------------------
+-- select count(dr.*) from devicerevision dr, device d where dr.device_id = d.id and dr.devicetype_id is null
+-- and dr.section_id in 
+-- (
+-- select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id is null
+-- );
+-- 3
+-- --------------------------------------------------------------------------------
+-- device with 2nd level system structure parent
+-- --------------------------------------------------------------------------------
+-- select count(dr.*) from devicerevision dr, device d where dr.device_id = d.id and dr.devicetype_id is null
+-- and dr.section_id in 
+-- (
+-- select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in 
+--     (
+--     select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id is null
+--     )
+-- );
+-- 12
+-- --------------------------------------------------------------------------------
+-- device with 3rd level system structure parent
+-- --------------------------------------------------------------------------------
+-- select count(dr.*) from devicerevision dr, device d where dr.device_id = d.id and dr.devicetype_id is null
+-- and dr.section_id in 
+-- (
+-- select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in 
+--     (
+--     select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id in 
+--         (
+--         select np3.id from namepart np3, namepartrevision npr3 where np3.id = npr3.namepart_id and npr3.parent_id is null
+--         )
+--     )
+-- );
+-- 75
+-- --------------------------------------------------------------------------------
+-- device
+-- --------------------------------------------------------------------------------
+-- level 1
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    device_id,
+    namepartrevision_systemgroup_namepart_id,
+    namepartrevision_system_namepart_id,
+    namepartrevision_subsystem_namepart_id,
+    namepartrevision_devicetype_namepart_id,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, dr.device_id, 
+dr.section_id, 
+null, 
+null, 
+dr.devicetype_id, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id is null
+);
+
+-- --------------------------------------------------------------------------------
+-- level 2
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    device_id,
+    namepartrevision_systemgroup_namepart_id,
+    namepartrevision_system_namepart_id,
+    namepartrevision_subsystem_namepart_id,
+    namepartrevision_devicetype_namepart_id,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, dr.device_id, 
+null, 
+dr.section_id, 
+null, 
+dr.devicetype_id, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in 
+    (
+    select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id is null
+    )
+);
+-- --------------------------------------------------------------------------------
+-- level 3
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    device_id,
+    namepartrevision_systemgroup_namepart_id,
+    namepartrevision_system_namepart_id,
+    namepartrevision_subsystem_namepart_id,
+    namepartrevision_devicetype_namepart_id,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, dr.device_id, 
+null, 
+null, 
+dr.section_id, 
+dr.devicetype_id, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in 
+    (
+    select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id in 
+        (
+        select np3.id from namepart np3, namepartrevision npr3 where np3.id = npr3.namepart_id and npr3.parent_id is null
+        )
+    )
+);
+-- --------------------------------------------------------------------------------
+-- index
+-- --------------------------------------------------------------------------------
+CREATE INDEX namepartrevision_systemgroup_id_idx ON public.namepartrevision_systemgroup (id);
+CREATE INDEX namepartrevision_systemgroup_namepart_id_idx ON public.namepartrevision_systemgroup (namepart_id);
+CREATE INDEX namepartrevision_systemgroup_mnemonic_idx ON public.namepartrevision_systemgroup (mnemonic);
+CREATE INDEX namepartrevision_systemgroup_status_idx ON public.namepartrevision_systemgroup (status);
+
+CREATE INDEX namepartrevision_system_id_idx ON public.namepartrevision_system (id);
+CREATE INDEX namepartrevision_system_namepart_id_idx ON public.namepartrevision_system (namepart_id);
+CREATE INDEX namepartrevision_system_parent_namepart_id_idx ON public.namepartrevision_system (parent_namepart_id);
+CREATE INDEX namepartrevision_system_mnemonic_idx ON public.namepartrevision_system (mnemonic);
+CREATE INDEX namepartrevision_system_status_idx ON public.namepartrevision_system (status);
+
+CREATE INDEX namepartrevision_subsystem_id_idx ON public.namepartrevision_subsystem (id);
+CREATE INDEX namepartrevision_subsystem_namepart_id_idx ON public.namepartrevision_subsystem (namepart_id);
+CREATE INDEX namepartrevision_subsystem_parent_namepart_id_idx ON public.namepartrevision_subsystem (parent_namepart_id);
+CREATE INDEX namepartrevision_subsystem_mnemonic_idx ON public.namepartrevision_subsystem (mnemonic);
+CREATE INDEX namepartrevision_subsystem_status_idx ON public.namepartrevision_subsystem (status);
+
+CREATE INDEX namepartrevision_discipline_id_idx ON public.namepartrevision_discipline (id);
+CREATE INDEX namepartrevision_discipline_namepart_id_idx ON public.namepartrevision_discipline (namepart_id);
+CREATE INDEX namepartrevision_discipline_mnemonic_idx ON public.namepartrevision_discipline (mnemonic);
+CREATE INDEX namepartrevision_discipline_status_idx ON public.namepartrevision_discipline (status);
+
+CREATE INDEX namepartrevision_devicegroup_id_idx ON public.namepartrevision_devicegroup (id);
+CREATE INDEX namepartrevision_devicegroup_namepart_id_idx ON public.namepartrevision_devicegroup (namepart_id);
+CREATE INDEX namepartrevision_devicegroup_parent_namepart_id_idx ON public.namepartrevision_devicegroup (parent_namepart_id);
+CREATE INDEX namepartrevision_devicegroup_mnemonic_idx ON public.namepartrevision_devicegroup (mnemonic);
+CREATE INDEX namepartrevision_devicegroup_status_idx ON public.namepartrevision_devicegroup (status);
+
+CREATE INDEX namepartrevision_devicetype_id_idx ON public.namepartrevision_devicetype (id);
+CREATE INDEX namepartrevision_devicetype_namepart_id_idx ON public.namepartrevision_devicetype (namepart_id);
+CREATE INDEX namepartrevision_devicetype_parent_namepart_id_idx ON public.namepartrevision_devicetype (parent_namepart_id);
+CREATE INDEX namepartrevision_devicetype_mnemonic_idx ON public.namepartrevision_devicetype (mnemonic);
+CREATE INDEX namepartrevision_devicetype_status_idx ON public.namepartrevision_devicetype (status);
+
+CREATE INDEX devicerevision_device_id_idx ON public.devicerevision_device (id);
+CREATE INDEX devicerevision_device_device_id_idx ON public.devicerevision_device (device_id);
+CREATE INDEX devicerevision_device_namepartrevision_systemgroup_namepart_id_idx ON public.devicerevision_device (namepartrevision_systemgroup_namepart_id);
+CREATE INDEX devicerevision_device_namepartrevision_system_namepart_id_idx ON public.devicerevision_device (namepartrevision_system_namepart_id);
+CREATE INDEX devicerevision_device_namepartrevision_subsystem_namepart_id_idx ON public.devicerevision_device (namepartrevision_subsystem_namepart_id);
+CREATE INDEX devicerevision_device_namepartrevision_devicetype_namepart_id_idx ON public.devicerevision_device (namepartrevision_devicetype_namepart_id);
+CREATE INDEX devicerevision_device_conventionname_idx ON public.devicerevision_device (conventionname);
+CREATE INDEX devicerevision_device_status_idx ON public.devicerevision_device (status);
+-- --------------------------------------------------------------------------------
+-- primary key
+-- --------------------------------------------------------------------------------
+ALTER TABLE public.namepartrevision_systemgroup ADD CONSTRAINT namepartrevision_systemgroup_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_system ADD CONSTRAINT namepartrevision_system_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_subsystem ADD CONSTRAINT namepartrevision_subsystem_pk PRIMARY KEY (id);
+
+ALTER TABLE public.namepartrevision_discipline ADD CONSTRAINT namepartrevision_discipline_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_devicegroup ADD CONSTRAINT namepartrevision_devicegroup_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_devicetype ADD CONSTRAINT namepartrevision_devicetype_pk PRIMARY KEY (id);
+
+ALTER TABLE public.devicerevision_device ADD CONSTRAINT devicerevision_device_pk PRIMARY KEY (id);
+-- --------------------------------------------------------------------------------
+-- foreign key
+-- --------------------------------------------------------------------------------
+ALTER TABLE public.namepartrevision_systemgroup ADD CONSTRAINT namepartrevision_systemgroup_fk FOREIGN KEY (namepart_id) REFERENCES public.namepart(id);
+
+ALTER TABLE public.namepartrevision_system ADD CONSTRAINT namepartrevision_system_fk FOREIGN KEY (namepart_id) REFERENCES public.namepart(id);
+ALTER TABLE public.namepartrevision_system ADD CONSTRAINT namepartrevision_system_fk_1 FOREIGN KEY (parent_namepart_id) REFERENCES public.namepart(id);
+
+ALTER TABLE public.namepartrevision_subsystem ADD CONSTRAINT namepartrevision_subsystem_fk FOREIGN KEY (namepart_id) REFERENCES public.namepart(id);
+ALTER TABLE public.namepartrevision_subsystem ADD CONSTRAINT namepartrevision_subsystem_fk_1 FOREIGN KEY (parent_namepart_id) REFERENCES public.namepart(id);
+
+ALTER TABLE public.namepartrevision_discipline ADD CONSTRAINT namepartrevision_discipline_fk FOREIGN KEY (namepart_id) REFERENCES public.namepart(id);
+
+ALTER TABLE public.namepartrevision_devicegroup ADD CONSTRAINT namepartrevision_devicegroup_fk FOREIGN KEY (namepart_id) REFERENCES public.namepart(id);
+ALTER TABLE public.namepartrevision_devicegroup ADD CONSTRAINT namepartrevision_devicegroup_fk_1 FOREIGN KEY (parent_namepart_id) REFERENCES public.namepart(id);
+
+ALTER TABLE public.namepartrevision_devicetype ADD CONSTRAINT namepartrevision_devicetype_fk FOREIGN KEY (namepart_id) REFERENCES public.namepart(id);
+ALTER TABLE public.namepartrevision_devicetype ADD CONSTRAINT namepartrevision_devicetype_fk_1 FOREIGN KEY (parent_namepart_id) REFERENCES public.namepart(id);
+
+ALTER TABLE public.devicerevision_device ADD CONSTRAINT devicerevision_device_fk FOREIGN KEY (device_id) REFERENCES public.device(id);
+ALTER TABLE public.devicerevision_device ADD CONSTRAINT devicerevision_device_fk_1 FOREIGN KEY (namepartrevision_systemgroup_namepart_id) REFERENCES public.namepart(id);
+ALTER TABLE public.devicerevision_device ADD CONSTRAINT devicerevision_device_fk_2 FOREIGN KEY (namepartrevision_system_namepart_id) REFERENCES public.namepart(id);
+ALTER TABLE public.devicerevision_device ADD CONSTRAINT devicerevision_device_fk_3 FOREIGN KEY (namepartrevision_subsystem_namepart_id) REFERENCES public.namepart(id);
+ALTER TABLE public.devicerevision_device ADD CONSTRAINT devicerevision_device_fk_4 FOREIGN KEY (namepartrevision_devicetype_namepart_id) REFERENCES public.namepart(id);
+-- --------------------------------------------------------------------------------
+
diff --git a/docs/developer/refactoring/background_throughts_database/Appendix_A3/script_notes_3.0_uuid.txt b/docs/developer/refactoring/background_throughts_database/Appendix_A3/script_notes_3.0_uuid.txt
new file mode 100644
index 0000000000000000000000000000000000000000..472fde350261608940813d0ac99bf24a8884a16b
--- /dev/null
+++ b/docs/developer/refactoring/background_throughts_database/Appendix_A3/script_notes_3.0_uuid.txt
@@ -0,0 +1,137 @@
+-- --------------------------------------------------------------------------------
+-- structure
+-- --------------------------------------------------------------------------------
+CREATE TABLE namepartrevision_systemgroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEq character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+CREATE TABLE namepartrevision_system (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    namepartrevision_systemgroup_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEq character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_subsystem (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    namepartrevision_system_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEq character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE namepartrevision_discipline (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEq character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_devicegroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    namepartrevision_discipline_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEq character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_devicetype (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    namepartrevision_devicegroup_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEq character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE devicerevision_device(
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    namepartrevision_systemgroup_uuid character varying(255),
+    namepartrevision_system_uuid character varying(255),
+    namepartrevision_subsystem_uuid character varying(255),
+    namepartrevision_devicetype_uuid character varying(255),
+    conventionName character varying(255),
+    conventionNameEq character varying(255),
+    instanceIndex character varying(255),
+    instanceIndexEq character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
diff --git a/docs/developer/refactoring/background_throughts_database/Appendix_A3/script_notes_3.1_uuid.txt b/docs/developer/refactoring/background_throughts_database/Appendix_A3/script_notes_3.1_uuid.txt
new file mode 100644
index 0000000000000000000000000000000000000000..598f08845483a7057255c4d6e63581e07a2dedb2
--- /dev/null
+++ b/docs/developer/refactoring/background_throughts_database/Appendix_A3/script_notes_3.1_uuid.txt
@@ -0,0 +1,516 @@
+-- --------------------------------------------------------------------------------
+-- About
+--     migration script
+--     postgresql 9.6.7
+-- Content
+--     structure
+--     data
+--     index
+--     primary key
+--     foreign key
+-- --------------------------------------------------------------------------------
+-- structure
+-- --------------------------------------------------------------------------------
+CREATE TABLE namepartrevision_systemgroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+CREATE TABLE namepartrevision_system (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_subsystem (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE namepartrevision_discipline (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_devicegroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_devicetype (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE devicerevision_device(
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    namepartrevision_systemgroup_uuid character varying(255),
+    namepartrevision_system_uuid character varying(255),
+    namepartrevision_subsystem_uuid character varying(255),
+    namepartrevision_devicetype_uuid character varying(255),
+    instanceIndex character varying(255),
+    conventionName character varying(255),
+    conventionNameEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+-- level 1
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_systemgroup (
+    id,
+    version,
+    uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr1.id, npr1."version", np1.uuid, npr1."name", npr1.mnemonic, npr1.mnemoniceqclass, npr1.description, npr1.status, npr1.deleted, 
+npr1.requestdate, ua_r.username as requestedBy, npr1.requestercomment, npr1.processdate, ua_p.username as processedBy, npr1.processorcomment 
+from namepartrevision npr1 
+inner join namepart np1 on npr1.namepart_id = np1.id
+left join useraccount ua_r on npr1.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr1.processedby_id = ua_p.id 
+where np1.nameparttype = 'SECTION' and npr1.parent_id is null;
+
+insert into namepartrevision_discipline (
+    id,
+    version,
+    uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr1.id, npr1."version", np1.uuid, npr1."name", npr1.mnemonic, npr1.mnemoniceqclass, npr1.description, npr1.status, npr1.deleted, 
+npr1.requestdate, ua_r.username as requestedBy, npr1.requestercomment, npr1.processdate, ua_p.username as processedBy, npr1.processorcomment 
+from namepartrevision npr1 
+inner join namepart np1 on npr1.namepart_id = np1.id
+left join useraccount ua_r on npr1.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr1.processedby_id = ua_p.id 
+where np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null;
+-- --------------------------------------------------------------------------------
+-- level 2
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_system (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr2.id, npr2."version", np2.uuid, np22.uuid, 
+npr2."name", npr2.mnemonic, npr2.mnemoniceqclass, npr2.description, 
+npr2.status, npr2.deleted, npr2.requestdate, ua_r.username as requestedBy, npr2.requestercomment, npr2.processdate, ua_p.username as processedBy, npr2.processorcomment 
+from namepartrevision npr2
+inner join namepart np2  on npr2.namepart_id = np2.id
+inner join namepart np22 on npr2.parent_id   = np22.id
+left join useraccount ua_r on npr2.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr2.processedby_id = ua_p.id 
+where np2.nameparttype = 'SECTION' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'SECTION' and npr1.parent_id is null);
+
+insert into namepartrevision_devicegroup (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr2.id, npr2."version", np2.uuid, np22.uuid, 
+npr2."name", npr2.mnemonic, npr2.mnemoniceqclass, npr2.description, 
+npr2.status, npr2.deleted, npr2.requestdate, ua_r.username as requestedBy, npr2.requestercomment, npr2.processdate, ua_p.username as processedBy, npr2.processorcomment 
+from namepartrevision npr2
+inner join namepart np2  on npr2.namepart_id = np2.id
+inner join namepart np22 on npr2.parent_id   = np22.id
+left join useraccount ua_r on npr2.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr2.processedby_id = ua_p.id 
+where np2.nameparttype = 'DEVICE_TYPE' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null);
+-- --------------------------------------------------------------------------------
+-- level 3
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_subsystem (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr3.id, npr3."version", np3.uuid, np32.uuid, 
+npr3."name", npr3.mnemonic, npr3.mnemoniceqclass, npr3.description, 
+npr3.status, npr3.deleted, npr3.requestdate, ua_r.username as requestedBy, npr3.requestercomment, npr3.processdate, ua_p.username as processedBy, npr3.processorcomment 
+from namepartrevision npr3 
+inner join namepart np3  on npr3.namepart_id = np3.id
+inner join namepart np32 on npr3.parent_id   = np32.id
+left join useraccount ua_r on npr3.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr3.processedby_id = ua_p.id 
+where np3.nameparttype = 'SECTION' and npr3.parent_id in 
+(
+select npr2.namepart_id from namepartrevision npr2, namepart np2 where npr2.namepart_id = np2.id and np2.nameparttype = 'SECTION' and npr2.parent_id in 
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'SECTION' and npr1.parent_id is null)
+);
+
+insert into namepartrevision_devicetype (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr3.id, npr3."version", np3.uuid, np32.uuid, 
+npr3."name", npr3.mnemonic, npr3.mnemoniceqclass, npr3.description, 
+npr3.status, npr3.deleted, npr3.requestdate, ua_r.username as requestedBy, npr3.requestercomment, npr3.processdate, ua_p.username as processedBy, npr3.processorcomment 
+from namepartrevision npr3 
+inner join namepart np3  on npr3.namepart_id = np3.id
+inner join namepart np32 on npr3.parent_id   = np32.id
+left join useraccount ua_r on npr3.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr3.processedby_id = ua_p.id 
+where np3.nameparttype = 'DEVICE_TYPE' and npr3.parent_id in 
+(
+select npr2.namepart_id from namepartrevision npr2, namepart np2 where npr2.namepart_id = np2.id and np2.nameparttype = 'DEVICE_TYPE' and npr2.parent_id in 
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null)
+);
+-- --------------------------------------------------------------------------------
+-- device
+-- --------------------------------------------------------------------------------
+-- level 1
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    uuid,
+    namepartrevision_systemgroup_uuid,
+    namepartrevision_system_uuid,
+    namepartrevision_subsystem_uuid,
+    namepartrevision_devicetype_uuid,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, d.uuid, 
+np_s.uuid, 
+null, 
+null, 
+np_d.uuid, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id is null
+);
+-- --------------------------------------------------------------------------------
+-- level 2
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    uuid,
+    namepartrevision_systemgroup_uuid,
+    namepartrevision_system_uuid,
+    namepartrevision_subsystem_uuid,
+    namepartrevision_devicetype_uuid,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, d.uuid, 
+null, 
+np_s.uuid, 
+null, 
+np_d.uuid, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in 
+    (
+    select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id is null
+    )
+);
+-- --------------------------------------------------------------------------------
+-- level 3
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    uuid,
+    namepartrevision_systemgroup_uuid,
+    namepartrevision_system_uuid,
+    namepartrevision_subsystem_uuid,
+    namepartrevision_devicetype_uuid,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, d.uuid, 
+null, 
+null, 
+np_s.uuid, 
+np_d.uuid, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in 
+    (
+    select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id in 
+        (
+        select np3.id from namepart np3, namepartrevision npr3 where np3.id = npr3.namepart_id and npr3.parent_id is null
+        )
+    )
+);
+-- --------------------------------------------------------------------------------
+-- index
+-- --------------------------------------------------------------------------------
+CREATE INDEX namepartrevision_systemgroup_id_idx ON public.namepartrevision_systemgroup (id);
+CREATE INDEX namepartrevision_systemgroup_uuid_idx ON public.namepartrevision_systemgroup (uuid);
+CREATE INDEX namepartrevision_systemgroup_mnemonic_idx ON public.namepartrevision_systemgroup (mnemonic);
+CREATE INDEX namepartrevision_systemgroup_status_idx ON public.namepartrevision_systemgroup (status);
+
+CREATE INDEX namepartrevision_system_id_idx ON public.namepartrevision_system (id);
+CREATE INDEX namepartrevision_system_uuid_idx ON public.namepartrevision_system (uuid);
+CREATE INDEX namepartrevision_system_parent_uuid_idx ON public.namepartrevision_system (parent_uuid);
+CREATE INDEX namepartrevision_system_mnemonic_idx ON public.namepartrevision_system (mnemonic);
+CREATE INDEX namepartrevision_system_status_idx ON public.namepartrevision_system (status);
+
+CREATE INDEX namepartrevision_subsystem_id_idx ON public.namepartrevision_subsystem (id);
+CREATE INDEX namepartrevision_subsystem_uuid_idx ON public.namepartrevision_subsystem (uuid);
+CREATE INDEX namepartrevision_subsystem_parent_uuid_idx ON public.namepartrevision_subsystem (parent_uuid);
+CREATE INDEX namepartrevision_subsystem_mnemonic_idx ON public.namepartrevision_subsystem (mnemonic);
+CREATE INDEX namepartrevision_subsystem_status_idx ON public.namepartrevision_subsystem (status);
+
+CREATE INDEX namepartrevision_discipline_id_idx ON public.namepartrevision_discipline (id);
+CREATE INDEX namepartrevision_discipline_uuid_idx ON public.namepartrevision_discipline (uuid);
+CREATE INDEX namepartrevision_discipline_mnemonic_idx ON public.namepartrevision_discipline (mnemonic);
+CREATE INDEX namepartrevision_discipline_status_idx ON public.namepartrevision_discipline (status);
+
+CREATE INDEX namepartrevision_devicegroup_id_idx ON public.namepartrevision_devicegroup (id);
+CREATE INDEX namepartrevision_devicegroup_uuid_idx ON public.namepartrevision_devicegroup (uuid);
+CREATE INDEX namepartrevision_devicegroup_parent_uuid_idx ON public.namepartrevision_devicegroup (parent_uuid);
+CREATE INDEX namepartrevision_devicegroup_mnemonic_idx ON public.namepartrevision_devicegroup (mnemonic);
+CREATE INDEX namepartrevision_devicegroup_status_idx ON public.namepartrevision_devicegroup (status);
+
+CREATE INDEX namepartrevision_devicetype_id_idx ON public.namepartrevision_devicetype (id);
+CREATE INDEX namepartrevision_devicetype_uuid_idx ON public.namepartrevision_devicetype (uuid);
+CREATE INDEX namepartrevision_devicetype_parent_uuid_idx ON public.namepartrevision_devicetype (parent_uuid);
+CREATE INDEX namepartrevision_devicetype_mnemonic_idx ON public.namepartrevision_devicetype (mnemonic);
+CREATE INDEX namepartrevision_devicetype_status_idx ON public.namepartrevision_devicetype (status);
+
+CREATE INDEX devicerevision_device_id_idx ON public.devicerevision_device (id);
+CREATE INDEX devicerevision_device_uuid_idx ON public.devicerevision_device (uuid);
+CREATE INDEX devicerevision_device_namepartrevision_systemgroup_uuid_idx ON public.devicerevision_device (namepartrevision_systemgroup_uuid);
+CREATE INDEX devicerevision_device_namepartrevision_system_uuid_idx ON public.devicerevision_device (namepartrevision_system_uuid);
+CREATE INDEX devicerevision_device_namepartrevision_subsystem_uuid_idx ON public.devicerevision_device (namepartrevision_subsystem_uuid);
+CREATE INDEX devicerevision_device_namepartrevision_devicetype_uuid_idx ON public.devicerevision_device (namepartrevision_devicetype_uuid);
+CREATE INDEX devicerevision_device_conventionname_idx ON public.devicerevision_device (conventionname);
+CREATE INDEX devicerevision_device_status_idx ON public.devicerevision_device (status);
+-- --------------------------------------------------------------------------------
+-- primary key
+-- --------------------------------------------------------------------------------
+ALTER TABLE public.namepartrevision_systemgroup ADD CONSTRAINT namepartrevision_systemgroup_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_system ADD CONSTRAINT namepartrevision_system_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_subsystem ADD CONSTRAINT namepartrevision_subsystem_pk PRIMARY KEY (id);
+
+ALTER TABLE public.namepartrevision_discipline ADD CONSTRAINT namepartrevision_discipline_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_devicegroup ADD CONSTRAINT namepartrevision_devicegroup_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_devicetype ADD CONSTRAINT namepartrevision_devicetype_pk PRIMARY KEY (id);
+
+ALTER TABLE public.devicerevision_device ADD CONSTRAINT devicerevision_device_pk PRIMARY KEY (id);
+-- --------------------------------------------------------------------------------
+-- foreign key
+-- --------------------------------------------------------------------------------
+-- uuid
+-- --------------------------------------------------------------------------------
diff --git a/docs/developer/refactoring/background_throughts_database/Appendix_A5/script_notes_5_uuid.txt b/docs/developer/refactoring/background_throughts_database/Appendix_A5/script_notes_5_uuid.txt
new file mode 100644
index 0000000000000000000000000000000000000000..7a3406b389f78b5d9ddfe1019d3b48cc2bb18be1
--- /dev/null
+++ b/docs/developer/refactoring/background_throughts_database/Appendix_A5/script_notes_5_uuid.txt
@@ -0,0 +1,573 @@
+-- --------------------------------------------------------------------------------
+-- About
+--     migration script
+--     postgresql 9.6.7
+-- Content
+--     structure
+--     data
+--     index
+--     primary key
+--     foreign key
+-- Note
+--     order of items is important
+-- --------------------------------------------------------------------------------
+-- structure
+-- --------------------------------------------------------------------------------
+CREATE TABLE namepartrevision_systemgroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+CREATE TABLE namepartrevision_system (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_subsystem (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE namepartrevision_discipline (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_devicegroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_devicetype (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE devicerevision_device(
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    namepartrevision_systemgroup_uuid character varying(255),
+    namepartrevision_system_uuid character varying(255),
+    namepartrevision_subsystem_uuid character varying(255),
+    namepartrevision_devicetype_uuid character varying(255),
+    instanceIndex character varying(255),
+    conventionName character varying(255),
+    conventionNameEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+-- level 1
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_systemgroup (
+    id,
+    version,
+    uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr1.id, npr1."version", np1.uuid, npr1."name", npr1.mnemonic, npr1.mnemoniceqclass, npr1.description, npr1.status, false, npr1.deleted, 
+npr1.requestdate, ua_r.username as requestedBy, npr1.requestercomment, npr1.processdate, ua_p.username as processedBy, npr1.processorcomment 
+from namepartrevision npr1 
+inner join namepart np1 on npr1.namepart_id = np1.id
+left join useraccount ua_r on npr1.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr1.processedby_id = ua_p.id 
+where np1.nameparttype = 'SECTION' and npr1.parent_id is null;
+
+insert into namepartrevision_discipline (
+    id,
+    version,
+    uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr1.id, npr1."version", np1.uuid, npr1."name", npr1.mnemonic, npr1.mnemoniceqclass, npr1.description, npr1.status, false, npr1.deleted, 
+npr1.requestdate, ua_r.username as requestedBy, npr1.requestercomment, npr1.processdate, ua_p.username as processedBy, npr1.processorcomment 
+from namepartrevision npr1 
+inner join namepart np1 on npr1.namepart_id = np1.id
+left join useraccount ua_r on npr1.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr1.processedby_id = ua_p.id 
+where np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null;
+-- --------------------------------------------------------------------------------
+-- level 2
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_system (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr2.id, npr2."version", np2.uuid, np22.uuid, 
+npr2."name", npr2.mnemonic, npr2.mnemoniceqclass, npr2.description, 
+npr2.status, false, npr2.deleted, npr2.requestdate, ua_r.username as requestedBy, npr2.requestercomment, npr2.processdate, ua_p.username as processedBy, npr2.processorcomment 
+from namepartrevision npr2
+inner join namepart np2  on npr2.namepart_id = np2.id
+inner join namepart np22 on npr2.parent_id   = np22.id
+left join useraccount ua_r on npr2.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr2.processedby_id = ua_p.id 
+where np2.nameparttype = 'SECTION' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'SECTION' and npr1.parent_id is null);
+
+insert into namepartrevision_devicegroup (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr2.id, npr2."version", np2.uuid, np22.uuid, 
+npr2."name", npr2.mnemonic, npr2.mnemoniceqclass, npr2.description, 
+npr2.status, false, npr2.deleted, npr2.requestdate, ua_r.username as requestedBy, npr2.requestercomment, npr2.processdate, ua_p.username as processedBy, npr2.processorcomment 
+from namepartrevision npr2
+inner join namepart np2  on npr2.namepart_id = np2.id
+inner join namepart np22 on npr2.parent_id   = np22.id
+left join useraccount ua_r on npr2.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr2.processedby_id = ua_p.id 
+where np2.nameparttype = 'DEVICE_TYPE' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null);
+-- --------------------------------------------------------------------------------
+-- level 3
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_subsystem (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr3.id, npr3."version", np3.uuid, np32.uuid, 
+npr3."name", npr3.mnemonic, npr3.mnemoniceqclass, npr3.description, 
+npr3.status, false, npr3.deleted, npr3.requestdate, ua_r.username as requestedBy, npr3.requestercomment, npr3.processdate, ua_p.username as processedBy, npr3.processorcomment 
+from namepartrevision npr3 
+inner join namepart np3  on npr3.namepart_id = np3.id
+inner join namepart np32 on npr3.parent_id   = np32.id
+left join useraccount ua_r on npr3.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr3.processedby_id = ua_p.id 
+where np3.nameparttype = 'SECTION' and npr3.parent_id in 
+(
+select npr2.namepart_id from namepartrevision npr2, namepart np2 where npr2.namepart_id = np2.id and np2.nameparttype = 'SECTION' and npr2.parent_id in 
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'SECTION' and npr1.parent_id is null)
+);
+
+insert into namepartrevision_devicetype (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr3.id, npr3."version", np3.uuid, np32.uuid, 
+npr3."name", npr3.mnemonic, npr3.mnemoniceqclass, npr3.description, 
+npr3.status, false, npr3.deleted, npr3.requestdate, ua_r.username as requestedBy, npr3.requestercomment, npr3.processdate, ua_p.username as processedBy, npr3.processorcomment 
+from namepartrevision npr3 
+inner join namepart np3  on npr3.namepart_id = np3.id
+inner join namepart np32 on npr3.parent_id   = np32.id
+left join useraccount ua_r on npr3.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr3.processedby_id = ua_p.id 
+where np3.nameparttype = 'DEVICE_TYPE' and npr3.parent_id in 
+(
+select npr2.namepart_id from namepartrevision npr2, namepart np2 where npr2.namepart_id = np2.id and np2.nameparttype = 'DEVICE_TYPE' and npr2.parent_id in 
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null)
+);
+-- --------------------------------------------------------------------------------
+-- device
+-- --------------------------------------------------------------------------------
+-- level 1
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    uuid,
+    namepartrevision_systemgroup_uuid,
+    namepartrevision_system_uuid,
+    namepartrevision_subsystem_uuid,
+    namepartrevision_devicetype_uuid,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, d.uuid, 
+np_s.uuid, 
+null, 
+null, 
+np_d.uuid, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, false, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id is null
+);
+-- --------------------------------------------------------------------------------
+-- level 2
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    uuid,
+    namepartrevision_systemgroup_uuid,
+    namepartrevision_system_uuid,
+    namepartrevision_subsystem_uuid,
+    namepartrevision_devicetype_uuid,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, d.uuid, 
+null, 
+np_s.uuid, 
+null, 
+np_d.uuid, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, false, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in 
+    (
+    select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id is null
+    )
+);
+-- --------------------------------------------------------------------------------
+-- level 3
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    uuid,
+    namepartrevision_systemgroup_uuid,
+    namepartrevision_system_uuid,
+    namepartrevision_subsystem_uuid,
+    namepartrevision_devicetype_uuid,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, d.uuid, 
+null, 
+null, 
+np_s.uuid, 
+np_d.uuid, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, false, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in 
+    (
+    select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id in 
+        (
+        select np3.id from namepart np3, namepartrevision npr3 where np3.id = npr3.namepart_id and npr3.parent_id is null
+        )
+    )
+);
+-- --------------------------------------------------------------------------------
+-- index
+-- --------------------------------------------------------------------------------
+CREATE INDEX namepartrevision_systemgroup_id_idx ON public.namepartrevision_systemgroup (id);
+CREATE INDEX namepartrevision_systemgroup_uuid_idx ON public.namepartrevision_systemgroup (uuid);
+CREATE INDEX namepartrevision_systemgroup_mnemonic_idx ON public.namepartrevision_systemgroup (mnemonic);
+CREATE INDEX namepartrevision_systemgroup_status_idx ON public.namepartrevision_systemgroup (status);
+
+CREATE INDEX namepartrevision_system_id_idx ON public.namepartrevision_system (id);
+CREATE INDEX namepartrevision_system_uuid_idx ON public.namepartrevision_system (uuid);
+CREATE INDEX namepartrevision_system_parent_uuid_idx ON public.namepartrevision_system (parent_uuid);
+CREATE INDEX namepartrevision_system_mnemonic_idx ON public.namepartrevision_system (mnemonic);
+CREATE INDEX namepartrevision_system_status_idx ON public.namepartrevision_system (status);
+
+CREATE INDEX namepartrevision_subsystem_id_idx ON public.namepartrevision_subsystem (id);
+CREATE INDEX namepartrevision_subsystem_uuid_idx ON public.namepartrevision_subsystem (uuid);
+CREATE INDEX namepartrevision_subsystem_parent_uuid_idx ON public.namepartrevision_subsystem (parent_uuid);
+CREATE INDEX namepartrevision_subsystem_mnemonic_idx ON public.namepartrevision_subsystem (mnemonic);
+CREATE INDEX namepartrevision_subsystem_status_idx ON public.namepartrevision_subsystem (status);
+
+CREATE INDEX namepartrevision_discipline_id_idx ON public.namepartrevision_discipline (id);
+CREATE INDEX namepartrevision_discipline_uuid_idx ON public.namepartrevision_discipline (uuid);
+CREATE INDEX namepartrevision_discipline_mnemonic_idx ON public.namepartrevision_discipline (mnemonic);
+CREATE INDEX namepartrevision_discipline_status_idx ON public.namepartrevision_discipline (status);
+
+CREATE INDEX namepartrevision_devicegroup_id_idx ON public.namepartrevision_devicegroup (id);
+CREATE INDEX namepartrevision_devicegroup_uuid_idx ON public.namepartrevision_devicegroup (uuid);
+CREATE INDEX namepartrevision_devicegroup_parent_uuid_idx ON public.namepartrevision_devicegroup (parent_uuid);
+CREATE INDEX namepartrevision_devicegroup_mnemonic_idx ON public.namepartrevision_devicegroup (mnemonic);
+CREATE INDEX namepartrevision_devicegroup_status_idx ON public.namepartrevision_devicegroup (status);
+
+CREATE INDEX namepartrevision_devicetype_id_idx ON public.namepartrevision_devicetype (id);
+CREATE INDEX namepartrevision_devicetype_uuid_idx ON public.namepartrevision_devicetype (uuid);
+CREATE INDEX namepartrevision_devicetype_parent_uuid_idx ON public.namepartrevision_devicetype (parent_uuid);
+CREATE INDEX namepartrevision_devicetype_mnemonic_idx ON public.namepartrevision_devicetype (mnemonic);
+CREATE INDEX namepartrevision_devicetype_status_idx ON public.namepartrevision_devicetype (status);
+
+CREATE INDEX devicerevision_device_uuid_idx ON public.devicerevision_device (uuid);
+-- --------------------------------------------------------------------------------
+-- update latest
+-- --------------------------------------------------------------------------------
+update namepartrevision_systemgroup sg set latest = true where sg.id = (
+  select max(sg2.id) from namepartrevision_systemgroup sg2 where sg2.uuid = sg.uuid 
+);
+update namepartrevision_system sys set latest = true where sys.id = (
+  select max(sys2.id) from namepartrevision_system sys2 where sys2.uuid = sys.uuid 
+);
+update namepartrevision_subsystem sub set latest = true where sub.id = (
+  select max(sub2.id) from namepartrevision_subsystem sub2 where sub2.uuid = sub.uuid 
+);
+
+update namepartrevision_discipline di set latest = true where di.id = (
+  select max(di2.id) from namepartrevision_discipline di2 where di2.uuid = di.uuid 
+);
+update namepartrevision_devicegroup dg set latest = true where dg.id = (
+  select max(dg2.id) from namepartrevision_devicegroup dg2 where dg2.uuid = dg.uuid 
+);
+update namepartrevision_devicetype dt set latest = true where dt.id = (
+  select max(dt2.id) from namepartrevision_devicetype dt2 where dt2.uuid = dt.uuid 
+);
+
+update devicerevision_device dd set latest = true where dd.id = (
+  select max(dd2.id) from devicerevision_device dd2 where dd2.uuid = dd.uuid 
+);
+-- --------------------------------------------------------------------------------
+-- foreign key
+-- --------------------------------------------------------------------------------
+-- --------------------------------------------------------------------------------
+-- index
+-- --------------------------------------------------------------------------------
+CREATE INDEX devicerevision_device_id_idx ON public.devicerevision_device (id);
+CREATE INDEX devicerevision_device_namepartrevision_systemgroup_uuid_idx ON public.devicerevision_device (namepartrevision_systemgroup_uuid);
+CREATE INDEX devicerevision_device_namepartrevision_system_uuid_idx ON public.devicerevision_device (namepartrevision_system_uuid);
+CREATE INDEX devicerevision_device_namepartrevision_subsystem_uuid_idx ON public.devicerevision_device (namepartrevision_subsystem_uuid);
+CREATE INDEX devicerevision_device_namepartrevision_devicetype_uuid_idx ON public.devicerevision_device (namepartrevision_devicetype_uuid);
+CREATE INDEX devicerevision_device_conventionname_idx ON public.devicerevision_device (conventionname);
+CREATE INDEX devicerevision_device_status_idx ON public.devicerevision_device (status);
+
+CREATE INDEX namepartrevision_systemgroup_latest_idx ON public.namepartrevision_systemgroup (latest);
+CREATE INDEX namepartrevision_system_latest_idx ON public.namepartrevision_system (latest);
+CREATE INDEX namepartrevision_subsystem_latest_idx ON public.namepartrevision_subsystem (latest);
+
+CREATE INDEX namepartrevision_discipline_latest_idx ON public.namepartrevision_discipline (latest);
+CREATE INDEX namepartrevision_devicegroup_latest_idx ON public.namepartrevision_devicegroup (latest);
+CREATE INDEX namepartrevision_devicetype_latest_idx ON public.namepartrevision_devicetype (latest);
+
+CREATE INDEX devicerevision_device_latest_idx ON public.devicerevision_device (latest);
+-- --------------------------------------------------------------------------------
+-- primary key
+-- --------------------------------------------------------------------------------
+ALTER TABLE public.namepartrevision_systemgroup ADD CONSTRAINT namepartrevision_systemgroup_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_system ADD CONSTRAINT namepartrevision_system_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_subsystem ADD CONSTRAINT namepartrevision_subsystem_pk PRIMARY KEY (id);
+
+ALTER TABLE public.namepartrevision_discipline ADD CONSTRAINT namepartrevision_discipline_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_devicegroup ADD CONSTRAINT namepartrevision_devicegroup_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_devicetype ADD CONSTRAINT namepartrevision_devicetype_pk PRIMARY KEY (id);
+
+ALTER TABLE public.devicerevision_device ADD CONSTRAINT devicerevision_device_pk PRIMARY KEY (id);
+-- --------------------------------------------------------------------------------
+
diff --git a/docs/developer/refactoring/background_throughts_database/Appendix_A5/script_notes_5_uuid_edit.txt b/docs/developer/refactoring/background_throughts_database/Appendix_A5/script_notes_5_uuid_edit.txt
new file mode 100644
index 0000000000000000000000000000000000000000..087f5b6c6ddd476197cbc71ab13a9cc47f34c7fa
--- /dev/null
+++ b/docs/developer/refactoring/background_throughts_database/Appendix_A5/script_notes_5_uuid_edit.txt
@@ -0,0 +1,579 @@
+-- --------------------------------------------------------------------------------
+-- About
+--     migration script
+--     postgresql 9.6.7
+-- Content
+--     structure
+--     data
+--     index
+--     primary key
+--     foreign key
+-- Note
+--     order of items is important
+-- --------------------------------------------------------------------------------
+-- structure
+-- --------------------------------------------------------------------------------
+CREATE TABLE systemgroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonic_equivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by character varying(255),
+    requested_comment character varying(255),
+    processed timestamp without time zone,
+    processed_by character varying(255),
+    processed_comment character varying(255)
+);
+CREATE TABLE system (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonic_equivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by character varying(255),
+    requested_comment character varying(255),
+    processed timestamp without time zone,
+    processed_by character varying(255),
+    processed_comment character varying(255)
+);
+
+CREATE TABLE subsystem (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonic_equivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by character varying(255),
+    requested_comment character varying(255),
+    processed timestamp without time zone,
+    processed_by character varying(255),
+    processed_comment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE discipline (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonic_equivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by character varying(255),
+    requested_comment character varying(255),
+    processed timestamp without time zone,
+    processed_by character varying(255),
+    processed_comment character varying(255)
+);
+
+CREATE TABLE devicegroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonic_equivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by character varying(255),
+    requested_comment character varying(255),
+    processed timestamp without time zone,
+    processed_by character varying(255),
+    processed_comment character varying(255)
+);
+
+CREATE TABLE devicetype (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonic_equivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by character varying(255),
+    requested_comment character varying(255),
+    processed timestamp without time zone,
+    processed_by character varying(255),
+    processed_comment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE essname (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    systemgroup_uuid character varying(255),
+    system_uuid character varying(255),
+    subsystem_uuid character varying(255),
+    devicetype_uuid character varying(255),
+    instance_index character varying(255),
+    convention_name character varying(255),
+    convention_name_equivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by character varying(255),
+    requested_comment character varying(255),
+    processed timestamp without time zone,
+    processed_by character varying(255),
+    processed_comment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+-- level 1
+-- --------------------------------------------------------------------------------
+insert into systemgroup (
+    id,
+    version,
+    uuid,
+    name,
+    mnemonic,
+    mnemonic_equivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requested_by,
+    requested_comment,
+    processed,
+    processed_by,
+    processed_comment
+)
+select npr1.id, npr1."version", np1.uuid, npr1."name", npr1.mnemonic, npr1.mnemoniceqclass, npr1.description, npr1.status, false, npr1.deleted,
+npr1.requestdate, ua_r.username as requestedBy, npr1.requestercomment, npr1.processdate, ua_p.username as processedBy, npr1.processorcomment
+from namepartrevision npr1
+inner join namepart np1 on npr1.namepart_id = np1.id
+left join useraccount ua_r on npr1.requestedby_id = ua_r.id
+left join useraccount ua_p on npr1.processedby_id = ua_p.id
+where np1.nameparttype = 'SECTION' and npr1.parent_id is null;
+
+insert into discipline (
+    id,
+    version,
+    uuid,
+    name,
+    mnemonic,
+    mnemonic_equivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requested_by,
+    requested_comment,
+    processed,
+    processed_by,
+    processed_comment
+)
+select npr1.id, npr1."version", np1.uuid, npr1."name", npr1.mnemonic, npr1.mnemoniceqclass, npr1.description, npr1.status, false, npr1.deleted,
+npr1.requestdate, ua_r.username as requestedBy, npr1.requestercomment, npr1.processdate, ua_p.username as processedBy, npr1.processorcomment
+from namepartrevision npr1
+inner join namepart np1 on npr1.namepart_id = np1.id
+left join useraccount ua_r on npr1.requestedby_id = ua_r.id
+left join useraccount ua_p on npr1.processedby_id = ua_p.id
+where np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null;
+-- --------------------------------------------------------------------------------
+-- level 2
+-- --------------------------------------------------------------------------------
+insert into system (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonic_equivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requested_by,
+    requested_comment,
+    processed,
+    processed_by,
+    processed_comment
+)
+select npr2.id, npr2."version", np2.uuid, np22.uuid,
+npr2."name", npr2.mnemonic, npr2.mnemoniceqclass, npr2.description,
+npr2.status, false, npr2.deleted, npr2.requestdate, ua_r.username as requestedBy, npr2.requestercomment, npr2.processdate, ua_p.username as processedBy, npr2.processorcomment
+from namepartrevision npr2
+inner join namepart np2  on npr2.namepart_id = np2.id
+inner join namepart np22 on npr2.parent_id   = np22.id
+left join useraccount ua_r on npr2.requestedby_id = ua_r.id
+left join useraccount ua_p on npr2.processedby_id = ua_p.id
+where np2.nameparttype = 'SECTION' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'SECTION' and npr1.parent_id is null);
+
+insert into devicegroup (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonic_equivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requested_by,
+    requested_comment,
+    processed,
+    processed_by,
+    processed_comment
+)
+select npr2.id, npr2."version", np2.uuid, np22.uuid,
+npr2."name", npr2.mnemonic, npr2.mnemoniceqclass, npr2.description,
+npr2.status, false, npr2.deleted, npr2.requestdate, ua_r.username as requestedBy, npr2.requestercomment, npr2.processdate, ua_p.username as processedBy, npr2.processorcomment
+from namepartrevision npr2
+inner join namepart np2  on npr2.namepart_id = np2.id
+inner join namepart np22 on npr2.parent_id   = np22.id
+left join useraccount ua_r on npr2.requestedby_id = ua_r.id
+left join useraccount ua_p on npr2.processedby_id = ua_p.id
+where np2.nameparttype = 'DEVICE_TYPE' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null);
+-- --------------------------------------------------------------------------------
+-- level 3
+-- --------------------------------------------------------------------------------
+insert into subsystem (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonic_equivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requested_by,
+    requested_comment,
+    processed,
+    processed_by,
+    processed_comment
+)
+select npr3.id, npr3."version", np3.uuid, np32.uuid,
+npr3."name", npr3.mnemonic, npr3.mnemoniceqclass, npr3.description,
+npr3.status, false, npr3.deleted, npr3.requestdate, ua_r.username as requestedBy, npr3.requestercomment, npr3.processdate, ua_p.username as processedBy, npr3.processorcomment
+from namepartrevision npr3
+inner join namepart np3  on npr3.namepart_id = np3.id
+inner join namepart np32 on npr3.parent_id   = np32.id
+left join useraccount ua_r on npr3.requestedby_id = ua_r.id
+left join useraccount ua_p on npr3.processedby_id = ua_p.id
+where np3.nameparttype = 'SECTION' and npr3.parent_id in
+(
+select npr2.namepart_id from namepartrevision npr2, namepart np2 where npr2.namepart_id = np2.id and np2.nameparttype = 'SECTION' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'SECTION' and npr1.parent_id is null)
+);
+
+insert into devicetype (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonic_equivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requested_by,
+    requested_comment,
+    processed,
+    processed_by,
+    processed_comment
+)
+select npr3.id, npr3."version", np3.uuid, np32.uuid,
+npr3."name", npr3.mnemonic, npr3.mnemoniceqclass, npr3.description,
+npr3.status, false, npr3.deleted, npr3.requestdate, ua_r.username as requestedBy, npr3.requestercomment, npr3.processdate, ua_p.username as processedBy, npr3.processorcomment
+from namepartrevision npr3
+inner join namepart np3  on npr3.namepart_id = np3.id
+inner join namepart np32 on npr3.parent_id   = np32.id
+left join useraccount ua_r on npr3.requestedby_id = ua_r.id
+left join useraccount ua_p on npr3.processedby_id = ua_p.id
+where np3.nameparttype = 'DEVICE_TYPE' and npr3.parent_id in
+(
+select npr2.namepart_id from namepartrevision npr2, namepart np2 where npr2.namepart_id = np2.id and np2.nameparttype = 'DEVICE_TYPE' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null)
+);
+-- --------------------------------------------------------------------------------
+-- device
+-- --------------------------------------------------------------------------------
+-- level 1
+-- --------------------------------------------------------------------------------
+insert into essname (
+    id,
+    version,
+    uuid,
+    systemgroup_uuid,
+    system_uuid,
+    subsystem_uuid,
+    devicetype_uuid,
+    instance_index,
+    convention_name,
+    convention_name_equivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requested_by,
+    requested_comment,
+    processed,
+    processed_by,
+    processed_comment
+)
+select dr.id, dr.version, d.uuid,
+np_s.uuid,
+null,
+null,
+np_d.uuid,
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, false, dr.deleted,
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment
+from devicerevision dr
+inner join device d on dr.device_id = d.id
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id
+where dr.section_id in
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id is null
+);
+-- --------------------------------------------------------------------------------
+-- level 2
+-- --------------------------------------------------------------------------------
+insert into essname (
+    id,
+    version,
+    uuid,
+    systemgroup_uuid,
+    system_uuid,
+    subsystem_uuid,
+    devicetype_uuid,
+    instance_index,
+    convention_name,
+    convention_name_equivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requested_by,
+    requested_comment,
+    processed,
+    processed_by,
+    processed_comment
+)
+select dr.id, dr.version, d.uuid,
+null,
+np_s.uuid,
+null,
+np_d.uuid,
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, false, dr.deleted,
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment
+from devicerevision dr
+inner join device d on dr.device_id = d.id
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id
+where dr.section_id in
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in
+    (
+    select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id is null
+    )
+);
+-- --------------------------------------------------------------------------------
+-- level 3
+-- --------------------------------------------------------------------------------
+insert into essname (
+    id,
+    version,
+    uuid,
+    systemgroup_uuid,
+    system_uuid,
+    subsystem_uuid,
+    devicetype_uuid,
+    instance_index,
+    convention_name,
+    convention_name_equivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requested_by,
+    requested_comment,
+    processed,
+    processed_by,
+    processed_comment
+)
+select dr.id, dr.version, d.uuid,
+null,
+null,
+np_s.uuid,
+np_d.uuid,
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, false, dr.deleted,
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment
+from devicerevision dr
+inner join device d on dr.device_id = d.id
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id
+where dr.section_id in
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in
+    (
+    select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id in
+        (
+        select np3.id from namepart np3, namepartrevision npr3 where np3.id = npr3.namepart_id and npr3.parent_id is null
+        )
+    )
+);
+-- --------------------------------------------------------------------------------
+-- index
+-- --------------------------------------------------------------------------------
+CREATE INDEX systemgroup_id_idx ON public.systemgroup (id);
+CREATE INDEX systemgroup_uuid_idx ON public.systemgroup (uuid);
+CREATE INDEX systemgroup_mnemonic_idx ON public.systemgroup (mnemonic);
+CREATE INDEX systemgroup_status_idx ON public.systemgroup (status);
+CREATE INDEX systemgroup_deleted_idx ON public.systemgroup (deleted);
+
+CREATE INDEX system_id_idx ON public.system (id);
+CREATE INDEX system_uuid_idx ON public.system (uuid);
+CREATE INDEX system_parent_uuid_idx ON public.system (parent_uuid);
+CREATE INDEX system_mnemonic_idx ON public.system (mnemonic);
+CREATE INDEX system_status_idx ON public.system (status);
+CREATE INDEX system_deleted_idx ON public.system (deleted);
+
+CREATE INDEX subsystem_id_idx ON public.subsystem (id);
+CREATE INDEX subsystem_uuid_idx ON public.subsystem (uuid);
+CREATE INDEX subsystem_parent_uuid_idx ON public.subsystem (parent_uuid);
+CREATE INDEX subsystem_mnemonic_idx ON public.subsystem (mnemonic);
+CREATE INDEX subsystem_status_idx ON public.subsystem (status);
+CREATE INDEX subsystem_deleted_idx ON public.subsystem (deleted);
+
+CREATE INDEX discipline_id_idx ON public.discipline (id);
+CREATE INDEX discipline_uuid_idx ON public.discipline (uuid);
+CREATE INDEX discipline_mnemonic_idx ON public.discipline (mnemonic);
+CREATE INDEX discipline_status_idx ON public.discipline (status);
+CREATE INDEX discipline_deleted_idx ON public.discipline (deleted);
+
+CREATE INDEX devicegroup_id_idx ON public.devicegroup (id);
+CREATE INDEX devicegroup_uuid_idx ON public.devicegroup (uuid);
+CREATE INDEX devicegroup_parent_uuid_idx ON public.devicegroup (parent_uuid);
+CREATE INDEX devicegroup_mnemonic_idx ON public.devicegroup (mnemonic);
+CREATE INDEX devicegroup_status_idx ON public.devicegroup (status);
+CREATE INDEX devicegroup_deleted_idx ON public.devicegroup (deleted);
+
+CREATE INDEX devicetype_id_idx ON public.devicetype (id);
+CREATE INDEX devicetype_uuid_idx ON public.devicetype (uuid);
+CREATE INDEX devicetype_parent_uuid_idx ON public.devicetype (parent_uuid);
+CREATE INDEX devicetype_mnemonic_idx ON public.devicetype (mnemonic);
+CREATE INDEX devicetype_status_idx ON public.devicetype (status);
+CREATE INDEX devicetype_deleted_idx ON public.devicetype (deleted);
+
+CREATE INDEX essname_uuid_idx ON public.essname (uuid);
+-- --------------------------------------------------------------------------------
+-- update latest
+-- --------------------------------------------------------------------------------
+update systemgroup sg set latest = true where sg.id = (
+  select max(sg2.id) from systemgroup sg2 where sg2.uuid = sg.uuid and sg2.status = 'APPROVED'
+);
+update system sys set latest = true where sys.id = (
+  select max(sys2.id) from system sys2 where sys2.uuid = sys.uuid and sys2.status = 'APPROVED'
+);
+update subsystem sub set latest = true where sub.id = (
+  select max(sub2.id) from subsystem sub2 where sub2.uuid = sub.uuid and sub2.status = 'APPROVED'
+);
+
+update discipline di set latest = true where di.id = (
+  select max(di2.id) from discipline di2 where di2.uuid = di.uuid and di2.status = 'APPROVED'
+);
+update devicegroup dg set latest = true where dg.id = (
+  select max(dg2.id) from devicegroup dg2 where dg2.uuid = dg.uuid and dg2.status = 'APPROVED'
+);
+update devicetype dt set latest = true where dt.id = (
+  select max(dt2.id) from devicetype dt2 where dt2.uuid = dt.uuid and dt2.status = 'APPROVED'
+);
+
+update essname en set latest = true where en.id = (
+  select max(en2.id) from essname en2 where en2.uuid = en.uuid
+);
+-- --------------------------------------------------------------------------------
+-- foreign key
+-- --------------------------------------------------------------------------------
+-- --------------------------------------------------------------------------------
+-- index
+-- --------------------------------------------------------------------------------
+CREATE INDEX essname_id_idx ON public.essname (id);
+CREATE INDEX essname_namepartrevision_systemgroup_uuid_idx ON public.essname (systemgroup_uuid);
+CREATE INDEX essname_namepartrevision_system_uuid_idx ON public.essname (system_uuid);
+CREATE INDEX essname_namepartrevision_subsystem_uuid_idx ON public.essname (subsystem_uuid);
+CREATE INDEX essname_namepartrevision_devicetype_uuid_idx ON public.essname (devicetype_uuid);
+CREATE INDEX essname_convention_name_idx ON public.essname (convention_name);
+CREATE INDEX essname_status_idx ON public.essname (status);
+CREATE INDEX essname_deleted_idx ON public.essname (deleted);
+
+CREATE INDEX systemgroup_latest_idx ON public.systemgroup (latest);
+CREATE INDEX system_latest_idx ON public.system (latest);
+CREATE INDEX subsystem_latest_idx ON public.subsystem (latest);
+
+CREATE INDEX discipline_latest_idx ON public.discipline (latest);
+CREATE INDEX devicegroup_latest_idx ON public.devicegroup (latest);
+CREATE INDEX devicetype_latest_idx ON public.devicetype (latest);
+
+CREATE INDEX essname_latest_idx ON public.essname (latest);
+-- --------------------------------------------------------------------------------
+-- primary key
+-- --------------------------------------------------------------------------------
+ALTER TABLE public.systemgroup ADD CONSTRAINT systemgroup_pk PRIMARY KEY (id);
+ALTER TABLE public.system ADD CONSTRAINT system_pk PRIMARY KEY (id);
+ALTER TABLE public.subsystem ADD CONSTRAINT subsystem_pk PRIMARY KEY (id);
+
+ALTER TABLE public.discipline ADD CONSTRAINT discipline_pk PRIMARY KEY (id);
+ALTER TABLE public.devicegroup ADD CONSTRAINT devicegroup_pk PRIMARY KEY (id);
+ALTER TABLE public.devicetype ADD CONSTRAINT devicetype_pk PRIMARY KEY (id);
+
+ALTER TABLE public.essname ADD CONSTRAINT essname_pk PRIMARY KEY (id);
+-- --------------------------------------------------------------------------------
diff --git a/docs/developer/refactoring/background_throughts_database/Appendix_B1/database_diagrams.pdf b/docs/developer/refactoring/background_throughts_database/Appendix_B1/database_diagrams.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..e672d601856fe14e4867067bb0b07e3a51b44437
Binary files /dev/null and b/docs/developer/refactoring/background_throughts_database/Appendix_B1/database_diagrams.pdf differ
diff --git a/docs/developer/refactoring/background_throughts_database/Appendix_B2/ns_database_schema.png b/docs/developer/refactoring/background_throughts_database/Appendix_B2/ns_database_schema.png
new file mode 100644
index 0000000000000000000000000000000000000000..7be9522f98f01c97fc72f3c9884e4ac0eda44bd4
Binary files /dev/null and b/docs/developer/refactoring/background_throughts_database/Appendix_B2/ns_database_schema.png differ
diff --git a/docs/developer/refactoring/background_throughts_database/database_diagrams.odg b/docs/developer/refactoring/background_throughts_database/database_diagrams.odg
new file mode 100644
index 0000000000000000000000000000000000000000..9de414388f92caad24b2dd4d7ecddb23d959420f
Binary files /dev/null and b/docs/developer/refactoring/background_throughts_database/database_diagrams.odg differ
diff --git a/docs/developer/refactoring/background_throughts_database/database_diagrams.pdf b/docs/developer/refactoring/background_throughts_database/database_diagrams.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..e672d601856fe14e4867067bb0b07e3a51b44437
Binary files /dev/null and b/docs/developer/refactoring/background_throughts_database/database_diagrams.pdf differ
diff --git a/docs/developer/refactoring/background_throughts_database/database_diagrams_add_on.odg b/docs/developer/refactoring/background_throughts_database/database_diagrams_add_on.odg
new file mode 100644
index 0000000000000000000000000000000000000000..bcb659c140e66b11cced21bc2afa184459c9ab7d
Binary files /dev/null and b/docs/developer/refactoring/background_throughts_database/database_diagrams_add_on.odg differ
diff --git a/docs/developer/refactoring/background_throughts_database/database_diagrams_add_on.pdf b/docs/developer/refactoring/background_throughts_database/database_diagrams_add_on.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..434e276b291791ca65a17f33bd30eb035257d099
Binary files /dev/null and b/docs/developer/refactoring/background_throughts_database/database_diagrams_add_on.pdf differ
diff --git a/docs/developer/refactoring/background_throughts_database/naming_thoughts_of_refactoring.odt b/docs/developer/refactoring/background_throughts_database/naming_thoughts_of_refactoring.odt
new file mode 100644
index 0000000000000000000000000000000000000000..ae1427a15e28487cccaad2f70d826634481db8ed
Binary files /dev/null and b/docs/developer/refactoring/background_throughts_database/naming_thoughts_of_refactoring.odt differ
diff --git a/docs/developer/refactoring/background_throughts_database/naming_thoughts_of_refactoring.pdf b/docs/developer/refactoring/background_throughts_database/naming_thoughts_of_refactoring.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..bffc1b49b4387ec044740275530db7abefd38247
Binary files /dev/null and b/docs/developer/refactoring/background_throughts_database/naming_thoughts_of_refactoring.pdf differ
diff --git a/docs/developer/refactoring/implementation/http_status_codes.txt b/docs/developer/refactoring/implementation/http_status_codes.txt
new file mode 100644
index 0000000000000000000000000000000000000000..4923e443540c4e37805ed46227c32c67c85fd383
--- /dev/null
+++ b/docs/developer/refactoring/implementation/http_status_codes.txt
@@ -0,0 +1,72 @@
+---------------------------------------------
+
+2xx success
+	200	OK
+	201	CREATED
+     ( 204	NO CONTENT )
+
+4xx client errors
+	400	BAD REQUEST
+	401	UNAUTHORIZED
+	403	FORBIDDEN
+	404	NOT FOUND
+	409	CONFLICT
+	422	UNPROCESSABLE ENTITY
+	424	FAILED DEPENDENCY
+
+5xx server errors
+	500	INTERNAL SERVER ERROR
+	503	SERVICE UNAVAILABLE
+
+---------------------------------------------
+
+2xx success
+	200	OK
+			The request succeeded. The result meaning of "success" depends on the HTTP method:
+
+			GET: The resource has been fetched and transmitted in the message body.
+			HEAD: The representation headers are included in the response without any message body.
+			PUT or POST: The resource describing the result of the action is transmitted in the message body.
+			TRACE: The message body contains the request message as received by the server.
+	201	CREATED
+    			The request succeeded, and a new resource was created as a result. 
+    			This is typically the response sent after POST requests, or some PUT requests.
+     ( 204	NO CONTENT )
+    			There is no content to send for this request, but the headers may be useful. 
+    			The user agent may update its cached headers for this resource with the new ones.
+
+4xx client errors
+	400	BAD REQUEST
+			The server cannot or will not process the request due to something that is perceived to be a client error 
+			(e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
+	401	UNAUTHORIZED
+			Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". 
+			That is, the client must authenticate itself to get the requested response. 
+	403	FORBIDDEN
+			The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing 
+			to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. 
+	404	NOT FOUND
+			The server can not find the requested resource. In the browser, this means the URL is not recognized. 
+			In an API, this can also mean that the endpoint is valid but the resource itself does not exist. 
+			Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. 
+			This response code is probably the most well known due to its frequent occurrence on the web. 
+	409	CONFLICT
+			This response is sent when a request conflicts with the current state of the server.
+	422	UNPROCESSABLE ENTITY
+			The request was well-formed but was unable to be followed due to semantic errors.
+	424	FAILED DEPENDENCY
+			The request failed due to failure of a previous request.
+
+5xx server errors
+	500	INTERNAL SERVER ERROR
+			The server has encountered a situation it does not know how to handle.
+	503	SERVICE UNAVAILABLE
+			The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. 
+			Note that together with this response, a user-friendly page explaining the problem should be sent. 
+			This response should be used for temporary conditions and the Retry-After HTTP header should, if possible, 
+			contain the estimated time before the recovery of the service. The webmaster must also take care about 
+			the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached. 
+
+
+
+
diff --git a/docs/developer/refactoring/implementation/naming_simplification_restapi_beans.txt b/docs/developer/refactoring/implementation/naming_simplification_restapi_beans.txt
new file mode 100644
index 0000000000000000000000000000000000000000..5b7661b2d150e89bf0ec1d699c0eef2d2b4d4f3f
--- /dev/null
+++ b/docs/developer/refactoring/implementation/naming_simplification_restapi_beans.txt
@@ -0,0 +1,304 @@
+
+----------------------------------------------------------------------------------------------------
+
+	NameElement
+		uuid
+		description
+		status
+		latest
+		deleted
+		when
+		who
+		comment
+		parentsystemstructure
+		parentdevicestructure
+		systemstructure
+		devicestructure
+		index
+		name
+
+	StructureElement
+		uuid
+		description
+		status
+		latest
+		deleted
+		when
+		who
+		comment
+		type
+		parent
+		name
+		mnemonic
+		mnemonicpath
+		level
+	
+----------------------------------------------------------------------------------------------------
+	CUD - create, update, delete
+
+	CUDNameElement
+		uuid
+		parentsystemstructure (uuid)
+		parentdevicestructure (uuid)
+		index
+		description
+		comment
+		
+		create -       parentsystemstructure, parentdevicestructure (optional), index, description, comment
+		update - uuid, parentsystemstructure, parentdevicestructure (optional), index, description, comment
+		delete - uuid,                                                                              comment
+		
+	CUDStructureElement
+		uuid
+		type   (SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE)
+		parent (uuid)
+		name
+		mnemonic
+		description
+		comment
+
+		create -       type, parent, name, mnemonic, description, comment
+		update - uuid, type, parent, name, mnemonic, description, comment
+		delete - uuid, type                                       comment
+----------------------------------------------------------------------------------------------------
+
+have
+
+	public abstract class BaseNameElement      implements Serializable {
+	public abstract class BaseStructureElement implements Serializable {
+	
+	public          class NameElement          extends BaseNameElement      implements Serializable {
+	public          class StructureElement     extends BaseStructureElement implements Serializable {
+	
+	or
+	
+	public abstract class CUDNameElement      implements Serializable {
+	public abstract class CUDStructureElement implements Serializable {
+	
+	public          class NameElement         extends CUDNameElement      implements Serializable {
+	public          class StructureElement    extends CUDStructureElement implements Serializable {
+	
+	or
+	
+	public abstract class NameElement         implements Serializable {
+	public abstract class StructureElement    implements Serializable {
+	
+	public          class NameElementAll      extends NameElement      implements Serializable {
+	public          class StructureElementAll extends StructureElement implements Serializable {
+
+	or
+	
+	public abstract class NameElement       implements Serializable {
+	public abstract class StructureElement  implements Serializable {
+	
+	public          class RNameElement      extends NameElement      implements Serializable {
+	public          class RStructureElement extends StructureElement implements Serializable {
+	
+
+instead of 
+
+	public abstract class NameStructureElement implements Serializable {
+	
+	public          class NameElement      extends NameStructureElement implements Serializable {
+	public          class StructureElement extends NameStructureElement implements Serializable {
+
+
+----------------------------------------------------------------------------------------------------
+	NameStructureElement
+		uuid
+		description
+		status
+		latest
+		deleted
+		when
+		who
+		comment
+		
+	NameElement      extends NameStructureElement
+		parentsystemstructure
+		parentdevicestructure
+		systemstructure
+		devicestructure
+		index
+		name	
+	StructureElement extends NameStructureElement
+		type
+		parent
+		name
+		mnemonic
+		mnemonicpath
+		level
+----------------------------------------------------------------------------------------------------
+	BaseNameElement
+		uuid
+		parentsystemstructure
+		parentdevicestructure
+		index
+		description
+		comment
+	BaseStructureElement
+		uuid
+		type
+		parent
+		name
+		mnemonic
+		description
+		comment
+
+	NameElement      extends BaseNameElement
+		status
+		latest
+		deleted
+		when
+		who
+		systemstructure
+		devicestructure
+		name
+	StructureElement extends BaseStructureElement
+		status
+		latest
+		deleted
+		when
+		who
+		mnemonicpath
+		level
+----------------------------------------------------------------------------------------------------
+
+NameElement
+NameElementCU
+NameElementDACR
+
+StructureElement
+StructureElementCU
+StructureElementDACR
+
+
+NameElement
+NameElementMedium
+NameElementShort
+
+StructureElement
+StructureElementMedium
+StructureElementShort
+
+NameElement
+NameElementMidi
+NameElementMini
+
+StructureElement
+StructureElementMidi
+StructureElementMini
+
+NameElement
+NameElementCreate
+NameElementUpdate
+NameElementDelete
+
+StructureElement
+StructureElementCreate
+StructureElementUpdate
+StructureElementDelete
+StructureElementDecision
+
+NameElementBase
+NameElement
+NameElementCreate
+NameElementUpdate
+NameElementDelete
+
+StructureElementBase
+StructureElement
+StructureElementCreate
+StructureElementUpdate
+StructureElementDelete
+StructureElementDecision
+
+NameElement
+NameElementCreate
+NameElementUpdate
+NameElementDelete
+
+StructureElement
+StructureElementCreate
+StructureElementCreateWithParent
+StructureElementUpdate
+StructureElementUpdateWithParent
+StructureElementDelete
+StructureElementDecision
+
+----------------------------------------------------------------------------------------------------
+
+NameElementBase
+NameElement
+		uuid
+		description
+		status
+		latest
+		deleted
+		when
+		who
+		comment
+		parentsystemstructure
+		parentdevicestructure
+		systemstructure
+		devicestructure
+		index
+		name
+NameElementCreate
+		parentsystemstructure
+		parentdevicestructure
+		index
+		description
+		comment
+NameElementUpdate
+		uuid
+		parentsystemstructure
+		parentdevicestructure
+		index
+		description
+		comment
+NameElementDelete
+		uuid
+		comment
+
+
+StructureElementBase
+StructureElement
+		uuid
+		description
+		status
+		latest
+		deleted
+		when
+		who
+		comment
+		type
+		parent
+		name
+		mnemonic
+		mnemonicpath
+		level
+StructureElementCreate
+		type   (SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE)
+		parent (uuid)
+		name
+		mnemonic
+		description
+		comment
+StructureElementUpdate
+		uuid
+		type   (SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE)
+		parent (uuid)
+		name
+		mnemonic
+		description
+		comment
+StructureElementDelete
+		uuid
+		type   (SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE)
+		comment
+StructureElementDecision
+		uuid
+		type   (SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE)
+		comment
+
diff --git a/docs/developer/refactoring/planning/design_frontend_restapi_backend.odg b/docs/developer/refactoring/planning/design_frontend_restapi_backend.odg
new file mode 100644
index 0000000000000000000000000000000000000000..475d2c5cd10d16cce21d4cba048163e134fd99fb
Binary files /dev/null and b/docs/developer/refactoring/planning/design_frontend_restapi_backend.odg differ
diff --git a/docs/developer/refactoring/planning/design_frontend_restapi_backend.pdf b/docs/developer/refactoring/planning/design_frontend_restapi_backend.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..3bf553a6f0883514454137c0fb4baa449daa8d85
Binary files /dev/null and b/docs/developer/refactoring/planning/design_frontend_restapi_backend.pdf differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_1.png b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..a508fed25d74ed1aeaa9f8dfe14bb47697531c47
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_2.png b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_2.png
new file mode 100644
index 0000000000000000000000000000000000000000..f43dc5ef673ad4a725e77714a68d6f824a09378a
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_2.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_3.png b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_3.png
new file mode 100644
index 0000000000000000000000000000000000000000..066b5e09b97db47ef42b49e23aef0e9ab5b7dc55
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_3.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_4.png b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_4.png
new file mode 100644
index 0000000000000000000000000000000000000000..097d5eb143358f6c1f585e21c604d33ab775b1f7
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/add_4.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/batch_add_1.png b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/batch_add_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..737acb64c2e8a1960915d75fef9805cdeccb6123
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/batch_add_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/batch_modify_1.png b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/batch_modify_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..1342f8d5326297fb6abaace1a716a686d285efd5
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/batch_modify_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/delete_1.png b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/delete_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..1882c36540ba0cd82f1fde03da1a94136ab6849a
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/delete_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/export_1.png b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/export_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..291d579f3289b95ea9b51b6a0e540e62ac1ec31f
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/export_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/view_history_1.png b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/view_history_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..fe602fe95ad03e966be4cb016578f33e7553a8da
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/ess_name_registry/view_history_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/naming_device_structure.png b/docs/developer/refactoring/planning/pictures/existing/naming_device_structure.png
new file mode 100644
index 0000000000000000000000000000000000000000..cb9b32a60606e7b709163c91e103083f413ef4ac
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/naming_device_structure.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/naming_ess_name_registry.png b/docs/developer/refactoring/planning/pictures/existing/naming_ess_name_registry.png
new file mode 100644
index 0000000000000000000000000000000000000000..8c51af3240cf4712255bd52d77cb85245b9b7493
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/naming_ess_name_registry.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/naming_help.png b/docs/developer/refactoring/planning/pictures/existing/naming_help.png
new file mode 100644
index 0000000000000000000000000000000000000000..be5af80f17b43f33e5c4894fa6141e79ebd2917e
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/naming_help.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/naming_home.png b/docs/developer/refactoring/planning/pictures/existing/naming_home.png
new file mode 100644
index 0000000000000000000000000000000000000000..49a2abe7dde03a5a63b52a21dd88b502c01dd330
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/naming_home.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/naming_system_structure.png b/docs/developer/refactoring/planning/pictures/existing/naming_system_structure.png
new file mode 100644
index 0000000000000000000000000000000000000000..295499f2c7d01630f75533d10fb75b3c1e8117c6
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/naming_system_structure.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/add_1.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/add_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..d7b39b932d39aead249c97cd4422dcd8a63ea2b5
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/add_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/add_2.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/add_2.png
new file mode 100644
index 0000000000000000000000000000000000000000..8520d478d70dee67c0fa375672ad4acd0d67c80c
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/add_2.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/add_3.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/add_3.png
new file mode 100644
index 0000000000000000000000000000000000000000..5da16dcaeb25d21155af87939aeb1db8b7f49025
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/add_3.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/approve_1.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/approve_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..cfb19e3f941ce623e4fedd333f40f27fb01fd19b
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/approve_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/batch_add_1.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/batch_add_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..41869718305414f3d424c8de6ddeef8c86b08b2d
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/batch_add_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/cancel_1.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/cancel_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..da19bfbfaa13334a6fc08817fdb94e298d682029
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/cancel_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/check_devices_1.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/check_devices_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..16e5ab725497c2b1f4b766c8f07481f5095fc0a7
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/check_devices_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/delete_1.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/delete_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..5048e78663a0f80b4d317f99b90e0b6cb4caa6ee
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/delete_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/modify_1.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/modify_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..5f521b904c8d9ccefc6b3001927ca1949bca3941
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/modify_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/modify_2.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/modify_2.png
new file mode 100644
index 0000000000000000000000000000000000000000..88fd7cd1b7d387b10e57127d4b0c7b57c50cd9cd
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/modify_2.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/modify_3.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/modify_3.png
new file mode 100644
index 0000000000000000000000000000000000000000..02836f622a6b21f7c243ee9221a56768364ba53f
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/modify_3.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/reject_1.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/reject_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..15f276be98953af4c22f295ee8208cd0e4a26d75
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/reject_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/existing/system_structure/view_history_1.png b/docs/developer/refactoring/planning/pictures/existing/system_structure/view_history_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..efe41cadb0a557e0593d1194edbd65a6b935f36e
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/existing/system_structure/view_history_1.png differ
diff --git a/docs/developer/refactoring/planning/pictures/refactoring/naming_application_header.png b/docs/developer/refactoring/planning/pictures/refactoring/naming_application_header.png
new file mode 100644
index 0000000000000000000000000000000000000000..2b478f78f99fd7b968312bd240f3f861263b0ce0
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/refactoring/naming_application_header.png differ
diff --git a/docs/developer/refactoring/planning/pictures/refactoring/naming_ess_names.png b/docs/developer/refactoring/planning/pictures/refactoring/naming_ess_names.png
new file mode 100644
index 0000000000000000000000000000000000000000..6a0a051e9cda6fb3e5485e334246dbb51b137eeb
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/refactoring/naming_ess_names.png differ
diff --git a/docs/developer/refactoring/planning/pictures/refactoring/naming_ess_names_orig.png b/docs/developer/refactoring/planning/pictures/refactoring/naming_ess_names_orig.png
new file mode 100644
index 0000000000000000000000000000000000000000..72e230a84e6d4ac463aa6ac505d92fe17c16fc94
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/refactoring/naming_ess_names_orig.png differ
diff --git a/docs/developer/refactoring/planning/pictures/refactoring/naming_ess_names_shorter.png b/docs/developer/refactoring/planning/pictures/refactoring/naming_ess_names_shorter.png
new file mode 100644
index 0000000000000000000000000000000000000000..db9836606beddc5c301023db703abd1defa64158
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/refactoring/naming_ess_names_shorter.png differ
diff --git a/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure.png b/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure.png
new file mode 100644
index 0000000000000000000000000000000000000000..9da171c5c1971f5b3f9c28540955dbd4aa60c568
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure.png differ
diff --git a/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure_orig.png b/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure_orig.png
new file mode 100644
index 0000000000000000000000000000000000000000..d3b1e2342c462d1786c1bae60943374b9396571a
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure_orig.png differ
diff --git a/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure_shorter.png b/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure_shorter.png
new file mode 100644
index 0000000000000000000000000000000000000000..e46373b39125972730c1cee2ad4b3e0e151c3789
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure_shorter.png differ
diff --git a/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure_shorter.png~ b/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure_shorter.png~
new file mode 100644
index 0000000000000000000000000000000000000000..92ae62df51fbc0c1c25be30582394de270e00694
Binary files /dev/null and b/docs/developer/refactoring/planning/pictures/refactoring/naming_system_structure_shorter.png~ differ
diff --git a/docs/developer/refactoring/planning/refactoring_tasks.ods b/docs/developer/refactoring/planning/refactoring_tasks.ods
new file mode 100644
index 0000000000000000000000000000000000000000..2a599a51e3a3f037012a570b1d8695e2bfbc7b8e
Binary files /dev/null and b/docs/developer/refactoring/planning/refactoring_tasks.ods differ
diff --git a/docs/developer/refactoring/planning/what_and_how.txt b/docs/developer/refactoring/planning/what_and_how.txt
new file mode 100644
index 0000000000000000000000000000000000000000..981f8cfd6bfa546005092db9e6d8c5e37f02f0e0
--- /dev/null
+++ b/docs/developer/refactoring/planning/what_and_how.txt
@@ -0,0 +1,294 @@
+Naming UI
+----------------------------------------------------------------------------------------------------
+----------------------------------------------------------------------------------------------------
+Home
+	text
+----------------------------------------------------------------------------------------------------
+ESS Name Registry
+	View
+	Filter
+	Columns
+	Actions
+	
+	View
+		ACTIVE
+		ARCHIVED
+		PENDING
+		CANCELLED
+	Filter
+		filter for System Structure down to subsection, checkboxes	
+	Columns
+		column toggler
+	Actions
+		Add
+		Modify
+		Delete
+		View History
+		Batch Add
+		Batch Modify
+		Export
+----------------------------------------------------------------------------------------------------
+System Structure
+	View
+		ACTIVE
+		ARCHIVED
+		PENDING
+		CANCELLED
+	Collapse
+		collapse treeview
+	Expand
+		expand treeview
+	Actions
+		Add
+		Modify
+		Delete
+		Cancel
+		Approve
+		Reject
+		Check Devices
+		View History
+		Batch Add
+----------------------------------------------------------------------------------------------------
+Device Structure
+	View
+		ACTIVE
+		ARCHIVED
+		PENDING
+		CANCELLED
+	Collapse
+		collapse treeview
+	Expand
+		expand treeview
+	Actions
+		Add
+		Modify
+		Delete
+		Cancel
+		Approve
+		Reject
+		Check Devices
+		View History
+----------------------------------------------------------------------------------------------------
+Help
+	text
+----------------------------------------------------------------------------------------------------
+====================================================================================================
+----------------------------------------------------------------------------------------------------
+Comments
+
+	Status
+		Database
+			devicerevision
+				-
+			namepartrevision
+				REJECTED
+				APPROVED
+				CANCELLED
+			
+		UI Filter
+			ACTIVE
+			ARCHIVED
+			PENDING
+			CANCELLED 			(also means Rejected)
+		ESS Name
+			-
+		System Structure
+			Approved
+			Archived
+			Cancelled
+			Pending
+			Rejected
+		Device Structure
+			Approved
+			Archived
+			Cancelled
+			Pending
+			Rejected
+		REST API
+			ESS name 
+				DELETED	- 	Acc:Ctrl-IOC-017
+				inget svar 	- 	A2T-050PRL:RFS-PRLTAP-054
+				OBSOLETE 	-	A2T-050PRL:RFS-PRLTap-054
+				ACTIVE 	- 	A2T-010Row:CnPw-U-001
+			part
+				Approved 	- 	Acc 					(4262e1e7-2444-412e-83d7-aeabf58262c6)
+				Approved 	- 	926aa9bd-a848-4058-852d-622a51d1c6a2   (history)
+				Pending 	- 	926aa9bd-a848-4058-852d-622a51d1c6a2   (history)
+				Archived 	- 	CF 					(926aa9bd-a848-4058-852d-622a51d1c6a2)
+				Rejected 	- 	TopSG1					(70e8e179-908a-433c-8551-508fce6dd061)
+				Cancelled 	- 	TopSG2					(5ce43673-2fcf-4494-bfd6-d3ccc77e59e5)
+	-->	should no answer instead be empty answer?
+----------------------------------------------------------------------------------------------------
+	Actions
+		ESS Name Registry
+			Actions
+				Add
+					admin & user
+					new entry = new uuid
+					new row in devicerevision
+					selection of system structure + opt. selection of device structure + opt. instance index + description
+					----------
+					transactionBean.conventionName()
+						mnemonic path from system structure
+						mnemonic path from device structure
+					transactionBean.validateMnemonic()
+						instance index
+						description
+					----------
+					transactionBean.submit()
+						action.execute(Add)
+							prepare
+							new row in devicerevision
+							persist
+					----------
+					recalculate caches
+				Modify
+					similar to Add
+					new row in devicerevision
+					----------
+					transactionBean.conventionName()
+					transactionBean.validateMnemonic()
+					transactionBean.submit()
+						action.execute(Modify)
+					----------
+					recalculate caches
+				Delete
+					similar to Add
+					new row in devicerevision
+					----------
+					affected devices
+					transactionBean.submit()
+						action.execute(Delete)
+					----------
+					recalculate caches
+				View History
+					line of history for uuid
+					one row in devicerevision will be 1 row of history entry
+					----------
+					nameViewProvider.getHistoryRevisionsAsRowData(getSelectedRecord().getDevice())
+				Batch Add
+					new rows in devicerevision
+					----------
+					parse file (excelImport)
+					transactionBean.submit()
+					----------
+					recalculate caches
+				Batch Modify
+					similar to Batch Add
+					----------
+					parse file (excelImport)
+					transactionBean.submit()
+					----------
+					recalculate caches
+				Export
+					export from cache to Excel
+					consider filter
+		System Structure
+			Actions
+				Add
+					admin & user
+					new entry = new uuid
+					new row in namepartrevision - PENDING
+					opt. selection of system structure + full name, mnemonic, description + commit message
+					----------
+					transactionBean.validateMnemonic()
+						mnemonic
+					----------
+					transactionBean.submit()
+						action.execute(Add)
+							prepare
+							new row in namepartrevision
+							persist
+						notify for approval
+					----------
+					recalculate caches
+				Modify
+					similar to Add
+					new row in devicerevision - PENDING
+					----------
+					affected devices
+					transactionBean.validateMnemonic()
+					----------
+					transactionBean.submit()
+						action.execute(Modify)
+						notify for approval
+					----------
+					recalculate caches
+				Delete
+					similar to Add
+					new row in devicerevision - PENDING
+					----------
+					affected devices
+					transactionBean.submit()
+						action.execute(Delete)
+						notify for approval
+					----------
+					recalculate caches
+				Cancel
+					admin & user
+					update row in namepartrevision - status
+					----------
+					affected devices
+					transactionBean.submit()
+						action.execute(Cancel)
+						notify
+					----------
+					recalculate caches
+				Approve
+					admin 
+					update row in namepartrevision - status
+					----------
+					affected devices
+					transactionBean.submit()
+						action.execute(Approve)
+							add
+							modify
+							delete
+						notify
+						possibly create ess names
+					----------
+					recalculate caches
+				Reject
+					admin
+					update row in namepartrevision - status
+					----------
+					affected devices
+					transactionBean.submit()
+						action.execute(Reject)
+						notify
+					----------
+					recalculate caches
+				Check Devices
+					admin
+					possibly new rows in devicerevision (check and possibly rename ess names)
+					----------
+					affected devices
+					transactionBean.submit()
+						action.execute(CheckDevices)
+						notify
+					----------
+					recalculate caches
+				View History
+					line of history for uuid
+					one row in namepartrevision will be 1 or 2 rows of history entries
+					----------
+					nameViewProvider.getHistoryRevisionsAsRowData(selectedNameView);
+				Batch Add
+					admin & user
+					new entry = new uuid
+					new rows in namepartrevision - PENDING
+					----------
+					parse file (excelImportNamePart)
+						validate
+					transactionBean.submit()
+						action.execute(Add)
+							prepare
+							new row in namepartrevision
+							persist
+						notify for approval
+					----------
+					recalculate caches
+		Device Structure
+			Actions
+				see Device Structure
+
diff --git a/docs/developer/refactoring/presentation/Naming_refactoring.pdf b/docs/developer/refactoring/presentation/Naming_refactoring.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..47ca15ee45d6684ca559a1343533f2fdcf161b53
Binary files /dev/null and b/docs/developer/refactoring/presentation/Naming_refactoring.pdf differ
diff --git a/docs/developer/refactoring/presentation/Naming_refactoring.pptx b/docs/developer/refactoring/presentation/Naming_refactoring.pptx
new file mode 100644
index 0000000000000000000000000000000000000000..af97308e01ecb574178ca80b096591beb3355416
Binary files /dev/null and b/docs/developer/refactoring/presentation/Naming_refactoring.pptx differ
diff --git a/docs/developer/refactoring/prototype/performance_measurement/naming_existing_refactored_times.xlsx b/docs/developer/refactoring/prototype/performance_measurement/naming_existing_refactored_times.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..93ef8b88a579cf0e95c06ea82eb3a76a74fffb87
Binary files /dev/null and b/docs/developer/refactoring/prototype/performance_measurement/naming_existing_refactored_times.xlsx differ
diff --git a/docs/developer/refactoring/prototype/performance_measurement/script_index.txt b/docs/developer/refactoring/prototype/performance_measurement/script_index.txt
new file mode 100644
index 0000000000000000000000000000000000000000..3b99f2b137c29460482066baa0da37bca3a02200
--- /dev/null
+++ b/docs/developer/refactoring/prototype/performance_measurement/script_index.txt
@@ -0,0 +1,604 @@
+-- --------------------------------------------------------------------------------
+-- About
+--     migration script
+--     postgresql 9.6.7
+-- Content
+--     structure
+--     data
+--     index
+--     primary key
+--     foreign key
+-- Note
+--     order of items is important
+-- --------------------------------------------------------------------------------
+-- structure
+-- --------------------------------------------------------------------------------
+CREATE TABLE namepartrevision_systemgroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+CREATE TABLE namepartrevision_system (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_subsystem (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE namepartrevision_discipline (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_devicegroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+
+CREATE TABLE namepartrevision_devicetype (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    parent_uuid character varying(255),
+    name character varying(255),
+    mnemonic character varying(255),
+    mnemonicEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+CREATE TABLE devicerevision_device(
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255),
+    namepartrevision_systemgroup_uuid character varying(255),
+    namepartrevision_system_uuid character varying(255),
+    namepartrevision_subsystem_uuid character varying(255),
+    namepartrevision_devicetype_uuid character varying(255),
+    instanceIndex character varying(255),
+    conventionName character varying(255),
+    conventionNameEquivalence character varying(255),
+    description character varying(255),
+    status character varying(255),
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requestedBy character varying(255),
+    requestedComment character varying(255),
+    processed timestamp without time zone,
+    processedBy character varying(255),
+    processedComment character varying(255)
+);
+-- --------------------------------------------------------------------------------
+-- level 1
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_systemgroup (
+    id,
+    version,
+    uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr1.id, npr1."version", np1.uuid, npr1."name", npr1.mnemonic, npr1.mnemoniceqclass, npr1.description, npr1.status, false, npr1.deleted, 
+npr1.requestdate, ua_r.username as requestedBy, npr1.requestercomment, npr1.processdate, ua_p.username as processedBy, npr1.processorcomment 
+from namepartrevision npr1 
+inner join namepart np1 on npr1.namepart_id = np1.id
+left join useraccount ua_r on npr1.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr1.processedby_id = ua_p.id 
+where np1.nameparttype = 'SECTION' and npr1.parent_id is null;
+
+insert into namepartrevision_discipline (
+    id,
+    version,
+    uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr1.id, npr1."version", np1.uuid, npr1."name", npr1.mnemonic, npr1.mnemoniceqclass, npr1.description, npr1.status, false, npr1.deleted, 
+npr1.requestdate, ua_r.username as requestedBy, npr1.requestercomment, npr1.processdate, ua_p.username as processedBy, npr1.processorcomment 
+from namepartrevision npr1 
+inner join namepart np1 on npr1.namepart_id = np1.id
+left join useraccount ua_r on npr1.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr1.processedby_id = ua_p.id 
+where np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null;
+-- --------------------------------------------------------------------------------
+-- level 2
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_system (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr2.id, npr2."version", np2.uuid, np22.uuid, 
+npr2."name", npr2.mnemonic, npr2.mnemoniceqclass, npr2.description, 
+npr2.status, false, npr2.deleted, npr2.requestdate, ua_r.username as requestedBy, npr2.requestercomment, npr2.processdate, ua_p.username as processedBy, npr2.processorcomment 
+from namepartrevision npr2
+inner join namepart np2  on npr2.namepart_id = np2.id
+inner join namepart np22 on npr2.parent_id   = np22.id
+left join useraccount ua_r on npr2.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr2.processedby_id = ua_p.id 
+where np2.nameparttype = 'SECTION' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'SECTION' and npr1.parent_id is null);
+
+insert into namepartrevision_devicegroup (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr2.id, npr2."version", np2.uuid, np22.uuid, 
+npr2."name", npr2.mnemonic, npr2.mnemoniceqclass, npr2.description, 
+npr2.status, false, npr2.deleted, npr2.requestdate, ua_r.username as requestedBy, npr2.requestercomment, npr2.processdate, ua_p.username as processedBy, npr2.processorcomment 
+from namepartrevision npr2
+inner join namepart np2  on npr2.namepart_id = np2.id
+inner join namepart np22 on npr2.parent_id   = np22.id
+left join useraccount ua_r on npr2.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr2.processedby_id = ua_p.id 
+where np2.nameparttype = 'DEVICE_TYPE' and npr2.parent_id in
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null);
+-- --------------------------------------------------------------------------------
+-- level 3
+-- --------------------------------------------------------------------------------
+insert into namepartrevision_subsystem (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr3.id, npr3."version", np3.uuid, np32.uuid, 
+npr3."name", npr3.mnemonic, npr3.mnemoniceqclass, npr3.description, 
+npr3.status, false, npr3.deleted, npr3.requestdate, ua_r.username as requestedBy, npr3.requestercomment, npr3.processdate, ua_p.username as processedBy, npr3.processorcomment 
+from namepartrevision npr3 
+inner join namepart np3  on npr3.namepart_id = np3.id
+inner join namepart np32 on npr3.parent_id   = np32.id
+left join useraccount ua_r on npr3.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr3.processedby_id = ua_p.id 
+where np3.nameparttype = 'SECTION' and npr3.parent_id in 
+(
+select npr2.namepart_id from namepartrevision npr2, namepart np2 where npr2.namepart_id = np2.id and np2.nameparttype = 'SECTION' and npr2.parent_id in 
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'SECTION' and npr1.parent_id is null)
+);
+
+insert into namepartrevision_devicetype (
+    id,
+    version,
+    uuid,
+    parent_uuid,
+    name,
+    mnemonic,
+    mnemonicEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select npr3.id, npr3."version", np3.uuid, np32.uuid, 
+npr3."name", npr3.mnemonic, npr3.mnemoniceqclass, npr3.description, 
+npr3.status, false, npr3.deleted, npr3.requestdate, ua_r.username as requestedBy, npr3.requestercomment, npr3.processdate, ua_p.username as processedBy, npr3.processorcomment 
+from namepartrevision npr3 
+inner join namepart np3  on npr3.namepart_id = np3.id
+inner join namepart np32 on npr3.parent_id   = np32.id
+left join useraccount ua_r on npr3.requestedby_id = ua_r.id 
+left join useraccount ua_p on npr3.processedby_id = ua_p.id 
+where np3.nameparttype = 'DEVICE_TYPE' and npr3.parent_id in 
+(
+select npr2.namepart_id from namepartrevision npr2, namepart np2 where npr2.namepart_id = np2.id and np2.nameparttype = 'DEVICE_TYPE' and npr2.parent_id in 
+(select npr1.namepart_id from namepartrevision npr1, namepart np1 where npr1.namepart_id = np1.id and np1.nameparttype = 'DEVICE_TYPE' and npr1.parent_id is null)
+);
+-- --------------------------------------------------------------------------------
+-- device
+-- --------------------------------------------------------------------------------
+-- level 1
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    uuid,
+    namepartrevision_systemgroup_uuid,
+    namepartrevision_system_uuid,
+    namepartrevision_subsystem_uuid,
+    namepartrevision_devicetype_uuid,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, d.uuid, 
+np_s.uuid, 
+null, 
+null, 
+np_d.uuid, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, false, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id is null
+);
+-- --------------------------------------------------------------------------------
+-- level 2
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    uuid,
+    namepartrevision_systemgroup_uuid,
+    namepartrevision_system_uuid,
+    namepartrevision_subsystem_uuid,
+    namepartrevision_devicetype_uuid,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, d.uuid, 
+null, 
+np_s.uuid, 
+null, 
+np_d.uuid, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, false, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in 
+    (
+    select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id is null
+    )
+);
+-- --------------------------------------------------------------------------------
+-- level 3
+-- --------------------------------------------------------------------------------
+insert into devicerevision_device (
+    id,
+    version,
+    uuid,
+    namepartrevision_systemgroup_uuid,
+    namepartrevision_system_uuid,
+    namepartrevision_subsystem_uuid,
+    namepartrevision_devicetype_uuid,
+    instanceIndex, 
+    conventionName,
+    conventionNameEquivalence,
+    description,
+    status,
+    latest,
+    deleted,
+    requested,
+    requestedBy,
+    requestedComment, 
+    processed,
+    processedBy, 
+    processedComment
+)
+select dr.id, dr.version, d.uuid, 
+null, 
+null, 
+np_s.uuid, 
+np_d.uuid, 
+dr.instanceindex, dr.conventionname, dr.conventionnameeqclass, dr.additionalinfo, null, false, dr.deleted, 
+dr.requestdate, ua_r.username as requestedBy, null, null, null, dr.processorComment 
+from devicerevision dr 
+inner join device d on dr.device_id = d.id 
+inner join namepart np_s on dr.section_id    = np_s.id
+left outer join namepart np_d on dr.devicetype_id = np_d.id
+left join useraccount ua_r on dr.requestedby_id = ua_r.id 
+where dr.section_id in 
+(
+select np.id from namepart np, namepartrevision npr where np.id = npr.namepart_id and npr.parent_id in 
+    (
+    select np2.id from namepart np2, namepartrevision npr2 where np2.id = npr2.namepart_id and npr2.parent_id in 
+        (
+        select np3.id from namepart np3, namepartrevision npr3 where np3.id = npr3.namepart_id and npr3.parent_id is null
+        )
+    )
+);
+-- --------------------------------------------------------------------------------
+-- index
+-- --------------------------------------------------------------------------------
+--CREATE INDEX namepartrevision_systemgroup_id_idx ON public.namepartrevision_systemgroup (id);
+CREATE INDEX namepartrevision_systemgroup_uuid_idx ON public.namepartrevision_systemgroup (uuid);
+CREATE INDEX namepartrevision_systemgroup_mnemonic_idx ON public.namepartrevision_systemgroup (mnemonic);
+--CREATE INDEX namepartrevision_systemgroup_status_idx ON public.namepartrevision_systemgroup (status);
+
+--CREATE INDEX namepartrevision_system_id_idx ON public.namepartrevision_system (id);
+CREATE INDEX namepartrevision_system_uuid_idx ON public.namepartrevision_system (uuid);
+CREATE INDEX namepartrevision_system_parent_uuid_idx ON public.namepartrevision_system (parent_uuid);
+CREATE INDEX namepartrevision_system_mnemonic_idx ON public.namepartrevision_system (mnemonic);
+--CREATE INDEX namepartrevision_system_status_idx ON public.namepartrevision_system (status);
+
+--CREATE INDEX namepartrevision_subsystem_id_idx ON public.namepartrevision_subsystem (id);
+CREATE INDEX namepartrevision_subsystem_uuid_idx ON public.namepartrevision_subsystem (uuid);
+CREATE INDEX namepartrevision_subsystem_parent_uuid_idx ON public.namepartrevision_subsystem (parent_uuid);
+CREATE INDEX namepartrevision_subsystem_mnemonic_idx ON public.namepartrevision_subsystem (mnemonic);
+--CREATE INDEX namepartrevision_subsystem_status_idx ON public.namepartrevision_subsystem (status);
+
+--CREATE INDEX namepartrevision_discipline_id_idx ON public.namepartrevision_discipline (id);
+CREATE INDEX namepartrevision_discipline_uuid_idx ON public.namepartrevision_discipline (uuid);
+CREATE INDEX namepartrevision_discipline_mnemonic_idx ON public.namepartrevision_discipline (mnemonic);
+--CREATE INDEX namepartrevision_discipline_status_idx ON public.namepartrevision_discipline (status);
+
+--CREATE INDEX namepartrevision_devicegroup_id_idx ON public.namepartrevision_devicegroup (id);
+CREATE INDEX namepartrevision_devicegroup_uuid_idx ON public.namepartrevision_devicegroup (uuid);
+CREATE INDEX namepartrevision_devicegroup_parent_uuid_idx ON public.namepartrevision_devicegroup (parent_uuid);
+CREATE INDEX namepartrevision_devicegroup_mnemonic_idx ON public.namepartrevision_devicegroup (mnemonic);
+--CREATE INDEX namepartrevision_devicegroup_status_idx ON public.namepartrevision_devicegroup (status);
+
+--CREATE INDEX namepartrevision_devicetype_id_idx ON public.namepartrevision_devicetype (id);
+CREATE INDEX namepartrevision_devicetype_uuid_idx ON public.namepartrevision_devicetype (uuid);
+CREATE INDEX namepartrevision_devicetype_parent_uuid_idx ON public.namepartrevision_devicetype (parent_uuid);
+CREATE INDEX namepartrevision_devicetype_mnemonic_idx ON public.namepartrevision_devicetype (mnemonic);
+--CREATE INDEX namepartrevision_devicetype_status_idx ON public.namepartrevision_devicetype (status);
+
+CREATE INDEX devicerevision_device_uuid_idx ON public.devicerevision_device (uuid);
+-- --------------------------------------------------------------------------------
+-- update latest
+-- --------------------------------------------------------------------------------
+update namepartrevision_systemgroup sg set latest = true where sg.id = (
+  select max(sg2.id) from namepartrevision_systemgroup sg2 where sg2.uuid = sg.uuid 
+);
+update namepartrevision_system sys set latest = true where sys.id = (
+  select max(sys2.id) from namepartrevision_system sys2 where sys2.uuid = sys.uuid 
+);
+update namepartrevision_subsystem sub set latest = true where sub.id = (
+  select max(sub2.id) from namepartrevision_subsystem sub2 where sub2.uuid = sub.uuid 
+);
+
+update namepartrevision_discipline di set latest = true where di.id = (
+  select max(di2.id) from namepartrevision_discipline di2 where di2.uuid = di.uuid 
+);
+update namepartrevision_devicegroup dg set latest = true where dg.id = (
+  select max(dg2.id) from namepartrevision_devicegroup dg2 where dg2.uuid = dg.uuid 
+);
+update namepartrevision_devicetype dt set latest = true where dt.id = (
+  select max(dt2.id) from namepartrevision_devicetype dt2 where dt2.uuid = dt.uuid 
+);
+
+update devicerevision_device dd set latest = true where dd.id = (
+  select max(dd2.id) from devicerevision_device dd2 where dd2.uuid = dd.uuid 
+);
+-- --------------------------------------------------------------------------------
+-- foreign key
+-- --------------------------------------------------------------------------------
+-- --------------------------------------------------------------------------------
+-- index
+-- --------------------------------------------------------------------------------
+--CREATE INDEX devicerevision_device_id_idx ON public.devicerevision_device (id);
+CREATE INDEX devicerevision_device_namepartrevision_systemgroup_uuid_idx ON public.devicerevision_device (namepartrevision_systemgroup_uuid);
+CREATE INDEX devicerevision_device_namepartrevision_system_uuid_idx ON public.devicerevision_device (namepartrevision_system_uuid);
+CREATE INDEX devicerevision_device_namepartrevision_subsystem_uuid_idx ON public.devicerevision_device (namepartrevision_subsystem_uuid);
+CREATE INDEX devicerevision_device_namepartrevision_devicetype_uuid_idx ON public.devicerevision_device (namepartrevision_devicetype_uuid);
+CREATE INDEX devicerevision_device_conventionname_idx ON public.devicerevision_device (conventionname);
+--CREATE INDEX devicerevision_device_status_idx ON public.devicerevision_device (status);
+
+--  CREATE INDEX namepartrevision_systemgroup_latest_idx ON public.namepartrevision_systemgroup (latest);
+--  CREATE INDEX namepartrevision_system_latest_idx ON public.namepartrevision_system (latest);
+--  CREATE INDEX namepartrevision_subsystem_latest_idx ON public.namepartrevision_subsystem (latest);
+
+--  CREATE INDEX namepartrevision_discipline_latest_idx ON public.namepartrevision_discipline (latest);
+--  CREATE INDEX namepartrevision_devicegroup_latest_idx ON public.namepartrevision_devicegroup (latest);
+--  CREATE INDEX namepartrevision_devicetype_latest_idx ON public.namepartrevision_devicetype (latest);
+
+--CREATE INDEX namepartrevision_systemgroup_latest_uuid_idx ON public.namepartrevision_systemgroup (latest, uuid);
+--CREATE INDEX namepartrevision_system_latest_uuid_idx ON public.namepartrevision_system (latest, uuid);
+--CREATE INDEX namepartrevision_subsystem_latest_uuid_idx ON public.namepartrevision_subsystem (latest, uuid);
+
+--CREATE INDEX namepartrevision_discipline_latest_uuid_idx ON public.namepartrevision_discipline (latest, uuid);
+--CREATE INDEX namepartrevision_devicegroup_latest_uuid_idx ON public.namepartrevision_devicegroup (latest, uuid);
+--CREATE INDEX namepartrevision_devicetype_latest_uuid_idx ON public.namepartrevision_devicetype (latest, uuid);
+
+--CREATE INDEX namepartrevision_systemgroup_latest_mnemonic_idx ON public.namepartrevision_systemgroup (latest, mnemonic);
+--CREATE INDEX namepartrevision_system_latest_mnemonic_idx ON public.namepartrevision_system (latest, mnemonic);
+--CREATE INDEX namepartrevision_subsystem_latest_mnemonic_idx ON public.namepartrevision_subsystem (latest, mnemonic);
+
+--CREATE INDEX namepartrevision_discipline_latest_mnemonic_idx ON public.namepartrevision_discipline (latest, mnemonic);
+--CREATE INDEX namepartrevision_devicegroup_latest_mnemonic_idx ON public.namepartrevision_devicegroup (latest, mnemonic);
+--CREATE INDEX namepartrevision_devicetype_latest_mnemonic_idx ON public.namepartrevision_devicetype (latest, mnemonic);
+
+--CREATE INDEX namepartrevision_systemgroup_latest_uuid_mnemonic_idx ON public.namepartrevision_systemgroup (latest, uuid, mnemonic);
+--CREATE INDEX namepartrevision_system_latest_uuid_mnemonic_idx ON public.namepartrevision_system (latest, uuid, mnemonic);
+--CREATE INDEX namepartrevision_subsystem_latest_uuid_mnemonic_idx ON public.namepartrevision_subsystem (latest, uuid, mnemonic);
+
+--CREATE INDEX namepartrevision_discipline_latest_uuid_mnemonic_idx ON public.namepartrevision_discipline (latest, uuid, mnemonic);
+--CREATE INDEX namepartrevision_devicegroup_latest_uuid_mnemonic_idx ON public.namepartrevision_devicegroup (latest, uuid, mnemonic);
+--CREATE INDEX namepartrevision_devicetype_latest_uuid_mnemonic_idx ON public.namepartrevision_devicetype (latest, uuid, mnemonic);
+
+--  CREATE INDEX devicerevision_device_latest_idx ON public.devicerevision_device (latest);
+
+--CREATE INDEX devicerevision_device_latest_uuid_idx ON public.devicerevision_device (latest, uuid);
+--CREATE INDEX devicerevision_device_latest_namepartrevision_systemgroup_uuid_idx ON public.devicerevision_device (latest, namepartrevision_systemgroup_uuid);
+--CREATE INDEX devicerevision_device_latest_namepartrevision_system_uuid_idx ON public.devicerevision_device (latest, namepartrevision_system_uuid);
+--CREATE INDEX devicerevision_device_latest_namepartrevision_subsystem_uuid_idx ON public.devicerevision_device (latest, namepartrevision_subsystem_uuid);
+--CREATE INDEX devicerevision_device_latest_namepartrevision_devicetype_uuid_idx ON public.devicerevision_device (latest, namepartrevision_devicetype_uuid);
+--CREATE INDEX devicerevision_device_latest_conventionname_idx ON public.devicerevision_device (latest, conventionname);
+-- --------------------------------------------------------------------------------
+-- primary key
+-- --------------------------------------------------------------------------------
+ALTER TABLE public.namepartrevision_systemgroup ADD CONSTRAINT namepartrevision_systemgroup_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_system ADD CONSTRAINT namepartrevision_system_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_subsystem ADD CONSTRAINT namepartrevision_subsystem_pk PRIMARY KEY (id);
+
+ALTER TABLE public.namepartrevision_discipline ADD CONSTRAINT namepartrevision_discipline_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_devicegroup ADD CONSTRAINT namepartrevision_devicegroup_pk PRIMARY KEY (id);
+ALTER TABLE public.namepartrevision_devicetype ADD CONSTRAINT namepartrevision_devicetype_pk PRIMARY KEY (id);
+
+ALTER TABLE public.devicerevision_device ADD CONSTRAINT devicerevision_device_pk PRIMARY KEY (id);
+-- --------------------------------------------------------------------------------
+
diff --git a/docs/developer/refactoring/rest_api/endpoints/naming_rest_api.ods b/docs/developer/refactoring/rest_api/endpoints/naming_rest_api.ods
new file mode 100644
index 0000000000000000000000000000000000000000..9090f2b56ddc737e88ea62b7b7972b67fd8f8c6d
Binary files /dev/null and b/docs/developer/refactoring/rest_api/endpoints/naming_rest_api.ods differ
diff --git a/docs/developer/refactoring/rest_api/endpoints/naming_rest_api_refactored.ods b/docs/developer/refactoring/rest_api/endpoints/naming_rest_api_refactored.ods
new file mode 100644
index 0000000000000000000000000000000000000000..fbde58b866fb90eb299cc6148dc1f7cfc5cc5112
Binary files /dev/null and b/docs/developer/refactoring/rest_api/endpoints/naming_rest_api_refactored.ods differ
diff --git a/docs/developer/refactoring/rest_api/endpoints/naming_rest_api_refactored.xlsx b/docs/developer/refactoring/rest_api/endpoints/naming_rest_api_refactored.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..cf16111a6b95c29a28deca52998e68a275fc3ad8
Binary files /dev/null and b/docs/developer/refactoring/rest_api/endpoints/naming_rest_api_refactored.xlsx differ
diff --git a/docs/developer/refactoring/rest_api/naming_concepts_and_terminology.odt b/docs/developer/refactoring/rest_api/naming_concepts_and_terminology.odt
new file mode 100644
index 0000000000000000000000000000000000000000..4ed3ac0b48afee0190c8293804daaaf15db421cc
Binary files /dev/null and b/docs/developer/refactoring/rest_api/naming_concepts_and_terminology.odt differ
diff --git a/docs/developer/refactoring/rest_api/naming_concepts_and_terminology.pdf b/docs/developer/refactoring/rest_api/naming_concepts_and_terminology.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7d02d06abcac0e9583db91453450d262b70ced93
Binary files /dev/null and b/docs/developer/refactoring/rest_api/naming_concepts_and_terminology.pdf differ
diff --git a/docs/developer/refactoring/rest_api/naming_rest_api_brief_introduction.odt b/docs/developer/refactoring/rest_api/naming_rest_api_brief_introduction.odt
new file mode 100644
index 0000000000000000000000000000000000000000..96477e428fe42f66775ee57fa6269cf08f757d30
Binary files /dev/null and b/docs/developer/refactoring/rest_api/naming_rest_api_brief_introduction.odt differ
diff --git a/docs/developer/refactoring/rest_api/naming_rest_api_brief_introduction.pdf b/docs/developer/refactoring/rest_api/naming_rest_api_brief_introduction.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..c73a529a3f0cb1e2ecb044fc38a10f8a84ba0894
Binary files /dev/null and b/docs/developer/refactoring/rest_api/naming_rest_api_brief_introduction.pdf differ
diff --git a/docs/developer/refactoring/templates/NameElementCommand.xlsx b/docs/developer/refactoring/templates/NameElementCommand.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..04db6c54a4d35f2b81fd79e2827ba481bb54b4d5
Binary files /dev/null and b/docs/developer/refactoring/templates/NameElementCommand.xlsx differ
diff --git a/docs/developer/refactoring/templates/StructureElementCommand.xlsx b/docs/developer/refactoring/templates/StructureElementCommand.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..95ac1775957aced5957b45ddbb8e1191b4687112
Binary files /dev/null and b/docs/developer/refactoring/templates/StructureElementCommand.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_create.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_create.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..8210121cc940ee0be54c483c30f510e7503ebab6
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_create.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_create_error.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_create_error.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..e419aa75a460137bcb4fa3029088ead84bac399c
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_create_error.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_create_error2.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_create_error2.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..73d9337d1c9b812352846586cf2a736e21198797
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_create_error2.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_create_error3.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_create_error3.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..b8b2016c64930fd8812e015a13100e1119f279bd
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_create_error3.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_delete.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_delete.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..4b172967bfd9aeb68edc629c4f3f42a805b486ee
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_delete.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_delete2.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_delete2.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..349107ec204ae85efe2c66d4328978372801d4f2
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_delete2.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_delete3.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_delete3.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..56ea8ec8b03e9b374b85a3ec3d21032d10d006c5
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_delete3.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_delete_4.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_delete_4.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..234634820fc2b83aacafe976f9b7b4c11013f941
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_delete_4.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_original.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_original.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..04db6c54a4d35f2b81fd79e2827ba481bb54b4d5
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_original.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_update.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_update.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..967996f3330bb73e64dc0296f7488a3aa4b25e33
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_update.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElementCommand_update2.xlsx b/docs/developer/refactoring/templates/test/NameElementCommand_update2.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..b02e5aad42a9e8adf6d356cb7e6d0296583fe0f8
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElementCommand_update2.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElement_create_after.xlsx b/docs/developer/refactoring/templates/test/NameElement_create_after.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..c13290e442a0332f2a876216c79a4e8d254ecdce
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElement_create_after.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElement_create_after_2.xlsx b/docs/developer/refactoring/templates/test/NameElement_create_after_2.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..ba0c7c58bec1a1056f2b2dfcf79e29c30e38f205
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElement_create_after_2.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElement_create_after_3.xlsx b/docs/developer/refactoring/templates/test/NameElement_create_after_3.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..8714865c3386ffee0dfde2b9681bd2eda83688c0
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElement_create_after_3.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElement_delete_after.xlsx b/docs/developer/refactoring/templates/test/NameElement_delete_after.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..f73ed49d9738e433e99a8bd968fbdbdae25c7874
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElement_delete_after.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElement_delete_after_2.xlsx b/docs/developer/refactoring/templates/test/NameElement_delete_after_2.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..5f0fd14b02d28aeca64e0d9b27be1cb9b0846fa6
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElement_delete_after_2.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElement_delete_after_3.xlsx b/docs/developer/refactoring/templates/test/NameElement_delete_after_3.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..c44ab4dc67c564bc44fdbad93ca05154bbb4a835
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElement_delete_after_3.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElement_read.xlsx b/docs/developer/refactoring/templates/test/NameElement_read.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..8d0ca6d34d941e24d89ce157f8289291719f9e2d
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElement_read.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElement_read_after_delete.xlsx b/docs/developer/refactoring/templates/test/NameElement_read_after_delete.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..056ac02455cdadea1ee63399739bd4ec2d2cb26a
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElement_read_after_delete.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElement_read_after_update.xlsx b/docs/developer/refactoring/templates/test/NameElement_read_after_update.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..915949861da783c71b4232a98f1ecc3b71e8f592
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElement_read_after_update.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/NameElement_update_after.xlsx b/docs/developer/refactoring/templates/test/NameElement_update_after.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..4b172967bfd9aeb68edc629c4f3f42a805b486ee
Binary files /dev/null and b/docs/developer/refactoring/templates/test/NameElement_update_after.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElementCommand_approve.xlsx b/docs/developer/refactoring/templates/test/StructureElementCommand_approve.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..9fbad5cd804a08e090efe94c908e25f703e94bc3
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElementCommand_approve.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElementCommand_approve_error.xlsx b/docs/developer/refactoring/templates/test/StructureElementCommand_approve_error.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..2136c5adc8fd38b28ab6a83c3ebd7ba6d7db917f
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElementCommand_approve_error.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElementCommand_create.xlsx b/docs/developer/refactoring/templates/test/StructureElementCommand_create.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..4d79463bf91b4ce2b4705624a622c2a43d1cb641
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElementCommand_create.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElementCommand_create_error.xlsx b/docs/developer/refactoring/templates/test/StructureElementCommand_create_error.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..563fc754f52800c3f723444f2277b5b5f750d246
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElementCommand_create_error.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElementCommand_delete.xlsx b/docs/developer/refactoring/templates/test/StructureElementCommand_delete.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..bc49811a69d261c3cf02be99bb9c85cb3c121471
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElementCommand_delete.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElementCommand_delete_error.xlsx b/docs/developer/refactoring/templates/test/StructureElementCommand_delete_error.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..a51044c26622eb3fb1d329d17fb66fe21ee29cc4
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElementCommand_delete_error.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElementCommand_original.xlsx b/docs/developer/refactoring/templates/test/StructureElementCommand_original.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..95ac1775957aced5957b45ddbb8e1191b4687112
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElementCommand_original.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_approve_after.xlsx b/docs/developer/refactoring/templates/test/StructureElement_approve_after.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..a51044c26622eb3fb1d329d17fb66fe21ee29cc4
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_approve_after.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_approve_after_2.xlsx b/docs/developer/refactoring/templates/test/StructureElement_approve_after_2.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..56cf0bd81c785e4b6a4da7d8b61659b8c924f171
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_approve_after_2.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_approve_after_delete.xlsx b/docs/developer/refactoring/templates/test/StructureElement_approve_after_delete.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..0646e971d6e24274b181d3953024855cb693645e
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_approve_after_delete.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_approve_after_delete_2.xlsx b/docs/developer/refactoring/templates/test/StructureElement_approve_after_delete_2.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..c5eec3c23c6254bff5207c4df44a6bf5eb83e4c6
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_approve_after_delete_2.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_approve_after_delete_error.xlsx b/docs/developer/refactoring/templates/test/StructureElement_approve_after_delete_error.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..1fb6fd35fcaee9319562839471fc514dd16cbc02
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_approve_after_delete_error.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_create_after.xlsx b/docs/developer/refactoring/templates/test/StructureElement_create_after.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..2136c5adc8fd38b28ab6a83c3ebd7ba6d7db917f
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_create_after.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_create_after_2.xlsx b/docs/developer/refactoring/templates/test/StructureElement_create_after_2.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..6de0c1c42efed77d1c149d80f881012b6ff26789
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_create_after_2.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_create_after_3.xlsx b/docs/developer/refactoring/templates/test/StructureElement_create_after_3.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..d65364452d72c41166cb47a127f57fc19683bbdb
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_create_after_3.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_create_after_3_error.xlsx b/docs/developer/refactoring/templates/test/StructureElement_create_after_3_error.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..1d56770b9dc6339abcc93a2e01cbcdb81e05662a
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_create_after_3_error.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_delete_after.xlsx b/docs/developer/refactoring/templates/test/StructureElement_delete_after.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..053d913062e78ca6416c2026e7b5f935a2ac54d5
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_delete_after.xlsx differ
diff --git a/docs/developer/refactoring/templates/test/StructureElement_delete_after_2.xlsx b/docs/developer/refactoring/templates/test/StructureElement_delete_after_2.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..189e7bae1a66665891fb3b27986e3a5d702839ee
Binary files /dev/null and b/docs/developer/refactoring/templates/test/StructureElement_delete_after_2.xlsx differ
diff --git a/docs/developer/refactoring/ui/naming_ui_thoughts_sketches.odg b/docs/developer/refactoring/ui/naming_ui_thoughts_sketches.odg
new file mode 100644
index 0000000000000000000000000000000000000000..fbd17577d455b7555574bda7f61415557e198050
Binary files /dev/null and b/docs/developer/refactoring/ui/naming_ui_thoughts_sketches.odg differ
diff --git a/docs/developer/refactoring/ui/naming_ui_thoughts_sketches.pdf b/docs/developer/refactoring/ui/naming_ui_thoughts_sketches.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..4d36c6f6f4471af3ba1eb11f99da91a44850e38b
Binary files /dev/null and b/docs/developer/refactoring/ui/naming_ui_thoughts_sketches.pdf differ
diff --git a/docs/developer/refactoring/ui/ui_thoughts.txt b/docs/developer/refactoring/ui/ui_thoughts.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f59d49af08ff859c74974db38061c5c73572a947
--- /dev/null
+++ b/docs/developer/refactoring/ui/ui_thoughts.txt
@@ -0,0 +1,44 @@
+ESS Name				System structure		Device structure		Description
+
+AccPSS					AccPSS								PSS Area Status Accelerator PSS
+AccPSS-AcSy				AccPSS-AcSy							System structure only
+AccPSS:Ctrl-IOC-1			AccPSS				Ctrl-IOC-1			IOC for PSS1
+AccPSS-HBL1				AccPSS-HBL1							PSS Area Status High Beta Linac Part 1
+AccPSS-HBL1:Ctrl-DI-110			AccPSS-HBL1			Ctrl-DI-110			DI Module, Slot 10, I/O Configuration 1
+A2T-010PRL:RFS-PRLTap-054		A2T-010PRL			RFS-PRLTap-054			
+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+ESS Name				System structure		Device structure		Index 		Description
+
+AccPSS					AccPSS								 		PSS Area Status Accelerator PSS
+AccPSS-AcSy				AccPSS-AcSy							 		System structure only
+AccPSS:Ctrl-IOC-1			AccPSS				Ctrl-IOC-1			1 		IOC for PSS1
+AccPSS-HBL1				AccPSS-HBL1							 		PSS Area Status High Beta Linac Part 1
+AccPSS-HBL1:Ctrl-DI-110			AccPSS-HBL1			Ctrl-DI-110			110 		DI Module, Slot 10, I/O Configuration 1
+A2T-010PRL:RFS-PRLTap-054		A2T-010PRL			RFS-PRLTap-054			054 		
+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+ESS Name				System structure		Device structure		Index 		Status		Latest		Deleted	Description
+
+AccPSS					AccPSS								 		APPROVED	true		false		PSS Area Status Accelerator PSS
+AccPSS-AcSy				AccPSS-AcSy							 		APPROVED	true		false		System structure only
+AccPSS:Ctrl-IOC-1			AccPSS				Ctrl-IOC-1			1 		APPROVED	false		false		IOC for PSS1
+AccPSS-HBL1				AccPSS-HBL1							 		APPROVED	true		false		PSS Area Status High Beta Linac Part 1
+AccPSS-HBL1:Ctrl-DI-110			AccPSS-HBL1			Ctrl-DI-110			110 		APPROVED	true		false		DI Module, Slot 10, I/O Configuration 1
+A2T-010PRL:RFS-PRLTap-054		A2T-010PRL			RFS-PRLTap-054			054 		APPROVED	true		false
+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+ESS Name				System structure		Device structure		Index 		Lifecycle	Description
+
+AccPSS					AccPSS								 		ACTIVE		PSS Area Status Accelerator PSS
+AccPSS-AcSy				AccPSS-AcSy							 		ACTIVE		System structure only
+AccPSS:Ctrl-IOC-1			AccPSS				Ctrl-IOC-1			1 		ACTIVE		IOC for PSS1
+AccPSS-HBL1				AccPSS-HBL1							 		OBSOLETE	PSS Area Status High Beta Linac Part 1
+AccPSS-HBL1:Ctrl-DI-110			AccPSS-HBL1			Ctrl-DI-110			110 		ACTIVE		DI Module, Slot 10, I/O Configuration 1
+A2T-010PRL:RFS-PRLTap-054		A2T-010PRL			RFS-PRLTap-054			054 		ACTIVE
+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------
+