130 likes | 161 Views
CONCEPTUAL SCHEMA DESIGN PROCESS. Yr 12 IPT. Information Processing and Technology, 2001. Last Lesson. Value and Cardinality constraints limit the value an entity type can have. Frequency constraints limit the number of times a role can be played by its associated entities.
E N D
CONCEPTUAL SCHEMA DESIGN PROCESS Yr 12 IPT Information Processing and Technology, 2001
Last Lesson • Value and Cardinality constraints limit the value an entity type can have. • Frequency constraints limit the number of times a role can be played by its associated entities. • Roles are either mandatory or optional.
Design Cycle 1. State Elementary Facts Draw Conceptual Schema Diagram 2. 3. Entity types that should be combined and derivation. 4. Add Uniqueness Constraints 5. Add other constraints: value, cardinality, frequency and mandatory. 6.
Step 4. Add Uniqueness Constraints • Uniqueness constraints are specified in a conceptual schema to avoid data redundancy. • The relations are: • one to one • one to many • many to one • many to many
One to one • Does each friend have only one phone number? • Does each phone number have only one friend? Yes Yes Friend (name) Phone (number) has One friend has one phone number
One to many • Does each party have only one minister? • Does each minister have only one party? No Yes Party (name) Minister (name) has One Party has many ministers
Many to one • Does each student have only one house? • Does each house have only one student? Yes No Student (name) House (name) has Many students have one house
Many to many • Does each teacher have only one subject? • Does each subject have only one teacher? No No Teacher (name) Subject (name) has Many teachers have many subjects.
Ternary relationships(check this is always true) Student (name) studies Subject (name) received Grade (letter)
Design Cycle 1. State Elementary Facts 2. Draw Conceptual Schema Diagram 3. Entity types that should be combined and derivation. 4. Add Uniqueness Constraints. 5. Add other constraints: value, cardinality, frequency and mandatory. 6. Perform Population and Final Checks.
6. Perform Population and Final Checks. • The final Step of the CS Design Phase. • This step must check that the schema is: • internally consistent (no contradicting constraints) • externally consistent (population check) • free of redundancy (undetected derivations) • complete (fulfils original requirements and represents the UoD)