Hello, Mr. Ryu Jae-an. Congratulations on finally completing the course. Thank you for your hard work.
The BOM structure you asked about is often included in companies' internal databases in the form of "personnel organization charts", but it is not provided externally. So it is not easy to obtain.
I am not sure if this will be an appropriate answer, but I will explain using examples provided by public data portals.
https://www.code.go.kr/index.do Administrative Standard Code Management System
On the initial access screen,
Code Search (Top) > Agency Code Search (Bottom)
Select Agency Type > Select "Legislative Organization"
Select Required Columns > Order, Rank, Next-Highest Agency Code, Top-Highest Agency Code, Affiliated Agency Order, Representative Agency Code
After searching, approximately 519 items are output > "Agency Code Search Data" on the top right of the table Download with button
(The entire data is hundreds of thousands, so it may take a long time, so I chose an example of downloading only some of them.)
(Example of creating a table in a personal DB)
-Table name: org_exam
create or replace table org_exam (
Organization code varchar(100),
Full organization name varchar(1000),
Lowest organization name varchar(100),
Level varchar(100),
Sequence varchar(100),
Next highest organization code varchar(100),
Top organization code varchar(100),
Affiliated organization level varchar(100),
Representative organization code varchar(100),
Registered person VARCHAR(100)
);
Upload the "Organization code query data.csv" file using a tool such as HEIDISQL
SELECT COUNT(*) FROM org_exam
;
(Performance query)
WITH RECURSIVE tmp AS
(
SELECT
Organization code, Full organization name, Next level organization code, Full organization name AS path, 1 AS lev
FROM org_exam
WHERE Next level organization code = '0000000'
UNION ALL
SELECT
bs.Organization code, bs.Full organization name, bs.Next level organization code,
CONCAT(t.path,',',bs.Full organization name) AS path, t.lev+1 AS lev
FROM tmp t JOIN org_exam bs ON t.Organization code=bs.Next level organization code
)
SELECT
Organization code, CONCAT(REPEAT(' ',lev*4),Full organization name) Full organization name, Next level organization code, path, lev
FROM tmp
ORDER BY agency code
;
Query result data through data hierarchy
(Data verification and appropriate query modification for result values are required.)
--
Apart from this, the search conditions for field 2 and field 3 change depending on field 1 change are generally changed by registering Onload, OnChanged events, etc. to the corresponding list box in JavaScript, Nodejs, JAVA, etc., and calling a query whenever the corresponding field changes to bring the data and reload it.
If the amount of data is large, it is also a method to bring all search condition data lists from the beginning and process them on the client, etc., but in this case, there are disadvantages such as the source being complicated and the UI being heavy.
-
In addition, it is said that BOM is used for parts that make up a finished product in manufacturing, but in my case, I have not had the opportunity to see it, so it is difficult to explain.
Thank you for your hard work.