What is Graph Processing in SQL Server 2017?

Guy-Glantser, 2018-01-08

There is a growing need for Graph Databases in the market. This is a type of database, which is capable of storing, representing and manipulating graphs easily and efficiently. Common use cases for using Graph Databases are social networks and network topologies. In a Graph Database, there are nodes (e.g. people in a social network) and edges (e.g. connections between people). Each node and edge can have attributes. For example, a relationship between people in a social network can be “friends”, “colleagues” or “followers”. A Graph Database provides an API, which allows writing queries to easily traverse the graph and calculate things like transitive closure.

 

SQL Server 2017 provides Graph Database capabilities out of the box. You can now create two new special tables types: node tables and edge tables. You can also use the new MATCH T-SQL function to search a graph. With these new features, you can implement graphs for various use cases, just like you would do with other Graph Databases. Like many other features in SQL Server, these new features are part of the database engine. It’s not a separate engine with separate tools, like with other products. In SQL Server 2017, the same storage engine and query processor handle Graph queries. This means you can join between graph tables and other tables in a single query, and still get an optimized plan. This is a huge benefit of using Graph Database capabilities in SQL Server.

 

SQL Server implements node and edge tables as regular relational tables, and it translates the MATCH function to regular T-SQL constructs behind the scenes. In terms of interoperability, this is a huge advantage. Because it means that all the features in SQL Server that work with regular tables, also work with Graph tables. Think about indexes, backup & restore, import/export, etc. But the fact that Graph features are implemented using relational structures is also a drawback in terms of performance. It’s not an optimized engine designed specifically for Graph use cases. It means that it can perform as fast as a relational database – sometimes a bit faster, sometimes slower.

 

Want to learn more?

Start here: https://docs.microsoft.com/en-us/sql/relational-databases/graphs/sql-graph-overview.

The post What is Graph Processing in SQL Server 2017? appeared first on Madeira Data Solutions.

Rate

Share

Share

Rate

Related content

Database Mirroring FAQ: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup?

Question: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? This question was sent to me via email. My reply follows. Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? Databases to be mirrored are currently running on 2005 SQL instances but will be upgraded to 2008 SQL in the near future.

Robert Davis

2009-02-23

1,567 reads

Networking – Part 4

You may want to read Part 1 , Part 2 , and Part 3 before continuing. This time around I’d like to talk about social networking. We’ll start with social networking. Facebook, MySpace, and Twitter are all good examples of using technology to let…

Andy Warren

2009-02-17

1,530 reads

Speaking at Community Events – More Thoughts

Last week I posted Speaking at Community Events – Time to Raise the Bar?, a first cut at talking about to what degree we should require experience for speakers at events like SQLSaturday as well as when it might be appropriate to add additional focus/limitations on the presentations that are accepted. I’ve got a few more thoughts on the topic this week, and I look forward to your comments.

Andy Warren

2009-02-13

360 reads