170 likes | 282 Views
Relational Database Schema normalizer. P03. A0078012N Gong Jianlin A0078102N Wu Xianqun. Functionality. Get 3NF Find Closure Membership Test Find Keys. User Interface. Input. To use this tool, user need to enter the function dependencies first. Get 3NF.
E N D
Relational Database Schema normalizer P03 A0078012N Gong Jianlin A0078102N Wu Xianqun
Functionality • Get 3NF • Find Closure • Membership Test • Find Keys
Input • To use this tool, user need to enter the function dependencies first.
Get 3NF • After entering the function dependencies, click button ‘Get 3NF’ then a schema in 3NF with all the keys will be generated in the output area
Find Closure • Click button ‘Find Closure’
Membership Test • Click button ‘Membership Test’
Find Keys • Click button ‘Find Keys’
Algorithm • Generate lossless 3NF schema with all the keys • Find Keys
3NF • Algorithm is based on Bernstein Algorithm • Shortcoming: • Does not guarantee Losslessness. • Does not find all the keys.
Lossless • When applying Bernstein Algorithm, attributes may be eliminated. • Solution: After each step which is possible to loss an attribute, the normalizer will check if the attributes eliminated is still in the schema. If not,create a relation for this attribute.
Find all keys • Bernstein Algorithm only give one explicit key. • Solution: After applying Bernstein Algorithm, the normalizer will use the functionality Find Keys to get all the keys of the normalized schema.
Find Keys • Algorithm published by HosseinSaiedian and Thomas Spencer From Department of Computer science, University of Nebraska in1993
Find Keys • Step1: Find L,R,B from R • Step2: Check if L is a key • If yes then it’s the only key • Step3: Find keys in L+B • Keep adding B in turn to L, check if it is a key until all the case reached.