private void removeIndexedTables(boolean testStoredDB) throws IOException {

		// Create table for each schema defined by DBTestUtils
		// All schema fields are indexed
		createIndexedTables(testStoredDB);

		// Delete odd numbered tables
		long txId = dbh.startTransaction();
		int totalTableCnt = 0;
		for (int i = 0; i <= DBTestUtils.MAX_SCHEMA_TYPE; i++) {
			if ((i % 2) == 1) {
				dbh.deleteTable("TABLE" + i);
			}
			else {
				++totalTableCnt;
			}
		}
		dbh.endTransaction(txId, true);
		assertEquals(totalTableCnt, dbh.getTableCount());

		if (testStoredDB) {
			saveAndReopen();
			assertEquals(totalTableCnt, dbh.getTableCount());
		}

		// Check Master Table entries
		TableRecord[] tableRecords = dbh.getMasterTable().getTableRecords();
		Table lastTable = null;
		int tableCnt = 0;
		int indexCnt = 0;
		for (TableRecord tableRecord : tableRecords) {
			if (tableRecord.getIndexedColumn() < 0) {
				if (tableCnt > 0) {
					assertEquals(DBTestUtils.getIndexedColumnCount(2 * (tableCnt - 1)), indexCnt);
				}
				String name = "TABLE" + (2 * tableCnt);
				lastTable = dbh.getTable(name);
				assertEquals(name, tableRecord.getName());
				assertEquals(Long.MIN_VALUE, tableRecord.getMaxKey());
				assertEquals(0, tableRecord.getRecordCount());
				assertEquals(-1, tableRecord.getRootBufferId());
				++tableCnt;
				indexCnt = 0;
			}
			else {
				if (lastTable == null) {
					Assert.fail();
				}
				int[] indexedColumns = DBTestUtils.getIndexedColumns(2 * (tableCnt - 1));
				assertTrue(indexCnt < indexedColumns.length);
				assertEquals(indexedColumns[indexCnt], tableRecord.getIndexedColumn());
				assertEquals(lastTable.getName(), tableRecord.getName());
				assertEquals(Long.MIN_VALUE, tableRecord.getMaxKey());
				assertEquals(0, tableRecord.getRecordCount());
				assertEquals(-1, tableRecord.getRootBufferId());
				++indexCnt;
			}

		}
		Schema schema = lastTable.getSchema();
		assertEquals(schema.getFields().length - 2, indexCnt); // ByteField and BooleanField do not support indexing
		assertEquals(totalTableCnt, tableCnt);

	}
Test the creation of a new database with indexed and non-indexed tables.
Tests include the removal of tables and are performed for both a stored and
non-stored database.
Ghidra/Framework/DB/src/test/java/db/DBTest.java