Study Guides (238,613)
Canada (115,253)
Prof (7)

Computer Science Final.docx

53 Pages
Unlock Document

Western University
Computer Science
Computer Science 1032A/B

DATABASE DESIGN Databasekeep track of dataspreadsheet vs databasekeeping track of more than one themedatabase management system DBMSDatabase designdatabase stores datadesign reflects the organization that exists within the datadata modelcaptures organization of the datalogical representation of the dataReality and modelsmodel representation of reality that retains only selected detailspowerful tool for validating necessary details and eliminating irrelevant detailsassociate or map elements in reality to elements in the modelHow do I build a databasecreate a blueprintplanmodelfirst make an entity relationship model ER diagramvisualization diagram of the datadescribes the logical databasegraphical method of mapping the real worldonce the ER model is built it is used as a blueprint for the real databasemodel is mapped to an actual relational databaseModelsER model o most popular for data modeling o introduced in 1976 by Peter Chenmany variants o diagrams used to document a model and describe structured dataER modelentities o attributesrelationships o attributes o cardinality o participationEntityrepresents a discrete objectperson place thing or eventex Student at western order in a businessAttributesentities have attributesdescribe properties of the entityex Student attributesstudent number name address phone number date of birthex Order attributesorder number date amountInstancesdatabase contains instances of the entitiesattributes describe the entityan instance of the entity is a set of data items that existex An instance of the student entityKey attributesnecessary to uniquely identify the instance of each entitykey attribute vs identifierex SIN student numbers employee numbersRelationshipsassociation between two or more entitiescaptures how the entities are related to one anotherex Person works for company student takes courserelationships can have attributesex Person works for companyhire date for the person is a detail that describes the relationshiphire date does not describe the person or the companyCardinalityindicates the number of instances of the entities that are involved in the relationship11 relationshipssingle entity to single entityex Someone is the chair of one department1N or N1 relationshipsone to manysingle entity to many entitiesex Student in a facultyNM relationshipsmany to manyex Student can take many courses course can be taken by many studentsParticipationthe participation of an entity in a relationship indicates whether all or only some of the instances of the entity are involved in the relationshiptotal participationall of the instances are involved in the relationshippartial participationnot all the instances are involved in the relationshipER symbolsentitiesrectanglesattributesovalsrelationshipsdiamondsparticipation o single line represents partial participation o double line represents total participationcardinality of a relationship appears on the participation line o 11 1N or NMkey attributes o uniquely identifies an entity or relationship o identified by being underlinedDesigning an ER modeldiagram 1 collectreview all data 2 identify entities and attributes draw them on your ER diagram 3 identify the key attributes and underline them on your diagram 4 decide on the relationships and draw lines between the entities including any attributes of the relationships 5 decide on the cardinality of each relationship and add it to the diagram 6 decide on the participation of each entity in each relationship and add if requiredWho will volunteerstart calling previous volunteersno info from previous yearshow many years Serviceeffective Performancepersonal infodatabase consultant interview employeesdecide on what is important infocreate a data modelcreate a databaseER DiagramsCrows foot diagram
More Less

Related notes for Computer Science 1032A/B

Log In


Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.