Graph databases


Graph databases [30 marks]
Consider a simple application where walking treks are cycles (it ends where it starts) made up
of sections between two huts, each offering a number #beds of beds and, potentially, showers.
The sections have a distance in kilometers, and treks have a name and location.
Fig. 1. Property Graph
Questions:
1. Write down the formal property graph model (V, E, η, λ, ν) for the property graph in
Figure 1. [6 marks]
2. Write the following English language query in regular property graph logic:
Return the trek nodes that have 2 or 3 sections. [4 marks]
3. Write the following English language query in regular property graph logic:
Find all pairs of hut nodes, each having showers and at least 15 beds, and directly connected by a section. [4 marks]
4. Write the following English language query in regular property graph logic:
Return all trek nodes that have some section, each at most 25kms long and only connecting
huts with showers available. [4 marks]
5. Write down the queries from Questions 2, 3, and 4 in regular property graph algebra.
WX:codinghelp

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值