Advantages/Disadvantages of graph databases
Advantages
natural representation of relationships
effective traversal
flexible schema
expressive query language like cypher
Disadvantages
massive graphs can become unclear and difficult in distributed processing
for large scale reporting or olap style queries relation might perform better
teams would need to adapt, difficult to adapt for already existing complex db architecture
less mature compared to established relational systems
What to take care of when inserting new nodes?
Perhaps that the node is a thing
Further:
avoid duplicates by using merge in cypher
assign a meaning full label
if possible add directly relation for integration in graph
Did you use graph databases before if no what was an interesting thing you learnt and why?
No
speed in querying connected entities e.g. users being friend in relational vs. graphDB -> Because when building on scale it might be an option I haven’t considered before for use cases
storing relationships as first class citizens: relational have relationships implicit, graphdb explicit and efficient traversable. Who bough what product can be handled natural and performantly -> cool for recsys
Difference native vs non native graph db
Native:
built for storing and processing graphs
uses native graph storage
query engine uses index-free adjacency
faster
e.g. neo4j
Non-native:
built on top of non graph storage e.g. relational
maps graph structures onto other storage models
requires lookups on join to simulate traversal
slower for complex graphs
Difference relational vs graphDB
RDBMS
tables wiht rows and columns
foxed schema
represented via foreign keys and joins
sql
structured data,
poor performance with deep joins
finance, erp
Graphdb
nodes and relationships
schema optional or flexible
relationchips as first class relationships
cybpher, aql
less suited for heavy tabular aggreagtion
social networks, recsys
RDMS vs NOSQL
Feature
Relational Database
NoSQL Databases
Data Model
Relational (tables)
Key-Value, Document, Column, Graph
Schema
Rigid, predefined schema
Schema-less or flexible schema
Scalability
Vertical (scale-up)
Horizontal (scale-out)
ACID Compliance
Fully ACID-compliant
Often BASE (eventual consistency), but some support ACID
Joins
Built-in and expressive
Often unsupported or inefficient
Use Case Fit
Structured, transactional systems
Large-scale, distributed, unstructured/semi-structured data
Examples
PostgreSQL, MySQL, Oracle
MongoDB (Document), Cassandra (Column), Neo4j (Graph), Redis (Key-Value)
What’s the difference between relational and graph/NoSQL databases?
Relational DBs use fixed schemas, tables, and foreign keys; ideal for structured, transactional data.
Graph DBs model entities and relationships directly; ideal for connected data and traversals.
NoSQL DBs (in general) offer schema flexibility and horizontal scalability, suited for large, varied, or evolving datasets.
What is the Labeled Property Graph model used by Neo4j?
A graph model with:
Nodes: Entities with properties
Relationships: Directed edges between nodes, also with properties
Labels: Categorize nodes (can have multiple)
Properties: Key-value pairs on both nodes and relationships
Supports schema-optional modeling and efficient traversal via index-free adjacency.
What is the difference between properties and labels in graph databases, and why do they exist?
Labels:
Categorize nodes into types or roles (e.g., :User, :Product)
Help organize data and optimize query performance
A node can have multiple labels
Properties:
Store data values as key-value pairs on nodes or relationships (e.g., name: "Alice", since: 2020)
Add detail to the graph’s elements
Why they exist:
Labels provide structure and fast lookup
Properties store the actual attributes and metadata needed for queries and analysis
Why are graph databases often more efficient than relational databases, and when are they faster?
Why more efficient:
Use index-free adjacency: nodes directly reference connected nodes
No need for costly JOIN operations
Designed for traversal-based queries (e.g., shortest path, friends-of-friends)
When faster:
For deeply connected data and recursive queries
When querying complex relationships (e.g., social networks, fraud detection)
In real-time applications where quick relationship lookups are critical
Summary:
Graph DBs outperform relational DBs when the query involves many relationships or multiple hops through connected data.
Which query languages are used in ArangoDB and Neo4j?
Neo4j uses Cypher – a declarative graph query language designed specifically for querying and updating property graphs.
ArangoDB uses AQL (ArangoDB Query Language) – a SQL-like language that supports graph, document, and key-value queries across its multi-model architecture.
What are the key characteristics of the Labeled Property Graph (LPG) model?
Nodes: Represent entities, can have key-value properties
Relationships: Directed edges connecting nodes, also support properties
Labels: Categorize nodes by type or role (e.g., :User, :Movie)
Properties: Stored on both nodes and relationships as flexible key-value pairs
Schema-optional: No rigid schema required, supports dynamic structure
What are the advantages of graph databases compared to relational databases?
Efficient for connected data: Faster traversal without expensive JOINs
Index-free adjacency: Direct references between connected nodes
Flexible schema: Schema-optional, easily evolves with changing requirements
Ideal for recursive/deep queries: E.g., social networks, recommendations, fraud detection
Natural modeling: Graphs mirror real-world networks more intuitively than tables
Zuletzt geändertvor 3 Tagen