Download presentation
Presentation is loading. Please wait.
Published byAmberlynn Dorsey Modified over 9 years ago
1
IE 423 – Design of Decision Support Systems Data modeling and database development
2
Announcements Midterm Exam – March 3, 2008
3
By now you should have Read Chapters 1,2 & 3 in Pol and Ahuja Also, read chapter 4 in Pol and Ahuja
4
Data Modeling When 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 about You start by developing an abstract model
5
Data Modeling This modeling process helps you think through what you are trying to build Software development is largely a cognitive process Its about planning
6
Data Modeling So, 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_he aders/play_dough.JPG
7
Data Modeling OK, forget the play-dough So, how do you model this thing/process You could get a piece of paper and start drawing a diagram… …but there are more systematic ways of doing this
8
Data Modeling Probably 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
9
Data Modeling Object modeling Consider a course registration system Some objects would be Students Courses Instructors Rooms …
10
Data Modeling Object modeling Each object has a number of attributes associated with it Define these attributes
11
Data Modeling Objects and attributes Student StudentId Name Rank TelephoneNumber EmailAddress EyeColor FootSize
12
Data Modeling Objects and attributes But, we only need attributes that relevant to the task Student StudentId Name Rank TelephoneNumber EmailAddress EyeColor FootSize
13
Data Modeling Objects and attributes Some 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
14
Data Modeling Objects and attributes By the way, not so important now, but as a heads-up We 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
15
Data Modeling Objects and attributes There 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?
16
Data Modeling Objects and attributes There 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?
17
Data Modeling Objects and attributes Every 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 NameID Bob Smith2223334441 Bob Smith2223334442
18
Data Modeling Objects 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 PlayerTeamNumber Bob Smith15 Jerry Jones17 Bob Smith25 Sam Smit28
19
Data Modeling Objects 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)
20
Data Modeling Relationships 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
21
Data Modeling Degree 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
22
Data Modeling Cardinality 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
23
Data Modeling Cardinality of Relationship So, we have three types of relationships in terms of cardinality (maximum cardinality) One-to-One One-to-Many Many-to-Many
24
Data Modeling Cardinality 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 HusbandsWives marriedto
25
Data Modeling Cardinality 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
26
Data Modeling Cardinality 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)
27
Data Modeling Cardinality 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)
28
Data Modeling Cardinality 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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.