Top Banner
Conceptual Design Conceptual Design Lecture 3 Lecture 3 Database Development Database Development
21
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Conceptual Design Lecture 3 Database Development.

Conceptual DesignConceptual DesignLecture 3Lecture 3

Database DevelopmentDatabase Development

Page 2: Conceptual Design Lecture 3 Database Development.

Aim of this presentationAim of this presentation

To introduce noun identificationTo introduce noun identification To introduce the diagram scriptTo introduce the diagram script To identify how we use the To identify how we use the

Information base to help inform the Information base to help inform the ER DiagramER Diagram

Page 3: Conceptual Design Lecture 3 Database Development.

Entity Relationship DiagramsEntity Relationship Diagrams

The output for the Conceptual design The output for the Conceptual design is two things. is two things. – An ER DiagramAn ER Diagram– A diagram scriptA diagram script

Page 4: Conceptual Design Lecture 3 Database Development.

ER DiagramER Diagram

STUDENT HALLN:1

StudentID HallName

Entity Entity Name

Relationship

Cardinality

Attribute Attribute name

Mandatory Existence

Optional Existence

Page 5: Conceptual Design Lecture 3 Database Development.

Diagram ScriptDiagram Script

Entity name

Attributes Identified Synonym Related to

The name of the entity identified.(Singular)

Any attributes identified for the entity. No spaces allowed in the Attribute name.

Alternative name for entity identified from the information base

Entities which it relates to.

Page 6: Conceptual Design Lecture 3 Database Development.

Diagram ScriptDiagram Script

Entity name Attributes Identified Synonym Related to

Course titlecourseCode

Prerequisite StudentClassCourse

Student studentIDstudentNameaddresspostcode

Course

Class semesterclassRoomuniqueClassNametutor

Course

Relationship between course and student

grade Course and Student

Page 7: Conceptual Design Lecture 3 Database Development.

Using the Information BaseUsing the Information Base

Where do we start?Where do we start? Analyse the information gathered Analyse the information gathered

during the requirements analysis.during the requirements analysis.– One element at a timeOne element at a time

Page 8: Conceptual Design Lecture 3 Database Development.

Using the Information BaseUsing the Information Base

Identifying Entities using noun Identifying Entities using noun identification.identification.

In noun identification we follow this In noun identification we follow this procedure:procedure:– Examine the system descriptions and Examine the system descriptions and

identify the nouns and noun phrasesidentify the nouns and noun phrases– Reject any which seem unsuitable Reject any which seem unsuitable

candidates for being entities.candidates for being entities.

Page 9: Conceptual Design Lecture 3 Database Development.

Identifying EntitiesIdentifying Entities

A noun is a word that names a person or A noun is a word that names a person or thing thing

A noun phrase is a group of words that A noun phrase is a group of words that operate like a noun e.g. dentist operate like a noun e.g. dentist appointmentappointment

Consider each noun or noun phrase and Consider each noun or noun phrase and determine if it is a candidate entity.determine if it is a candidate entity.

Reasons for rejecting candidate entities.Reasons for rejecting candidate entities.

Page 10: Conceptual Design Lecture 3 Database Development.

Rejecting Candidate EntitiesRejecting Candidate Entities

RedundancyRedundancy VaguenessVagueness An event or operationAn event or operation Meta LanguageMeta Language Outside the system boundaryOutside the system boundary AttributeAttribute

Page 11: Conceptual Design Lecture 3 Database Development.

What we know about an What we know about an EntityEntity

Entity contains descriptive Entity contains descriptive information.information.

An entity is anything about which we An entity is anything about which we store information. store information.

An entity is a "thing", "concept" or, An entity is a "thing", "concept" or, object".object".

If a data object you have identified is If a data object you have identified is described by other objects, then it is described by other objects, then it is an entity.an entity.

Page 12: Conceptual Design Lecture 3 Database Development.

What we know about an What we know about an AttributeAttribute

An attributes either identifies or An attributes either identifies or describes an entity.describes an entity.

Attributes that identify entities are Attributes that identify entities are called called key attributes, key attributes, these attributes these attributes would uniquely identify an entity would uniquely identify an entity instance. instance.

Attributes that describe an entity are Attributes that describe an entity are called non-key attributes.called non-key attributes.

Page 13: Conceptual Design Lecture 3 Database Development.

Sample DescriptionSample Description

The local Sea Cadet Unit records The local Sea Cadet Unit records information on the Cadets belonging information on the Cadets belonging to the unit. For each cadet they to the unit. For each cadet they record name, address and one record name, address and one emergency contact telephone emergency contact telephone number. The cadets take classes number. The cadets take classes each week for different skills. each week for different skills. Records of skills achieved are Records of skills achieved are recorded, along with the date recorded, along with the date achieved.achieved.

Page 14: Conceptual Design Lecture 3 Database Development.

Identify the nouns and noun Identify the nouns and noun phrasesphrases

The local The local Sea Cadet UnitSea Cadet Unit records records information on the information on the CadetsCadets belonging belonging to the to the unitunit. For each . For each cadetcadet they they record record namename, , addressaddress and one and one emergency contact telephone emergency contact telephone numbernumber. The . The cadetscadets take take classesclasses each each weekweek for different for different skillsskills. . Records of Records of skillsskills achieved are achieved are recorded, along with the recorded, along with the date date achievedachieved..

Page 15: Conceptual Design Lecture 3 Database Development.

Diagram and ScriptDiagram and ScriptCadet

Entity name Attributes Identified Synonym Related to

Cadet FName, Surname, Add1, Add2, Add3 PostCode, ConTelNo

ClassSkill

Class Week Cadet

Skill Cadet

Relationship between Cadet and Skill

Date Achieved SkillCadet

ClassM:N

SkillM:N

Page 16: Conceptual Design Lecture 3 Database Development.

Diagram and ScriptDiagram and Script

Once you have dealt with the System Once you have dealt with the System Description you then look at each Description you then look at each type of information base and check type of information base and check that that information base element is that that information base element is catered for.catered for.

Page 17: Conceptual Design Lecture 3 Database Development.

Cadet Record CardCadet Record Card

Cadet Record Card DateRankCadet IDNameAddress

Contact Telephone

Page 18: Conceptual Design Lecture 3 Database Development.

Revised diagramRevised diagram

Cadet

Entity name Attributes Identified Synonym Related to

Cadet CadetID, Rank, FName, Surname, Add1, Add2, Add3 PostCode, ConTelNo

ClassSkill

Class Week Cadet

Skill Cadet

Relationship between Cadet and Skill

Date Achieved SkillCadet

ClassM:N

SkillM:N

CadetID

Page 19: Conceptual Design Lecture 3 Database Development.

Work through each piece of Work through each piece of information base to produce your information base to produce your diagram.diagram.

Finally check what additional Finally check what additional requirements the company will have requirements the company will have for the new system and ensure that for the new system and ensure that your initial design can cater for those your initial design can cater for those requirements.requirements.

Page 20: Conceptual Design Lecture 3 Database Development.

SummarySummary

We have seenWe have seen How to use noun identification for How to use noun identification for

identifying entities and attributes.identifying entities and attributes. How to produce the diagram scriptHow to produce the diagram script How to use the information base to How to use the information base to

inform the ER Diagram and scriptinform the ER Diagram and script

Page 21: Conceptual Design Lecture 3 Database Development.

Next WeekNext Week

In-class test revisionIn-class test revision Practice in-class test questionsPractice in-class test questions