Help
This application allows you to interactively factorise an un-normalised dataset into its component normalised tables.
Parameters
- uri - location of dataset to be normalised - a url or local database path. The data set is an XML document, containing multiple row elements, each with the same sequence of elements.
Table display
When loaded, the dataset is shown in table form. The rows of the table are:
- column headings taken from the element names in the first row.
- each row of the dataset
- the number of distinct values in each column
- selecting a column as an independent variables will define a primary key in the factor
- a dependent variable will be included in the factor
Operations
Check
select one or more independent variables and click Check. The table display will show the columns coloured:
- blue - an independent variable - i.e a primary key
- yellow - every value of the independent variable maps to a single value of this variable - the variable is functionally dependent on the independent variable(s)
- green - this variable is functionally dependent on the independent variabel AND the reverse is true -i.e. an equivance. This variable is a candidate primary key
- white - values of the independent variable maps to multiple values of this variable - they are independent
Factorize
the selected variables will be extracted as a new table, retaining only the unique rows. The name of this new table (entity) can be set to the defined name or the generated name, and the data removed from the table.
Restart
Drop the current factorisation and restart
View Factors
Show the current factorisation as tables.
View SQL
Augment the current model with data types and relations, then generate the SQL DDL Create statements and Insert statements for the current factorisation.
View EAR diagram
Generate an Entity-Attribute-Relationship diagram of the augmented model using Graphviz
To do
- Detect complete factorisation
- Menu code cleanup
- Compare with model answer
About
This is one of several teaching tools, which include an SQL tutor, ER modelling tutor and ER Case tool being developed for teaching by Chris Wallace, Bristol Institute of Technology, UWE Bristol. It is written in XQuery running on an eXist database.