YouTube2Text

Graph Database — Transcript

by Dr Gowtham Ramesh · 3,220 words · 534 segments · language en · Watch on YouTube

Full transcript

  1. 0:05a graph database is designed to store
  2. 0:08and manage data in the form of graphs
  3. 0:11rather than tables as in relational
  4. 0:15databases in a graph data is represented
  5. 0:18as nodes edges and properties nodes
  6. 0:22represent entities or objects such as
  7. 0:25people places or
  8. 0:28products Ed just represent the
  9. 0:31relationship between nodes such as
  10. 0:33friend owns or friend
  11. 0:36of properties or attributes or details
  12. 0:41that describe nodes and edges such as
  13. 0:44person's age or the date of
  14. 0:47purchase another example shown on the
  15. 0:50screen represents a graph that describes
  16. 0:54a scenario within an academic
  17. 0:56environment the graph highlights two
  18. 1:00different parts that illustrate the
  19. 1:03semantics and instance of a specific
  20. 1:06moment more details on this will be
  21. 1:09discussed later in this
  22. 1:12video how graph databases differ from
  23. 1:16relational
  24. 1:18databases graph databases are highly
  25. 1:20effective in applications where
  26. 1:23relationships are
  27. 1:25crucial in a relational database
  28. 1:28modeling a network with many need to
  29. 1:30many relationships across various
  30. 1:32entities involves numerous joints
  31. 1:36table which can be complex and slow with
  32. 1:40large data sets in contrast graph
  33. 1:44databases store relationships directly
  34. 1:46in the graph structure allowing for
  35. 1:49efficient
  36. 1:50[Music]
  37. 1:55traversal the image displayed on the
  38. 1:57screen highlights a sample graph
  39. 2:00to store this graph in the database it
  40. 2:03first needs to be converted into code
  41. 2:07which then be stored in the graph
  42. 2:23DB the graph consists of two parts
  43. 2:27clearly separated in a image by a
  44. 2:29horizontal line the section below this
  45. 2:32line is referred to as resource
  46. 2:35description framework rdf part which
  47. 2:39resembles two PS in the relational
  48. 2:42database the section above the line is
  49. 2:45referred to as rdf schema which is a
  50. 2:48similar to a database
  51. 2:50schema primarily describing the graphs
  52. 2:54semantics typically domain experts
  53. 2:57design the schema section
  54. 3:00a well-designed schema enhances the
  55. 3:03Precision of the graph
  56. 3:07semantics the graph includes various
  57. 3:10types of elements or nodes such as
  58. 3:14individuals classes and
  59. 3:16relationship individuals represent
  60. 3:19instance of Real World
  61. 3:21objects for example discrete mathematics
  62. 3:25and Joe are individuals in this graph
  63. 3:39entities are represented by
  64. 3:41classes which correspond to specific
  65. 3:45instances in this graph course associate
  66. 3:49professor academic staff members are
  67. 3:51examples of
  68. 3:53classes is taught by and invokes are
  69. 3:57examples of
  70. 3:58relationships that primarily connects
  71. 4:00two
  72. 4:02entities generally there are two types
  73. 4:04of
  74. 4:06relationship object relationship and a
  75. 4:08data
  76. 4:11relationship object relationship connect
  77. 4:13two different
  78. 4:25objects while data relationship link an
  79. 4:28object to a literal
  80. 4:31literals are General forms that can be
  81. 4:35specifically represented as numbers
  82. 4:37strings integer dates or times with many
  83. 4:41data types borrowed from xml's basic
  84. 4:44data
  85. 4:46type now let us start converting the
  86. 4:49graph shown in the figure into
  87. 4:51corresponding pood let us take the first
  88. 4:53statement thep mathematics is taught
  89. 4:57by Joe Smith
  90. 5:00this is called a
  91. 5:01triples so we are going to write three
  92. 5:03different words and we make sure we have
  93. 5:06a colon in front of all three words let
  94. 5:10us take another statement from the graph
  95. 5:11which is nothing but Joe Smith is of
  96. 5:14type associate
  97. 5:16professor so write the statement in the
  98. 5:18form of a triple that is Jo Smith is
  99. 5:22type of associate professor make sure
  100. 5:26you are having colon in front of every
  101. 5:31resources let us take one more example
  102. 5:34discrete mathematics is of type
  103. 5:37course any statement we take from the
  104. 5:40graph that will be written in the form
  105. 5:42of a
  106. 5:43triples with a prefix as a
  107. 5:47coding now let us take an property is
  108. 5:51start by now first of all we have to
  109. 5:53Define is start by is of type
  110. 5:57property so we have to Define is is
  111. 6:01taught by is of type
  112. 6:14property as I already told you there are
  113. 6:17two different properties are there
  114. 6:19object property and data type
  115. 6:22property from this particular screen we
  116. 6:24are able to understand is start by is an
  117. 6:27object property
  118. 6:30similarly whenever you talk about an
  119. 6:32object property the object property will
  120. 6:34have some resources on the left side and
  121. 6:37some resources on the right
  122. 6:39side so he T by is having a domain on
  123. 6:44one side having a
  124. 6:48course
  125. 6:51similarly is Tau by is having an other
  126. 6:54side that's called a range side as an
  127. 6:57academic sta member
  128. 6:59is taught
  129. 7:02by rdfs
  130. 7:05range academic staff
  131. 7:10M and with respect to this particular
  132. 7:13graph we can also see is thought by is
  133. 7:17defined as a subproperty of
  134. 7:20in so can be converted into
  135. 7:22corresponding statement as is T
  136. 7:27by subproperty of
  137. 7:45in now in this particular
  138. 7:48code you can see there are few
  139. 7:53keywords having prefixes like rdfs and
  140. 7:57rdf and out
  141. 8:00there is a
  142. 8:02reason why we have chosen rdf rdfs and
  143. 8:06all before that let us take one more
  144. 8:08statement in the graph that is academic
  145. 8:10staff member which is nothing but
  146. 8:12associate professor is a subass of
  147. 8:14academic staff
  148. 8:17member so there are few places we are
  149. 8:20using the keywords like rdfs there are
  150. 8:23few places we are using out those are
  151. 8:26syntaxes of
  152. 8:27generating this graph
  153. 8:30those are syntactic sugar of
  154. 8:34this semantic web
  155. 8:37Concepts so wherever there is a type we
  156. 8:40include the prefix as
  157. 8:43rdf these are
  158. 8:46keywords the terms which are underlined
  159. 8:49are keywords
  160. 9:01similarly if you see the very nature of
  161. 9:04this graph comes with so many user
  162. 9:07defined terminologies so for example
  163. 9:09mathematics
  164. 9:10Jo so these terminologies are non
  165. 9:15keywords so this non keywords should be
  166. 9:18prefixed with some user defined
  167. 9:22prefixes so for example consider we are
  168. 9:25defining IO
  169. 9:26string so we Define uh
  170. 9:30um what is the purpose of having an IO
  171. 9:32Stream So IO stream will Define the name
  172. 9:34space called STD so whenever we use C
  173. 9:37out or a c in statement how do we use it
  174. 9:40in C++ STD scope resolution C out and
  175. 9:44STD scope resolution seeing so the name
  176. 9:48space name scope resolution and the
  177. 9:52class name similarly with respect to
  178. 9:54semantic web we use the Nam space name
  179. 9:59colon the resource name ABC
  180. 10:03colon course ABC colon assistant
  181. 10:06professor ABC called associate professor
  182. 10:09so in total if you see this particular
  183. 10:12sample code is having the following
  184. 10:14prefixes ABC rdf rdfs and R few prefixes
  185. 10:20are comes as part of language construct
  186. 10:23and few prefixes are user defined
  187. 10:26prefixes say for example ABC
  188. 10:30so now let us include these prefixes as
  189. 10:33part of our previous code any prefixes
  190. 10:36to be included as part of the code we
  191. 10:37have to use a statement like at prefix
  192. 10:41space the prefix name colum followed by
  193. 10:45some
  194. 10:46Ur
  195. 10:48similarly we use prefix for rdf and rdfs
  196. 10:53and
  197. 10:54out so if it is in default keywords like
  198. 10:57rdf rdfs and out
  199. 11:00the prefixes will be given by the
  200. 11:03language construct itself so the Uris we
  201. 11:07WR here all are default or specified by
  202. 11:10the language Constructor we cannot
  203. 11:12change that but if you take the user
  204. 11:15defined prefixes like ABC we can give
  205. 11:17our own uis it is not necessary that
  206. 11:20that Uris should exist in the internet
  207. 11:23all it expects is the
  208. 11:27Uris supposed to be in the proper format
  209. 11:30that's
  210. 11:32all so now you can see that a complete a
  211. 11:36code snippet of a graph the graph shown
  212. 11:40in the image is converted into
  213. 11:42corresponding
  214. 11:45code writing such complex code manually
  215. 11:49is difficult and is timec
  216. 11:51consuming instead of writing such
  217. 11:54complex code we can alternatively use
  218. 11:57the visual tools like prot to construct
  219. 12:00the similar graphs at
  220. 12:02e the tools facilitate creating such
  221. 12:05complex graphs using simple drag and
  222. 12:09drop and G based creation of
  223. 12:12graphs further the tools facilitate
  224. 12:16converting the constructed graph into a
  225. 12:18code just in a
  226. 12:21click as part of this tutorial let us
  227. 12:24discuss creating the sample example
  228. 12:26graph using prot tool
  229. 12:30let us start creating schema part first
  230. 12:34the schema consists of classes like
  231. 12:36courses Professor associate professor
  232. 12:40academic staff member and a staff
  233. 12:43member the schema also contains object
  234. 12:46relationships like involves and is Tau
  235. 12:51by let us start creating schema of this
  236. 12:54ontology first the schema consist of
  237. 12:58classes course Professor associate
  238. 13:02professor and assistant professor let us
  239. 13:05create these classes using prot
  240. 13:12tool here the professor associate
  241. 13:15professor and assistant professor are
  242. 13:18subass of the class called academic
  243. 13:21staff member let us create a class
  244. 13:25academic staff member first
  245. 13:29then let us make sure assistant
  246. 13:32professor associate professor and
  247. 13:33Professor are the classes subass of
  248. 13:37academic staff member for creating this
  249. 13:40subass relationship all we need to do is
  250. 13:43just drag and drop these classes into
  251. 13:46academic staff member so you can see
  252. 13:49moment you drag and drop the professor
  253. 13:52assant professor associate professor to
  254. 13:54an academic staff member the subass
  255. 13:57relationship will be automatically
  256. 13:58established
  257. 14:02in the same line the image shows the
  258. 14:06academic staff member is subass of staff
  259. 14:10member so let us create the staff member
  260. 14:14and drag and drop academic staff member
  261. 14:18into staff member so
  262. 14:21automatically the academic staff member
  263. 14:23Becomes subass of staff
  264. 14:27member the graph consists of set of
  265. 14:31object properties is Tau by and
  266. 14:35invols let us create these object
  267. 14:38properties using object properties
  268. 14:43tab let me create is thought by as an
  269. 14:46object property and then involves as an
  270. 14:49object property similar to a class and
  271. 14:53subclass creation just drag and drop is
  272. 14:56Tau by into
  273. 14:58invols it automatically
  274. 15:00establishes the subproperty
  275. 15:06relationship the object property of the
  276. 15:09graph having two sides domain and range
  277. 15:13side let us create this domain and range
  278. 15:16for involves so click on the domain and
  279. 15:21navigate to the corresponding class and
  280. 15:23select for instance course is the class
  281. 15:26on the domain side similarly click on
  282. 15:29the Range side and select academic staff
  283. 15:32member as a
  284. 15:34range similarly let us create domain and
  285. 15:38range of is by so for is by the domain
  286. 15:44will be course and the range will be
  287. 15:47academic staff member of course this
  288. 15:50domain and range will be automatically
  289. 15:52inherited from invols
  290. 15:56property the graph consist of two data
  291. 16:00property ID and a phone number let us
  292. 16:03create these data properties in prot
  293. 16:08using data properties
  294. 16:18tab let us create the ID and phone
  295. 16:21number using data properties tab the ID
  296. 16:26and phone number are created as a child
  297. 16:29class of top data
  298. 16:32property so the ID will have domain as
  299. 16:37well as
  300. 16:39range the domain of ID is staff
  301. 16:43member which is selected from the
  302. 16:46following
  303. 16:49tab similarly the ID having a range as a
  304. 16:55literal now you can see the literal tab
  305. 16:59not only having the type as literal you
  306. 17:02can select any one of the literal type
  307. 17:04which includes date time everything is
  308. 17:07displayed in the screen so as part of
  309. 17:10this we have successfully created the
  310. 17:12schema part of this graph let us start
  311. 17:16creating the individual section of the
  312. 17:19graph let us go to individuals by class
  313. 17:23Tab and select the class for which you
  314. 17:27want to create an instance say for
  315. 17:29example I want to create an instance of
  316. 17:31class course so click on the diamond
  317. 17:34symbol and specify discrete mathematics
  318. 17:37now the instance has been created
  319. 17:39similarly I want to create an instance
  320. 17:41as Joe Smith of type associate professor
  321. 17:45click on associate professor and then
  322. 17:48diamond symbol then specify
  323. 17:51Joe so I have created instance of
  324. 17:54associate
  325. 17:56professor let us connect the disc
  326. 17:58discret mathematics to Joe Smith by
  327. 18:01using the property called is
  328. 18:09by now navigate to course member and
  329. 18:13discrete
  330. 18:15mathematics and click on object property
  331. 18:18assertion specify the name of the object
  332. 18:21property which is nothing but is start
  333. 18:22by and specify the range which is
  334. 18:25nothing but
  335. 18:27Joe so
  336. 18:29we have created an object property is T
  337. 18:32by which connects dm with
  338. 18:35Joe now the entire graph has been
  339. 18:38successfully created using the tool prot
  340. 18:43let us save this graph into any one of
  341. 18:46the synthatic
  342. 18:49style now we can store the graph as an
  343. 18:52XML or trle or any different format
  344. 18:57though the formats are different the
  345. 18:59graph it looks
  346. 19:00similar Let Us store the graph in the
  347. 19:03form of trle specify the graph name I
  348. 19:07mentioned as a course
  349. 19:09here so extension of this graph is O WL
  350. 19:14that is web onology language Let Us open
  351. 19:17this file using visual studio
  352. 19:23code now what you see here is set of
  353. 19:27triples the entire f file is set of
  354. 19:29triples so for example involves object
  355. 19:34property okay domain is having a course
  356. 19:38now whatever the triples which we have
  357. 19:40created manually here the same set of
  358. 19:43triples has been
  359. 19:44created using the tool called
  360. 19:47prot The Tool successfully converts the
  361. 19:51graph as shown in the image to
  362. 19:53corresponding
  363. 19:56code after success converting the graph
  364. 20:00into corresponding code that is course.
  365. 20:04file let us load that all file into a
  366. 20:08graph DB what you see here is an
  367. 20:11interface of graph DB
  368. 20:14database now if you want to load an ow
  369. 20:18file which you created then you have to
  370. 20:20create a new
  371. 20:22repository specify name of an
  372. 20:25repository and create a repository
  373. 20:29moment you create a repository now you
  374. 20:32can see there is a small symbol called
  375. 20:34connect repository click on the connect
  376. 20:36repository so that the repository become
  377. 20:39active now whatever the owl file which
  378. 20:42you created you can import the owl file
  379. 20:46using upload rdf
  380. 20:49file once you successfully import the
  381. 20:52owl file into this graph DB environment
  382. 20:56now you can operate with the code from
  383. 21:00the graph
  384. 21:02DB now if you want to see what the
  385. 21:06exactly the graph which is loaded from
  386. 21:08the course. file you can click on graph
  387. 21:13overview and you can see what are all
  388. 21:16the triples has been loaded from the co.
  389. 21:20all to the graph environment let us
  390. 21:22click on the academic staff member and
  391. 21:25visual graph you can visually interact
  392. 21:28with this graph now the color code
  393. 21:31represents different resources in the
  394. 21:34graph so so for example here the DM and
  395. 21:38Joe are individuals in the graph just
  396. 21:41click on the Arrow Mark you you'll get
  397. 21:44the corresponding type information
  398. 21:46property information class information
  399. 21:49okay all this information whatever you
  400. 21:52created as part of the course. you can
  401. 21:55visually interact this is one advantage
  402. 21:58of this
  403. 21:59tool once you created and loaded a graph
  404. 22:03into this
  405. 22:04environment you can write a simple
  406. 22:07sparql queries which is much similar to
  407. 22:10SQL queries to get information from this
  408. 22:16graph now what you see in the screen is
  409. 22:19an example sparkel query which is
  410. 22:22equivalent to select star from a table
  411. 22:25name the select star from table name
  412. 22:27retrives all the tuples from the table
  413. 22:32similarly this particular quy consist of
  414. 22:35a pattern the pattern is of the form
  415. 22:40question mark s question mark p and
  416. 22:42question mark o what are these question
  417. 22:45mark S P stands for all are variables so
  418. 22:51s p are selected randomly and can be
  419. 22:55used your own variables as well so so
  420. 22:58what happens here the graph tried to
  421. 23:01match the corresponding patterns from
  422. 23:04the existing code so if you look at this
  423. 23:07the discrete mathematics is taught by
  424. 23:09Joe where the discrete mathematic can be
  425. 23:11an example of question mark s is taught
  426. 23:14by can be considered as question mark p
  427. 23:17and Joe Smith can be question mark o
  428. 23:19these triple patterns will be matched
  429. 23:21against all the throughout the graph so
  430. 23:25you can see there are so many triples
  431. 23:27can be matched from the existing graph
  432. 23:30all these triples matched against this
  433. 23:33particular pattern will be the result
  434. 23:35but we prefer only the random 10 results
  435. 23:39from the spark W query so these 10
  436. 23:42results will be displayed in the screen
  437. 23:45now let us replace the property question
  438. 23:48mark p by rdf type now we have changed
  439. 23:52the pattern into question mark s that is
  440. 23:54variable rdf type and question mark o so
  441. 23:58subject and object can be anything but
  442. 24:02we are very particular about the
  443. 24:04property rdf type so the result carries
  444. 24:08only two columns that is question mark s
  445. 24:11and question mark o these two resources
  446. 24:14that is subject and object connected by
  447. 24:17a property rdf type will be wred as a
  448. 24:21result we can
  449. 24:23further uh extend this particular
  450. 24:26pattern like the same query is extended
  451. 24:30as the question mark o is rdf type will
  452. 24:33be all class so it means that it's like
  453. 24:36an
  454. 24:37uncondition I want to have a statements
  455. 24:41with question mark s and question mark o
  456. 24:44connected by rdf type as well as the
  457. 24:47question mark W type must be an owl
  458. 24:50class the corresponding pattern will be
  459. 24:53matched against the graph the results
  460. 24:56will be written according to the pattern
  461. 24:59match now let us discuss how do we
  462. 25:02restrict our pattern for a specific
  463. 25:06subject I have taken a a complete URI of
  464. 25:10a subject course and mentioned as a
  465. 25:15subject followed by two variables it
  466. 25:17means that I need to find a pattern with
  467. 25:21a subject as course and object and um
  468. 25:26predicate can be anything so when
  469. 25:28whenever this particular pattern has
  470. 25:29been matched in the graph the
  471. 25:31corresponding set of pup will be
  472. 25:33returned now just to change I want to
  473. 25:36keep the course in the object part
  474. 25:39rather than the subject part so whenever
  475. 25:41you change that okay any subject
  476. 25:44followed by any predicate and followed
  477. 25:47by the object as in course will be
  478. 25:50returned as
  479. 25:53result the owl file loaded as part of
  480. 25:56graph DB can also been accessed from any
  481. 26:00of the higher level programming language
  482. 26:01so for example you can access this graph
  483. 26:04DB from python from java from nodejs any
  484. 26:07programming languages so the server
  485. 26:10programs written on any of these
  486. 26:11languages can interact with the graph TB
  487. 26:14and you can retry whatever the results
  488. 26:16it needs so for example as part of this
  489. 26:19particular uh presentation we have some
  490. 26:23two demo programs written in
  491. 26:25Python where we have three variables uh
  492. 26:29the Python program consists of three
  493. 26:31variables uh these three variables are
  494. 26:35loaded with the parameters retrived from
  495. 26:37the graph
  496. 26:39TV the parameters include query endpoint
  497. 26:42address header or copied from the graph
  498. 26:47DBS interface so for example the query
  499. 26:49can be any query which we discussed
  500. 26:50earlier in addition to that the endpoint
  501. 26:53address which can be obtained from graph
  502. 26:56TB as well as the accepted head retrive
  503. 26:59so all this information will be passed
  504. 27:01as an request from the application
  505. 27:03program to retrive necessary information
  506. 27:06from the graph DB the graph DB Returns
  507. 27:10the result in the form of a Json object
  508. 27:12so the Json object will be further
  509. 27:15passed to get the necessary results from
  510. 27:18the graph DB from the application uh
  511. 27:21program point of view from the
  512. 27:23literature point of view there are few
  513. 27:25terminologies has been used
  514. 27:27interchangeably such as semantic web
  515. 27:30Knowledge
  516. 27:31Graph so whenever we have a data in the
  517. 27:34form of a semantic web or a Knowledge
  518. 27:36Graph how do we store the data for
  519. 27:39storing the data we use graph TB what
  520. 27:43are the applications of these
  521. 27:45areas we can assume applications of
  522. 27:48either Knowledge Graph or semantic web
  523. 27:52or graph DB if there is a complex on the
  524. 27:55interconnected data then the best way to
  525. 27:59represent is Knowledge Graph based
  526. 28:01things highlighted in this particular
  527. 28:03screen so we have used Knowledge Graph
  528. 28:06for representing food related domain
  529. 28:09building information model
  530. 28:12iot and uh computer security
  531. 28:14recommendation system natural language
  532. 28:17processing building
  533. 28:19ontology so these domains are not
  534. 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.