170 likes | 284 Vues
This tool assists users in normalizing relational database schemas to Third Normal Form (3NF) by handling functional dependencies. Users can execute three main functionalities: Get 3NF, Find Closure, and Membership Test. To use the tool, enter functional dependencies and click the appropriate buttons to generate a normalized schema, check attribute closures, or determine schema membership. The methodology is based on Bernstein's algorithm, with improvements for generating lossless schemas and ensuring all keys are found.
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.