+ All Categories
Home > Documents > IE 423 – Design of Decision Support Systems Data modeling and database development.

IE 423 – Design of Decision Support Systems Data modeling and database development.

Date post: 08-Jan-2018
Category:
Upload: amberlynn-dorsey
View: 217 times
Download: 1 times
Share this document with a friend
Description:
By now you should have Read Chapters 1,2 & 3 in Pol and Ahuja Also, read chapter 4 in Pol and Ahuja
29
IE 423 – Design of Decision Support Systems Data modeling and database development
Transcript
Page 1: IE 423 – Design of Decision Support Systems Data modeling and database development.

IE 423 – Design of Decision Support SystemsData modeling and database development

Page 2: IE 423 – Design of Decision Support Systems Data modeling and database development.

AnnouncementsMidterm Exam – March 3, 2008

Page 3: IE 423 – Design of Decision Support Systems Data modeling and database development.

By now you should haveRead Chapters 1,2 & 3 in Pol and AhujaAlso, read chapter 4 in Pol and Ahuja

Page 4: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingWhen you develop any computer based application…You should start by developing a model of the thing or the process that you want to develop the software aboutYou start by developing an abstract model

Page 5: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingThis modeling process helps you think through what you are trying to buildSoftware development is largely a cognitive processIts about planning

Page 6: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingSo, we get some Play-Dough

Or make your own: http://www.teachnet.com/lesson/art/playdough061699.html

From: http://www.truecoaching.com/truecoaching/images/page_headers/play_dough.JPG

Page 7: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingOK, forget the play-doughSo, how do you model this thing/processYou could get a piece of paper and start drawing a diagram……but there are more systematic ways of doing this

Page 8: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingProbably best to start out with Object modeling Identify the objects that are involved These objects are entities So, sometimes we will call these

entities These can be tangible objects, or… …abstract object

Page 9: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObject modeling Consider a course registration system

Some objects would be Students Courses Instructors Rooms …

Page 10: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObject modeling Each object has a number of

attributes associated with it Define these attributes

Page 11: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObjects and attributes Student

StudentId Name Rank TelephoneNumber EmailAddress EyeColor FootSize

Page 12: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObjects and attributesBut, we only need attributes that relevant to the task Student

StudentId Name Rank TelephoneNumber EmailAddress EyeColor FootSize

Page 13: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObjects and attributesSome important ideas Entity (object) Type = the class of the entity

Generic definition of the entity Remember Metadata? Student

Entity Instance = a single case Student with ID = 2223334444

Entity Set = a set or collection of entity instances Students in IE 423

Page 14: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObjects and attributesBy the way, not so important now, but as a heads-upWe will use a particular naming conventions for naming objects and attributes Each word in a name is lower case, but the first

character of the word is upper case For multi-word names, cram the words together

(no space), and the first character of each word is upper case, others lower case (i.e. FirstName )

This is called CamelBack notation

Page 15: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObjects and attributesThere are several types of attributes Simple (sometimes called atomic, nothing to

do with nuclear physics) These have single values, can’t be divided

Composite Attributes Could be decomposed into other attributes

(probably simple, but not necessarily) Name = FirstName, LastName

Multivalue Can have multiple values at the same time for an

entity instance LanguageProficiency = French, Spanish, German CarsOwned? Age?

Page 16: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObjects and attributesThere are several types of attributes Stored attribute – value is given and

stored as is Derived attribute – the value for a

given instance is derived from other available information Not stored Later we will call this a calculated value When would we want to do this?

Page 17: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObjects and attributesEvery entity/object should have an identifier that will uniquely identify each instance

Can’t be two instances with the same value StudentId This is called a Key

Name IDBob Smith 2223334441Bob Smith 2223334442

Page 18: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObjects and attributes Sometimes you may not have a simple key For example, Name is often not unique Can have two or more attributes that

together uniquely identify an entity instance Called a Composite Key

Player Team NumberBob Smith 1 5Jerry Jones 1 7Bob Smith 2 5Sam Smit 2 8

Page 19: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingObjects and attributes A set of attributes for an entity is

called a relation Not to be confused with relationship

Computer scientists and mathematicians call relations – tuples *(GWOTD)

Page 20: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingRelationships Occasionally, an important problem

will involve a single entity (and its attributes) but usually not

Multiple entities are often related We call that connection

between/among entities a relationship

Page 21: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingDegree of Relationship How many entities are involved in the

relationship Unary – two instances of the same

entity type Binary – two instances of the two

different entity types Ternary – three instances from three

different entity types

Page 22: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingCardinality of Relationship How many entity instances are

involved in the relationship This means the number of instance

from one side of relationship to the number from the other side

But you need to know two numbers One Many

Photo from: http://www.growingwisdom.com/index.aspx?pid=16&sid=1&cid=88

Page 23: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingCardinality of Relationship So, we have three types of

relationships in terms of cardinality (maximum cardinality)One-to-OneOne-to-ManyMany-to-Many

Page 24: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingCardinality of Relationship One-to-One

One instance of one entity can only match one instance from other entity

One wife is marriedto one husband (some places) and vice versa

Husbands Wivesmarriedto

Page 25: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingCardinality of Relationship One-to-Many

One instance of one entity can match multiple instances from other entity

A customer can place many orders, but an order is ordered by only one customer

Page 26: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingCardinality of Relationship Many-to-Many

Each instance of one entity can match multiple instances from other entity and the other entity can match multiple instances from the first entity

A student can take multiple classes and each class has multiple students

(btw – this is tricky in a RDBMS – we will get back to this)

Page 27: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingCardinality of Relationship Minimum cardinality

The minimum number of instances from each entity in a relationship to the other entity in the relationship

You need to worry about two numbers

Zero – it is possible to have an unmatched entity

One – a relationship must have at least one match from each side of the relationship (no unmatched entities)

Page 28: IE 423 – Design of Decision Support Systems Data modeling and database development.

Data ModelingCardinality of Relationship Minimum cardinality

This will be important when we talk about –

Finding disjoint sets Who did not do this, or have

that? Referential integrity

Page 29: IE 423 – Design of Decision Support Systems Data modeling and database development.

Recommended