0% found this document useful (0 votes)
44 views32 pages

Data Management and Database Design: INFO 6210 Week #2

This document provides an overview of data modeling and database design concepts. It discusses why databases and data modeling are needed, and covers entity relationship diagrams, conceptual data modeling, logical data modeling, and normalization. The key topics covered include relational data models, entities, attributes, relationships, and normalization. Examples are provided to illustrate one-to-one, one-to-many, and many-to-many relationships. The document is intended to introduce students to fundamental database and data modeling concepts.

Uploaded by

test
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views32 pages

Data Management and Database Design: INFO 6210 Week #2

This document provides an overview of data modeling and database design concepts. It discusses why databases and data modeling are needed, and covers entity relationship diagrams, conceptual data modeling, logical data modeling, and normalization. The key topics covered include relational data models, entities, attributes, relationships, and normalization. Examples are provided to illustrate one-to-one, one-to-many, and many-to-many relationships. The document is intended to introduce students to fundamental database and data modeling concepts.

Uploaded by

test
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Data Management

and
Database Design
INFO 6210
Week #2

Northeastern University
What we discussed till now....

WHY DATABASES DATA VS FILE SYSTEM DATA WHAT ARE


INFORMATION PROCESSING DATABASES

2
Before we start....

• Installation/Setup – As environment should be ready for further assignments


• Any Un resolved problems?

3
So, This week....

• Data modeling
• Relational Data models

• database management system rules


• Entity
• Attribute
• Domain
• Relationships
• Relational and Non-Relational databases
• Why we need
• When to use

By end of the session, we will be pretty much done with Database concepts
4
Data modeling

5
What is Data modeling?

• Graphical representation of –
• Data structures
• Characteristics
• Relations
• Constraints

• It is an Iterative process
• A perfect model meets all business
requirements

6
Why Data modeling?

• Data modeling is an abstraction


process
• Organize
• Improve Performance

7
How Data modeling is performed?

• Bottom Up
• Redesign of existing application

• Top Down
• New applications

• Hybrid
• mix of both Bottom up and Top
Down
• Example: Existing system
enrichment with new features

8
Data Model

Artifacts of Data Model –


• Data structure that stores
data
• Rules to maintain data
integrity
• Data manipulation methods

9
Types of Database models

• Hierarchical
• Network
• Relational

10
Hierarchical Model

• Developed by IBM
• Tree like structure with Single root
• Parent child relationship
• Parent may have one or more child units
• Child is restricted to have only one Parent

• Drawback
• Cannot represent many to many relationship

11
Network Model

• Improvement over Hierarchical model


• Multiple parent-child relationships
• Multiple access paths
• Most widely used before Relational was introduced

• Drawback
• Transaction management via pointers and tracing

12
Relational Model

• The relational model was first proposed by E. F. Codd


• Relational data models are implemented through sophisticated relational database management
system
• RDBMS can hide the complexities of the relational model from the user
• Think of a relation as a matrix composed of intersecting rows and columns
• Table
• Main Objectives –
• High degree of Independence
• Application programs must not be affected by changes to file organizations, record orderings
• Normalization (How to Normalize is discussed in later sessions)
• Data Consistency
• Avoid Redundancy
• Enable self oriented data manipulation language

13
Relational Model

• IBM’s San José Research Laboratory in California –


• First company to develop prototype relational DBMS System R
• System R project led to –
• Development of a structured query language called SQL

• Production of various commercial relational DBMS products – early 1980s


• DB2 from IBM
• Oracle from Oracle Corporation.

14
Relational Model

Supplier

Part

15
However, How we Design the Model?

16
Database Design

• Requirements Formulation and Analysis


• Collection and documentation of requirement
• Analyze requirements

• Conceptual Design
• Identify Entities and relationships

• Data Modeling
• First Level – ER Diagrams
• Second Level – Normalization

• Design Implementation
17
ER Diagram components

• Entity
• Entity is a “Thing” which can be distinctly identified
• Is an Object which has characteristics
• Example: Supplier, Company, Product, Customer, Student, User, Sales
• Entity type(category) is a collection of similar Entities
• A Name that we give to an Entity
• Entity Set is a collection of entities of an entity type (All entities of an entity type)
• All rows/records of a Entity/Table

• Attribute
• Set of Attributes define Entity / Data element(s) that describes an Entity
• Domain of attribute is of permitted values
• Phone number, SSN number, Date of Birth, Zip code

18
Entity Symbols….
• Entity types
• Strong Entity
• Sometimes called as parent entities or Kernels
• Contains primary keys
• Building blocks of Database

• Weak Entity / Dependent Entity


• Depends on some other entity type
• primary keys (combination with foreign key)

• Associative Entity
• Bridge tables
• Created to resolve linkage between many to many relation ships

19
Attribute Symbols….
• Types of Attributes
• Simple Attribute
• Characteristics of an entity and cannot be broken down further
• Example: Product Name

• Multivalued attribute
• Attributes which are capable of taking more than one value

• Derived Attributes
• Calculated fields
• These doesn’t exists in real
• Logical representation
20
ER Diagram Relations

• Relationship
• Association between Entities
• Relates two entities
• Several relationships may exist between same entities

• Dependent Entity
• An Entity whose existence depends on existence of another entity
• Example
• A project comprises of multiple tasks and task cannot be present without
project

21
Subsets and Supersets
• A subset is derived from parent entities called supersets
• Common attributes among subsets are “attributes of superset”
• Identifier of a subset is always superset Identifier

22
Relationship symbols….
• Relationship symbols and its usage
• Relationship
• These are associations/connections between strong entities

• Weak Relationship
• These are connections between weak entities

23
Degree of Relationship

1 :1 1:N
One to One One to Many

N:N
Many to Many

Degree of Relationship is also called as CARDINALITY

24
One to One Relationship

• For one occurrence of first entity –


• There can be at most one related
occurrence of second entity and vice-
versa

25
One to Many Relationship

• For one occurrence of first entity –


• There can be more than one related
occurrence of second entity
• For every occurrence of second entity,
only one occurrence of first entity

26
Many to Many
Relationship

• For one occurrence of first entity –


• There can be more than one related
occurrence of second entity
• For every occurrence of second entity, one
or more occurrence of first entity

27
ER Diagram
Conceptual Representation

28
• Social media picture/photo upload (Write
Let’s discuss down requirements)
• What all you can think of for this use case /
with example Interactions

29
Conceptual
Model

30
Now Read
this
Logical
Model

31
Questions?

32

You might also like