Graph Database — Transcript
Full transcript
- 0:05a graph database is designed to store
- 0:08and manage data in the form of graphs
- 0:11rather than tables as in relational
- 0:15databases in a graph data is represented
- 0:18as nodes edges and properties nodes
- 0:22represent entities or objects such as
- 0:25people places or
- 0:28products Ed just represent the
- 0:31relationship between nodes such as
- 0:33friend owns or friend
- 0:36of properties or attributes or details
- 0:41that describe nodes and edges such as
- 0:44person's age or the date of
- 0:47purchase another example shown on the
- 0:50screen represents a graph that describes
- 0:54a scenario within an academic
- 0:56environment the graph highlights two
- 1:00different parts that illustrate the
- 1:03semantics and instance of a specific
- 1:06moment more details on this will be
- 1:09discussed later in this
- 1:12video how graph databases differ from
- 1:16relational
- 1:18databases graph databases are highly
- 1:20effective in applications where
- 1:23relationships are
- 1:25crucial in a relational database
- 1:28modeling a network with many need to
- 1:30many relationships across various
- 1:32entities involves numerous joints
- 1:36table which can be complex and slow with
- 1:40large data sets in contrast graph
- 1:44databases store relationships directly
- 1:46in the graph structure allowing for
- 1:49efficient
- 1:50[Music]
- 1:55traversal the image displayed on the
- 1:57screen highlights a sample graph
- 2:00to store this graph in the database it
- 2:03first needs to be converted into code
- 2:07which then be stored in the graph
- 2:23DB the graph consists of two parts
- 2:27clearly separated in a image by a
- 2:29horizontal line the section below this
- 2:32line is referred to as resource
- 2:35description framework rdf part which
- 2:39resembles two PS in the relational
- 2:42database the section above the line is
- 2:45referred to as rdf schema which is a
- 2:48similar to a database
- 2:50schema primarily describing the graphs
- 2:54semantics typically domain experts
- 2:57design the schema section
- 3:00a well-designed schema enhances the
- 3:03Precision of the graph
- 3:07semantics the graph includes various
- 3:10types of elements or nodes such as
- 3:14individuals classes and
- 3:16relationship individuals represent
- 3:19instance of Real World
- 3:21objects for example discrete mathematics
- 3:25and Joe are individuals in this graph
- 3:39entities are represented by
- 3:41classes which correspond to specific
- 3:45instances in this graph course associate
- 3:49professor academic staff members are
- 3:51examples of
- 3:53classes is taught by and invokes are
- 3:57examples of
- 3:58relationships that primarily connects
- 4:00two
- 4:02entities generally there are two types
- 4:04of
- 4:06relationship object relationship and a
- 4:08data
- 4:11relationship object relationship connect
- 4:13two different
- 4:25objects while data relationship link an
- 4:28object to a literal
- 4:31literals are General forms that can be
- 4:35specifically represented as numbers
- 4:37strings integer dates or times with many
- 4:41data types borrowed from xml's basic
- 4:44data
- 4:46type now let us start converting the
- 4:49graph shown in the figure into
- 4:51corresponding pood let us take the first
- 4:53statement thep mathematics is taught
- 4:57by Joe Smith
- 5:00this is called a
- 5:01triples so we are going to write three
- 5:03different words and we make sure we have
- 5:06a colon in front of all three words let
- 5:10us take another statement from the graph
- 5:11which is nothing but Joe Smith is of
- 5:14type associate
- 5:16professor so write the statement in the
- 5:18form of a triple that is Jo Smith is
- 5:22type of associate professor make sure
- 5:26you are having colon in front of every
- 5:31resources let us take one more example
- 5:34discrete mathematics is of type
- 5:37course any statement we take from the
- 5:40graph that will be written in the form
- 5:42of a
- 5:43triples with a prefix as a
- 5:47coding now let us take an property is
- 5:51start by now first of all we have to
- 5:53Define is start by is of type
- 5:57property so we have to Define is is
- 6:01taught by is of type
- 6:14property as I already told you there are
- 6:17two different properties are there
- 6:19object property and data type
- 6:22property from this particular screen we
- 6:24are able to understand is start by is an
- 6:27object property
- 6:30similarly whenever you talk about an
- 6:32object property the object property will
- 6:34have some resources on the left side and
- 6:37some resources on the right
- 6:39side so he T by is having a domain on
- 6:44one side having a
- 6:48course
- 6:51similarly is Tau by is having an other
- 6:54side that's called a range side as an
- 6:57academic sta member
- 6:59is taught
- 7:02by rdfs
- 7:05range academic staff
- 7:10M and with respect to this particular
- 7:13graph we can also see is thought by is
- 7:17defined as a subproperty of
- 7:20in so can be converted into
- 7:22corresponding statement as is T
- 7:27by subproperty of
- 7:45in now in this particular
- 7:48code you can see there are few
- 7:53keywords having prefixes like rdfs and
- 7:57rdf and out
- 8:00there is a
- 8:02reason why we have chosen rdf rdfs and
- 8:06all before that let us take one more
- 8:08statement in the graph that is academic
- 8:10staff member which is nothing but
- 8:12associate professor is a subass of
- 8:14academic staff
- 8:17member so there are few places we are
- 8:20using the keywords like rdfs there are
- 8:23few places we are using out those are
- 8:26syntaxes of
- 8:27generating this graph
- 8:30those are syntactic sugar of
- 8:34this semantic web
- 8:37Concepts so wherever there is a type we
- 8:40include the prefix as
- 8:43rdf these are
- 8:46keywords the terms which are underlined
- 8:49are keywords
- 9:01similarly if you see the very nature of
- 9:04this graph comes with so many user
- 9:07defined terminologies so for example
- 9:09mathematics
- 9:10Jo so these terminologies are non
- 9:15keywords so this non keywords should be
- 9:18prefixed with some user defined
- 9:22prefixes so for example consider we are
- 9:25defining IO
- 9:26string so we Define uh
- 9:30um what is the purpose of having an IO
- 9:32Stream So IO stream will Define the name
- 9:34space called STD so whenever we use C
- 9:37out or a c in statement how do we use it
- 9:40in C++ STD scope resolution C out and
- 9:44STD scope resolution seeing so the name
- 9:48space name scope resolution and the
- 9:52class name similarly with respect to
- 9:54semantic web we use the Nam space name
- 9:59colon the resource name ABC
- 10:03colon course ABC colon assistant
- 10:06professor ABC called associate professor
- 10:09so in total if you see this particular
- 10:12sample code is having the following
- 10:14prefixes ABC rdf rdfs and R few prefixes
- 10:20are comes as part of language construct
- 10:23and few prefixes are user defined
- 10:26prefixes say for example ABC
- 10:30so now let us include these prefixes as
- 10:33part of our previous code any prefixes
- 10:36to be included as part of the code we
- 10:37have to use a statement like at prefix
- 10:41space the prefix name colum followed by
- 10:45some
- 10:46Ur
- 10:48similarly we use prefix for rdf and rdfs
- 10:53and
- 10:54out so if it is in default keywords like
- 10:57rdf rdfs and out
- 11:00the prefixes will be given by the
- 11:03language construct itself so the Uris we
- 11:07WR here all are default or specified by
- 11:10the language Constructor we cannot
- 11:12change that but if you take the user
- 11:15defined prefixes like ABC we can give
- 11:17our own uis it is not necessary that
- 11:20that Uris should exist in the internet
- 11:23all it expects is the
- 11:27Uris supposed to be in the proper format
- 11:30that's
- 11:32all so now you can see that a complete a
- 11:36code snippet of a graph the graph shown
- 11:40in the image is converted into
- 11:42corresponding
- 11:45code writing such complex code manually
- 11:49is difficult and is timec
- 11:51consuming instead of writing such
- 11:54complex code we can alternatively use
- 11:57the visual tools like prot to construct
- 12:00the similar graphs at
- 12:02e the tools facilitate creating such
- 12:05complex graphs using simple drag and
- 12:09drop and G based creation of
- 12:12graphs further the tools facilitate
- 12:16converting the constructed graph into a
- 12:18code just in a
- 12:21click as part of this tutorial let us
- 12:24discuss creating the sample example
- 12:26graph using prot tool
- 12:30let us start creating schema part first
- 12:34the schema consists of classes like
- 12:36courses Professor associate professor
- 12:40academic staff member and a staff
- 12:43member the schema also contains object
- 12:46relationships like involves and is Tau
- 12:51by let us start creating schema of this
- 12:54ontology first the schema consist of
- 12:58classes course Professor associate
- 13:02professor and assistant professor let us
- 13:05create these classes using prot
- 13:12tool here the professor associate
- 13:15professor and assistant professor are
- 13:18subass of the class called academic
- 13:21staff member let us create a class
- 13:25academic staff member first
- 13:29then let us make sure assistant
- 13:32professor associate professor and
- 13:33Professor are the classes subass of
- 13:37academic staff member for creating this
- 13:40subass relationship all we need to do is
- 13:43just drag and drop these classes into
- 13:46academic staff member so you can see
- 13:49moment you drag and drop the professor
- 13:52assant professor associate professor to
- 13:54an academic staff member the subass
- 13:57relationship will be automatically
- 13:58established
- 14:02in the same line the image shows the
- 14:06academic staff member is subass of staff
- 14:10member so let us create the staff member
- 14:14and drag and drop academic staff member
- 14:18into staff member so
- 14:21automatically the academic staff member
- 14:23Becomes subass of staff
- 14:27member the graph consists of set of
- 14:31object properties is Tau by and
- 14:35invols let us create these object
- 14:38properties using object properties
- 14:43tab let me create is thought by as an
- 14:46object property and then involves as an
- 14:49object property similar to a class and
- 14:53subclass creation just drag and drop is
- 14:56Tau by into
- 14:58invols it automatically
- 15:00establishes the subproperty
- 15:06relationship the object property of the
- 15:09graph having two sides domain and range
- 15:13side let us create this domain and range
- 15:16for involves so click on the domain and
- 15:21navigate to the corresponding class and
- 15:23select for instance course is the class
- 15:26on the domain side similarly click on
- 15:29the Range side and select academic staff
- 15:32member as a
- 15:34range similarly let us create domain and
- 15:38range of is by so for is by the domain
- 15:44will be course and the range will be
- 15:47academic staff member of course this
- 15:50domain and range will be automatically
- 15:52inherited from invols
- 15:56property the graph consist of two data
- 16:00property ID and a phone number let us
- 16:03create these data properties in prot
- 16:08using data properties
- 16:18tab let us create the ID and phone
- 16:21number using data properties tab the ID
- 16:26and phone number are created as a child
- 16:29class of top data
- 16:32property so the ID will have domain as
- 16:37well as
- 16:39range the domain of ID is staff
- 16:43member which is selected from the
- 16:46following
- 16:49tab similarly the ID having a range as a
- 16:55literal now you can see the literal tab
- 16:59not only having the type as literal you
- 17:02can select any one of the literal type
- 17:04which includes date time everything is
- 17:07displayed in the screen so as part of
- 17:10this we have successfully created the
- 17:12schema part of this graph let us start
- 17:16creating the individual section of the
- 17:19graph let us go to individuals by class
- 17:23Tab and select the class for which you
- 17:27want to create an instance say for
- 17:29example I want to create an instance of
- 17:31class course so click on the diamond
- 17:34symbol and specify discrete mathematics
- 17:37now the instance has been created
- 17:39similarly I want to create an instance
- 17:41as Joe Smith of type associate professor
- 17:45click on associate professor and then
- 17:48diamond symbol then specify
- 17:51Joe so I have created instance of
- 17:54associate
- 17:56professor let us connect the disc
- 17:58discret mathematics to Joe Smith by
- 18:01using the property called is
- 18:09by now navigate to course member and
- 18:13discrete
- 18:15mathematics and click on object property
- 18:18assertion specify the name of the object
- 18:21property which is nothing but is start
- 18:22by and specify the range which is
- 18:25nothing but
- 18:27Joe so
- 18:29we have created an object property is T
- 18:32by which connects dm with
- 18:35Joe now the entire graph has been
- 18:38successfully created using the tool prot
- 18:43let us save this graph into any one of
- 18:46the synthatic
- 18:49style now we can store the graph as an
- 18:52XML or trle or any different format
- 18:57though the formats are different the
- 18:59graph it looks
- 19:00similar Let Us store the graph in the
- 19:03form of trle specify the graph name I
- 19:07mentioned as a course
- 19:09here so extension of this graph is O WL
- 19:14that is web onology language Let Us open
- 19:17this file using visual studio
- 19:23code now what you see here is set of
- 19:27triples the entire f file is set of
- 19:29triples so for example involves object
- 19:34property okay domain is having a course
- 19:38now whatever the triples which we have
- 19:40created manually here the same set of
- 19:43triples has been
- 19:44created using the tool called
- 19:47prot The Tool successfully converts the
- 19:51graph as shown in the image to
- 19:53corresponding
- 19:56code after success converting the graph
- 20:00into corresponding code that is course.
- 20:04file let us load that all file into a
- 20:08graph DB what you see here is an
- 20:11interface of graph DB
- 20:14database now if you want to load an ow
- 20:18file which you created then you have to
- 20:20create a new
- 20:22repository specify name of an
- 20:25repository and create a repository
- 20:29moment you create a repository now you
- 20:32can see there is a small symbol called
- 20:34connect repository click on the connect
- 20:36repository so that the repository become
- 20:39active now whatever the owl file which
- 20:42you created you can import the owl file
- 20:46using upload rdf
- 20:49file once you successfully import the
- 20:52owl file into this graph DB environment
- 20:56now you can operate with the code from
- 21:00the graph
- 21:02DB now if you want to see what the
- 21:06exactly the graph which is loaded from
- 21:08the course. file you can click on graph
- 21:13overview and you can see what are all
- 21:16the triples has been loaded from the co.
- 21:20all to the graph environment let us
- 21:22click on the academic staff member and
- 21:25visual graph you can visually interact
- 21:28with this graph now the color code
- 21:31represents different resources in the
- 21:34graph so so for example here the DM and
- 21:38Joe are individuals in the graph just
- 21:41click on the Arrow Mark you you'll get
- 21:44the corresponding type information
- 21:46property information class information
- 21:49okay all this information whatever you
- 21:52created as part of the course. you can
- 21:55visually interact this is one advantage
- 21:58of this
- 21:59tool once you created and loaded a graph
- 22:03into this
- 22:04environment you can write a simple
- 22:07sparql queries which is much similar to
- 22:10SQL queries to get information from this
- 22:16graph now what you see in the screen is
- 22:19an example sparkel query which is
- 22:22equivalent to select star from a table
- 22:25name the select star from table name
- 22:27retrives all the tuples from the table
- 22:32similarly this particular quy consist of
- 22:35a pattern the pattern is of the form
- 22:40question mark s question mark p and
- 22:42question mark o what are these question
- 22:45mark S P stands for all are variables so
- 22:51s p are selected randomly and can be
- 22:55used your own variables as well so so
- 22:58what happens here the graph tried to
- 23:01match the corresponding patterns from
- 23:04the existing code so if you look at this
- 23:07the discrete mathematics is taught by
- 23:09Joe where the discrete mathematic can be
- 23:11an example of question mark s is taught
- 23:14by can be considered as question mark p
- 23:17and Joe Smith can be question mark o
- 23:19these triple patterns will be matched
- 23:21against all the throughout the graph so
- 23:25you can see there are so many triples
- 23:27can be matched from the existing graph
- 23:30all these triples matched against this
- 23:33particular pattern will be the result
- 23:35but we prefer only the random 10 results
- 23:39from the spark W query so these 10
- 23:42results will be displayed in the screen
- 23:45now let us replace the property question
- 23:48mark p by rdf type now we have changed
- 23:52the pattern into question mark s that is
- 23:54variable rdf type and question mark o so
- 23:58subject and object can be anything but
- 24:02we are very particular about the
- 24:04property rdf type so the result carries
- 24:08only two columns that is question mark s
- 24:11and question mark o these two resources
- 24:14that is subject and object connected by
- 24:17a property rdf type will be wred as a
- 24:21result we can
- 24:23further uh extend this particular
- 24:26pattern like the same query is extended
- 24:30as the question mark o is rdf type will
- 24:33be all class so it means that it's like
- 24:36an
- 24:37uncondition I want to have a statements
- 24:41with question mark s and question mark o
- 24:44connected by rdf type as well as the
- 24:47question mark W type must be an owl
- 24:50class the corresponding pattern will be
- 24:53matched against the graph the results
- 24:56will be written according to the pattern
- 24:59match now let us discuss how do we
- 25:02restrict our pattern for a specific
- 25:06subject I have taken a a complete URI of
- 25:10a subject course and mentioned as a
- 25:15subject followed by two variables it
- 25:17means that I need to find a pattern with
- 25:21a subject as course and object and um
- 25:26predicate can be anything so when
- 25:28whenever this particular pattern has
- 25:29been matched in the graph the
- 25:31corresponding set of pup will be
- 25:33returned now just to change I want to
- 25:36keep the course in the object part
- 25:39rather than the subject part so whenever
- 25:41you change that okay any subject
- 25:44followed by any predicate and followed
- 25:47by the object as in course will be
- 25:50returned as
- 25:53result the owl file loaded as part of
- 25:56graph DB can also been accessed from any
- 26:00of the higher level programming language
- 26:01so for example you can access this graph
- 26:04DB from python from java from nodejs any
- 26:07programming languages so the server
- 26:10programs written on any of these
- 26:11languages can interact with the graph TB
- 26:14and you can retry whatever the results
- 26:16it needs so for example as part of this
- 26:19particular uh presentation we have some
- 26:23two demo programs written in
- 26:25Python where we have three variables uh
- 26:29the Python program consists of three
- 26:31variables uh these three variables are
- 26:35loaded with the parameters retrived from
- 26:37the graph
- 26:39TV the parameters include query endpoint
- 26:42address header or copied from the graph
- 26:47DBS interface so for example the query
- 26:49can be any query which we discussed
- 26:50earlier in addition to that the endpoint
- 26:53address which can be obtained from graph
- 26:56TB as well as the accepted head retrive
- 26:59so all this information will be passed
- 27:01as an request from the application
- 27:03program to retrive necessary information
- 27:06from the graph DB the graph DB Returns
- 27:10the result in the form of a Json object
- 27:12so the Json object will be further
- 27:15passed to get the necessary results from
- 27:18the graph DB from the application uh
- 27:21program point of view from the
- 27:23literature point of view there are few
- 27:25terminologies has been used
- 27:27interchangeably such as semantic web
- 27:30Knowledge
- 27:31Graph so whenever we have a data in the
- 27:34form of a semantic web or a Knowledge
- 27:36Graph how do we store the data for
- 27:39storing the data we use graph TB what
- 27:43are the applications of these
- 27:45areas we can assume applications of
- 27:48either Knowledge Graph or semantic web
- 27:52or graph DB if there is a complex on the
- 27:55interconnected data then the best way to
- 27:59represent is Knowledge Graph based
- 28:01things highlighted in this particular
- 28:03screen so we have used Knowledge Graph
- 28:06for representing food related domain
- 28:09building information model
- 28:12iot and uh computer security
- 28:14recommendation system natural language
- 28:17processing building
- 28:19ontology so these domains are not
- 28:22limited with few applications thank you
About this transcript
This page contains the full transcript of Graph Database by Dr Gowtham Ramesh, generated from the public captions YouTube serves with the video. The transcript has 3,220 words across 534 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.