After N hours of designing, how to save structure like this into a relational database (SQL Server).
I ended on this structure, but it is not really good.
create table [OperationalModel]
(
[Id] int,
[Name] varchar(150),
[Code] varchar(10),
[OrgId] int,
[Vertex] int,
[RelatedOrgIdOnSameVertex] int
);
insert into [dbo].[OperationalModel]
values
(1, 'x', 1, NULL),
(1, 'x', 2, 1),
(1, 'x', 3, 1),
(1, 'x', 4, 2, 3),
(1, 'x', 5, 2),
(1, 'x', 6, 2),
(1, 'x', 7, 3),
(1, 'x', 8, 4);
.
.
.
.
Anyone have better idea how to save this structure in a relational database like SQL Server?
Thanks