1 of 18

Introduction to Data Science

By

S.V.V.D.Jagadeesh

Sr. Assistant Professor

Dept of Artificial Intelligence & Data Science

LAKIREDDY BALI REDDY COLLEGE OF ENGINEERING

2 of 18

At the end of this unit, Student will be able to:

  • CO4: Enumerate the tools and applications on data science. (Understand-L2)

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

Unit-IV Outcomes

LBRCE

OOP

3 of 18

  • Let’s start by familiarizing ourselves with the concept of connected data and its representation as graph data.
  • ■ Connected data—As the name indicates, connected data is characterized by the fact that the data at hand has a relationship that makes it connected.
  • ■ Graphs—Often referred to in the same sentence as connected data. Graphs are well suited to represent the connectivity of data in a meaningful way.

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

Introduction to Graph Database

LBRCE

OOP

4 of 18

  • ■ Graph databases—The reason this subject is meriting particular attention is because, besides the fact that data is increasing in size, it’s also becoming more interconnected. Not much effort is needed to come up with well-known examples of connected data
  • A prominent example of data that takes a network form is social media data. Social media allows us to share and exchange data in networks, thereby generating a great amount of connected data. �

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

Introduction to Graph Database

LBRCE

OOP

5 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

Terminology of Graph Databases

LBRCE

OOP

6 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

Terminology of Graph Databases

■ Entities—We have two entities that represent people (User1 and User2). These entities have the properties “name” and “lastname”.

■ Properties—The properties are defined by key-value pairs. From this graph we can also infer that User1 with the “name” property Paul knows User2 with the “name” property Jelme

LBRCE

OOP

7 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

Terminology of Graph Databases

■ Relationships—This is the relationship between Paul and Jelme.

Note that the relationship has a direction: it’s Paul who “knows” Jelme and not the other way around.

User1 and User2 both represent people and could therefore be grouped.

■ Labels—In a graph database, one can group nodes by using labels. User1 and User2 could in this case both be labeled as “User”

LBRCE

OOP

8 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

Property Graphs

LBRCE

OOP

9 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

Property Graphs

  • Connected data often contains many more entities and connections.
  • Two more entities are included: Country1 with the name Cambodia and Country2 with the name Sweden.
  • Two more relationships exist: “Has_been_in” and “Is_born_in”.
  • In the previous graph, only the entities included a property, now the relationships also contain a property.
  • Such type of graphs are called as property graphs

LBRCE

OOP

10 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

Property Graphs

  • The relationship connecting the nodes User1 and Country1 is of the type “Has_been_in” and has as a property “Date” which represents a data value.
  • Similarly, User2 is connected to Country2 but through a different type of relationship, which is of the type “Is_born_in”.
  • Note that the types of relationships provide us a context of the relationships between nodes.
  • Nodes can have multiple relationships.

LBRCE

OOP

11 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

When to use Graph Databases

LBRCE

OOP

12 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

When to use graph databases

  • we’ll need to rely on a graph database when the data is complex but still small.
  • Though “small” is a relative thing here, we’re still talking hundreds of millions of nodes.
  • Handling complexity is the main asset of a graph database and the ultimate “why” you’d use it.

LBRCE

OOP

13 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

graph databases alternate to relational database

  • Contrary to what the name of relational databases indicates, not much is relational about them except that the foreign keys and primary keys are what relate tables.
  • In contrast, relationships in graph databases are first-class citizens.
  • Through this aspect, they lend themselves well to modeling and querying connected data.
  • A relational database would rather strive for minimizing data redundancy.
  • This process is known as database normalization, where a table is decomposed into smaller (less redundant) tables while maintaining all the information intact.
  • In a normalized database one needs to conduct changes of an attribute in only one table.
  • The aim of this process is to isolate data changes in one table.

LBRCE

OOP

14 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

graph databases alternate to relational database

  • Relational database management systems (RDBMS) are a good choice as a database for data that fits nicely into a tabular format.
  • The relationships in the data can be expressed by joining the tables.
  • Their fit starts to downgrade when the joins become more complicated, especially when they become many-to-many joins.
  • Query time will also increase when your data size starts increasing, and maintaining the database will be more of a challenge.
  • These factors will hamper the performance of your database.

LBRCE

OOP

15 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

graph databases alternate to relational database

  • Graph databases, on the other hand, inherently store data as nodes and relationships.
  • Although graph databases are classified as a NoSQL type of database, a trend to present them as a category in their own right exists.
  • One seeks the justification for this by noting that the other types of NoSQL databases are aggregation-oriented, while graph databases aren’t

LBRCE

OOP

16 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

graph databases alternate to relational database

LBRCE

OOP

17 of 18

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

graph databases alternate to relational database

LBRCE

OOP

18 of 18

  • Unit-IV Outcomes
  • Introduction to Graph Databases
  • Property Graphs
  • When to use graph databases
  • Graph databases alternate to relational databases

S.V.V.D.Jagadeesh

Wednesday, March 19, 2025

Summary

LBRCE

OOP