Commit 24decfb2 authored by npedot's avatar npedot
Browse files

tiny cleanup

parent 2a5d7d4d
......@@ -12,12 +12,12 @@ fun oid(schema: Schema, originTableName: String): List<String> {
// create a key-table with projection of oid and pk
val keyCols = originTableKey.map { c -> c.name }.joinToString(",")
sqlCommands.add("CREATE TABLE SKEY$originTableName AS SELECT sid,$keyCols FROM $originTableName")
sqlCommands.add("ALTER TABLE $originTableName DROP COLUMN $keyCols")
// search ftables with foreign keys od double-inc as pk
// for each ftable adds one column oid with join with corresponding to fkey values
// replace pk origin-table
// replace fks to new surrogate id column
// remove ex-pk columns from origin-table
sqlCommands.add("ALTER TABLE $originTableName DROP COLUMN $keyCols")
// remove ex-pk columns from fk tables
return sqlCommands
}
\ No newline at end of file
......@@ -78,7 +78,6 @@ class SchemaTest {
assertTrue(equivalent(setA,setB))
}
@Test
fun test_powerset() {
// given
......@@ -300,7 +299,6 @@ class SchemaTest {
}
@Test
fun test_deomposeTo3NF() {
// given
......@@ -410,7 +408,6 @@ class SchemaTest {
}
@Test
fun test_lostBCNFConstraints() {
// given
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment