Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 12-6812 Advanced Database and Client Server Applications Susan Curtis, Paul Crowther, Alan Houldcroft, Peter Lake, John Whitfield.

Similar presentations


Presentation on theme: "1 12-6812 Advanced Database and Client Server Applications Susan Curtis, Paul Crowther, Alan Houldcroft, Peter Lake, John Whitfield."— Presentation transcript:

1 1 12-6812 Advanced Database and Client Server Applications Susan Curtis, Paul Crowther, Alan Houldcroft, Peter Lake, John Whitfield

2 2 The course… Modelling Designing Processing (Oracle, SQL Server) Data Base Administration Client Server topic Implementation (build)

3 3 The assessment Poster (individual)10% Phase Test (SQL Server)10% Project (group) –Part 1 – design 15% –Part 2 – implementation 15% Exam50%

4 4 The resources Blackboard TEXT: Database Systems Connolly and Begg 4 th edn (or 3rd)

5 5 Data Modeling lectures  ER  EER  Object modelling

6 6 ER Model Entities Keys Attributes Relationships

7 7 Entity Relationship Attribute

8 8 Employee NINO name first name init surname address street city post code sex salary birth date Department number name location [1..5] /number of emps Project Proj ID name start date Dependent name relationship supervises 0..* 0..1 1 0..* has 4..* works for 1 manages 0..1 1 1..* Works on controls 1 0..*

9 9 Problems in ER models 1 Connection Traps: - Fan Trap eg A faculty operates several subject groups and employs many staff. faculty StaffS group employs operates 1 0..* 1

10 10 Which building do I work in? S group isACES cn ACES Staff scACESs curtis ah ACESa houldcroft plACESp lake faculty ACES harmer sbsstodart cscollegiate Which s group do I belong to? faculty StaffS group employs operates1 0..* 1

11 11 Problems in ER models 2 Connection Traps: - Chasm Trap Not all staff in the faculty belong to a subject group We can no longer determine the faculty for some staff faculty StaffS group employs operates 0..1 0..* 1

12 12 Add the missing relationship faculty StaffS group employs operates 0..1 0..* 1 belongs 1 0..*

13 13 A supplier can supply any part to any customer supplier part customer suppliesto 0..* supplier part customer 0..* Supplier of Customer part 1 1 1 1

14 14 Add a new relationship ? supplier part customer supplies to 0..* provides0..* We still cannot tell which supplier supplies which part to which customer !

15 15 A three way relationship supplier part customer 0..* supplies

16 16 0..* supplies Supplier Supp NO name address Part PartNo price Customer CustID Name address quantity Attributes on a relationship Also needs a combined key of: CustID PartNo SuppNo

17 17 0..* Supplier Supp NO name address Part PartNo price Customer CustID Name address Supplied quantity 1 1 1 Weak entity An entity who’s existence is dependent on another entity’s existence

18 18 Rationale for EER integrity, consistency, correctness a different way of looking at the real world, to help us understand it. may help to avoid traps.

19 19 Heavy Entities eg employee table NULL field problem

20 20 Partition/ fragment Employee Current Employee Past Employee { mandatory, Or}

21 21 Enhanced Entity Relationship Model EER Employee Manager Subclasses and superclasses ClerkSales person Mandatory / Optional And / Or

22 22 Class/ subclass concepts 1 A member of a sub class MUST have a corresponding entry in the super class. But not vice versa (optional tag).

23 23 Class/ subclass concepts 2 A member entity / occurrence in a sub class represents the same real world entity as the one in the superclass but in a distinct specific role. eg employee w123 may appear in the subclass clerk as well as in the superclass employee. This may be implemented in 2 different tables (problem of converting EER to ER).

24 24 Class/ subclass concepts 3 Attribute inheritance any member (occurrence) in a sub class inherits all the attributes of the corresponding super class, including the primary key also inherits all relationship instances of the parent superclass instance. May have its own relationships

25 25 Attribute inheritance Employee NINO {PK} Name first initial surname dob Secretary ty speed Technician grade Engineer type Salaried grade Hourly hour rate ManagerProject {mandatory, OR}{optional,OR} supervises 1 0..2

26 26 Class/ subclass concepts 4 specialisation generalisation

27 27 Specialisation / Generalisation Employee NINO {PK} Name first initial surname dob Secretary ty speed Technician grade Engineer type Salaried grade Hourly hour rate ManagerProject {mandatory, OR}{optional,OR} supervises 1 0..2

28 28 Class/ subclass concepts 5: lattice Employee Manager ClerkSales person Trainee Sales Trainee

29 29  A member of a sub class MUST have a corresponding entry in the super class  A member entity / occurrence in a sub class represents the same real world entity as the one in the superclass but in a distinct specific role.  any member (occurrence) in a sub class inherits all the attributes of the corresponding super class  specialisation / generalisation  lattice  categories Class / subclass

30 30 Connolly (4 th edn) ch11 and 12 Connolly (3 rd edn) ch11 and 12 Elmasri ch 21 Enhanced Entity Relationship Model EER


Download ppt "1 12-6812 Advanced Database and Client Server Applications Susan Curtis, Paul Crowther, Alan Houldcroft, Peter Lake, John Whitfield."

Similar presentations


Ads by Google