当前,我有一个带表的SQL数据库。
我将它们称为表A和表B。 每个表A项目都与0到所有现有表B列相关联(我使用一种“标签”系统,存储在该B表中)
现在,我对此的解决方案是创建第三个表,称为C,它仅包含三列-
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>robotframework</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<mkdir dir="${project.build.directory}/library" />
<untar src="${project.build.directory}/library/${robotframework.version}.tar.gz" compression="gzip" dest="${project.build.directory}/robotframework" />
</target>
</configuration>
</execution>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>0.0.2</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>pip install robotframework</executable>
</configuration>
</execution>
</executions>
</plugin>
示例
所以,如果我有一个ID为1的物品
Id(key)
AId
BId
Count
与表B中的其他3个项目相关联-例如,Id:1、2、3
Id| Name
1 | ColumnOne
然后C看起来就像
Id| Name
1 | TagOne
2 | TagTwo
3 | TagThree
我只是觉得对于同一个A表有多个条目是非常多余的。 有更好的方法吗?