340 likes | 559 Views
Indira Gandhi National Open University presents. A Video Lecture Course: Systems Analysis. DATA MODELING. MODEL. A Model is an abstraction of something for the purpose of understanding it before building it. DATA MODELING.
E N D
MODEL A Model is an abstraction of something for the purpose of understanding it before building it.
DATA MODELING • Answers a set of following specific questions that are relevant to any data processing application
Questions answered by a Data Model • What are the primary data objects to be processed by the system • What is the composition of each data object and what attributes describe the object
Questions answered by a Data Model • Where do objects currently reside • What are the relationships between each object and other objects • What is the relationship between the objects and the processes that transform them
To answer those questions,Data modeling makes use of Entity-Relationship Diagram(ERD) • ERD enables a Software Engineer to identify data objects and their relationships using a graphical notation
DATA OBJECTS A data object is a representation of almost any composite information that must be understood by software.By composite information,we mean something that has a number of different properties or attributes. A person is a data object A car is a data object
KeyOne or more attributes which uniquely identify a data object
Attributes of Person: Name,Address,Age, Driving license number Driving license number is the key Attributes of Car:Make,Model,Chassis Number, Body type,Color Chassis Number is the key
RELATIONSHIPS Data objects are connected to one another in a variety of different ways Here, owns is the relationship Example: a Person owns a Car
Identification of Objects, Attributes & Relationships Problem: A University should schedule its class rooms for final Exams. Examinations will be conducted for all courses for students of all sections
Data Objects • Course • Section • Room
Attributes of Course • Name • Department • Code
Attributes of Section • S-number • Enrollment
Attributes of Room • R-number • Capacity • Building
Relationships: • Code & S-number
Simple and Composite Attributes • CITY is a Simple attribute • NAME is a Composite attribute because we can subdivide it into First Name,Middle Name and Last Name
Single and Multi Valued Attributes • AGE is a single valued attribute • DEPENDENT-NAME is a multi valued attribute
Derived Attributes • EMPLOYEMENT-LENGTH of Employee entity set is a derived attribute of Start-date and Current-date
Keys • Super Key • Candidate Key For example,Consider CUSTOMER entity set with attributes (1)Social security (2)Customer name (3)Customer street (4)Customer city Now,Social security is a super key.Also,any set of attributes containing Social security forms a super key So,Social-security is also candidate key
ENTITY-RELATIONSHIP DIAGRAM A E-R diagram consists of following components: • Rectangles-represent Entity sets • Ellipses-represent Attributes • Diamonds-represent Relationship sets • Lines-link attributes to Entity sets and Entity sets to relationship sets • Double Ellipses-represent multi valued attributes • Dashed Ellipses-denote derived attributes • Double lines-indicate total participation of an entity in a relationship set
One to Many Many to One One to One RELATIONSHIPS BETWEEN ENTITY SETS
RELATIONSHIP SETS So,Attributes of Borrower :Social Security, Loan-number
WEAK ENTITY SETS For example, an entity set with attributes Name,Age,Height is a Weak Entity Set
STRONG ENTITY SET • An Entity set with Passport no.,Name ,age,Height,Address is a Strong Entity Set as Passport no. can be used as key attribute
Summary • Definition of Modeling • Questions answered by Data Modeling • Definitions of Data Object,Attributes and Relationships
Summary(contd.) • Analyzing a given problem and finding Data Objects, Attributes and Relationships between objects of that problem • Introduction to Entity – Relationship Modelling
Summary(Contd.) • Simple and Composite Attributes • Single and Multivalued Attributes • Derived Attributes • Candidate Keys • Entity-Relationship Diagram
Summary(contd.) • Weak Entity Sets • Strong Entity Sets