CompSci 1032 Database Design - 1

5 Pages
Unlock Document

Western University
Computer Science
Computer Science 1032A/B
Diane Goldstein

Lecture 1: Database Design Database  Keep track of data  Spreadsheet vs. Database  Keeping track of more than one theme  Database Management System (DBMS) Database Design  Database stores data  Design reflects the organization that exists within the data  Data Model o Captures organization of the data o Logical representation of the data Reality and Models  What is a model? o Representation of reality that retains only selected details  Models o Powerful tool for validating necessary details and eliminating irrelevant details o Associate or map, elements in reality to elements in the model How are Systems developed? How to Build a Database?  How do you build a house…first, you create a blueprint, a plan, a model  How do you build a database… first you make a model, and Entity Relationship Model (E-R Diagram) o Visualization (diagram) of the data o Describes the logical database o Graphical method of mapping the real world  One the E-R model is built, it is used as a blueprint for the real database o Model is mapped to an actual relational database Models  E-R Model o Most popular for data modeling o Introduced in 1976 by Peter Chen  Many variants o Diagrams Used  To document a model  To describe structured data o A E-R model will consist of:  Entities  Attributes  Relationships  Attributes  Cardinality  Participation Entity  Represents a discrete object: o A person, place, thing or event  Example: o At western: student, course, program o In business: order, customer, salesperson Attributes  Entities have attributes  Describe properties of the entity  Example: o Students attributes: student number, name, address, phone number, date of birth o Order attributes: order number, date, amount Instances  Database contains instances of the entities  Attributes describe entity  An instance of the entity is a set of data items that exist  Example: an instance of the student identity o 4167784524 o Kayla White o 12725 6 concession o 416-898-9888 Student Number: 828282828 o July 18 1988 Attribute Instance Key Attributes  Necessary to uniquely identify the instance of each entity  Key Attribute vs. Identifier  Examples: o SIN o Student Numbers o Employee Numbers Relationships  A Relationship: o Association between two or more entities o Captures how the entities are related to one another  Example: o Person works for company o Student takes course o Artist performs song  Relationships can have attributes  Example: o Person works for company:  Hire date for the person is a detail that describes the relationship  Hire date does not describe the person or the company Cardinality  Indicates the number of instances of the entities that are involved in the relationship  Three categories o 1:1 Relationships  Single entity to single ent
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.