Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conceptual Design to Logical Design Lecture 4. Aims  To introduce Business Rules  To identify what a Business Rule is  To Introduce Business Operations.

Similar presentations


Presentation on theme: "Conceptual Design to Logical Design Lecture 4. Aims  To introduce Business Rules  To identify what a Business Rule is  To Introduce Business Operations."— Presentation transcript:

1 Conceptual Design to Logical Design Lecture 4

2 Aims  To introduce Business Rules  To identify what a Business Rule is  To Introduce Business Operations  To identify what a Business Operation is.  To introduce revisions required for the logical model.

3 Conceptual Design Requirements  ER Diagram  Diagram Script  Business Rules  Operations

4 Conceptual Design Requirements  ER Diagram  Diagram Script For your group work this should already be complete.

5 Business Rules  What is a Business Rule?  A business rule –is used to describe properties of an application which cannot be expressed with a conceptual model. –defines or constrains an aspect of the use of the database. –often focuses on access rights or business calculations.

6 Business Rules A Business Rule can be  integrity constraint  A derivation

7 Structure of Business Rules  Integrity Constraints can always be expressed in the form of assertions.  An appropriate structure is must/must not must/must not

8 Integrity Constraints  Head of subject must belong to the subject  A lecturer must not have a salary greater that that of their head of subject

9 Structure of Business Rules  Derivations can be expressed by specifying the operations that allow us to obtain the derived concept.  An appropriate structure is is obtained by is obtained by

10 Derivation  The number of students on a module is obtained by counting the students registered on that module.  The total cost of a product on an order is obtained by multiplying the product cost by the quantity ordered

11 Business Rules  Business rules can be listed as follows Rule No Rule Description BR-1 Tutors must not edit student details BR-2 New student’s details must be added by the registry administrator BR-3 The number of students in a class group is obtained by counting students allocated to that class group.

12 Operations on the data  An operation is a task carried out on the data, including –Add –Edit –Browse –Delete  Effectively the life cycle of an entity.

13 Fragment of Staff Interview regarding student applications  When I get my copies, I check past records to see if the student is a previous student. If there is a past record, I check that it is up-to-date and if the record is not up-to-date, I update it. If the student is a new student, a student record card is created. The date of the most recent application by a student is also recorded.

14 Fragment of Staff Interview regarding student applications  When I get my copies, I check past records to see if the student is a previous student. If there is a past record, I check that it is up-to-date and if the record is not up-to-date, I update it. If the student is a new student, a student record card is created. The date of the most recent application by a student is also recorded. Browse student record Edit student record Add new student record

15 Operations on the data  The operations identified from the staff interview fragment are Rule No Rule Description OP-1 Add a new student record. OP-2 Edit a student record. OP-3 Display student records

16 Logical Design  Read Chapter 4 – Logical Design  Chapter 4 is not required for next weeks in-class test.

17 Migration to Logical Design  The logical Model is produced by revising the Conceptual Model and incorporating the diagram script into the new logical model.

18 Migration to Logical Design  What must we resolve –Many to many relationships –Inheritance

19 Migration to Logical Design  What must we identify –how the entities are actually related –which attribute(s) in each of the related entities facilitate that relationship. –Primary keys –Migrate the primary keys to establish foreign keys

20 Define Primary Key Attributes  The primary key is an attribute or a set of attributes that uniquely identify a specific instance of an entity.  Every entity in the data model must have a primary key whose values uniquely identify instances of that entity.

21 Define Primary Key Attributes  To qualify as a primary key for an entity, an attribute, or combination of attributes, must have the following properties: –a non-null value (must have a value, cannot be blank) for each instance of the entity. –the value or combined value must be unique for each instance of an entity. –the values must not change or become null during the life of each entity instance.

22 Composite Primary Keys  Sometimes there is not single attribute which is suitable for use as a primary key and more than one attribute is required to uniquely identify an entity instance.  A primary key that made up of more than one attribute is known as a ‘composite key’ or ‘compound key’.

23 Artificial Keys

24 Resolving Many to Many Relationships.  An Associative entity is an entity used to associate two or more entities in order to reconcile a many- to-many relationship –In general the primary key of the Associative entity contains a combination of the primary keys in the two entities in the many-to-many relationship, resulting in a composite key.

25 Conceptual Model  Revision of Many to many. course student N:M CourseCode StudentID

26 Resultant Logical Model  The Many to Many relationship has been replaced with a new associative Entity StudentOnCourse Original entity Course Original entity Student StudentOnCourse

27 Logical Diagram Incorporating the Diagram Script. coursestudentCoursestudent courseCodecourseCode(fk) studentID(fk) studentID title cost gradesFirstName sSurname sAddress1 sAddress2 sAddress3 sPostcode sTelephone lastApplicationDate nkFirstName nkLSurname nkAddress1 nkAddress2 nkAddress3 nkPostcode nkTelephone


Download ppt "Conceptual Design to Logical Design Lecture 4. Aims  To introduce Business Rules  To identify what a Business Rule is  To Introduce Business Operations."

Similar presentations


Ads by Google