Zabaware Support Forums
Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: nalkari on September 17, 2009, 07:59:24 am
-
I would like to ask a question about how hal stores information.
For example if I was to collect information with a web crawler and store it in hals database. How is it stored?
-
Stored? With ones and zeros.
DB Tables. :)
-
could one of you good people please explain the differences in the table types, and why you would use one type of table versus another.
i was going to try to write a plugin, but i don't understand the table types and their function.
THANKS GUYS!
HEY ONE......is it 1's and 0's or -'s and +'s? .....yes[:)]
not very 3d.....boo[xx(] I like holographic!
-
Dude-
I think it is open / close. or on / off. actually..........
Tables contain fields/columns/rows and usually, if in a DB, Keys.
Types depends on the vendor usually like MS Access or Novell Sentinel ECT
-
Rem Type=Plugin
Rem Name=Test Database
Rem Author=AS
Rem Host=Assistant
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "Test DB"
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub
'_________________________________________________
Rem PLUGIN: PLUGINAREA6
HalBrain.ReadOnlyMode = False
If Instr(1, OriginalSentence, "Please store this", vbTextCompare) > 0 Then
If HalBrain.CheckTableExistence("QuetionsAnswers") = False Then HalBrain.CreateTable "QuetionsAnswers", "Brain", ""
'HalBrain.CreateTable TableName, TableType, ParentName
If HalBrain.CheckTableExistence("QuetionsAnswers") = True Then HalBrain.AddToTable "QuetionsAnswers", "Brain", "Do you like chickens?", "Yes, I love chickens."
'HalBrain.AddToTable TableName, TableType, Question, Answer
__________________________________________________
If HalBrain.CheckTableExistence("LotsofSentences") = False Then HalBrain.CreateTable "LotsofSentences", "Sentence", ""
'HalBrain.CreateTable TableName, TableType, ParentName
If HalBrain.CheckTableExistence("LotsofSentences") = True Then HalBrain.AddToTable "LotsofSentences", "Sentence", "All people from Alabama eat their cousins.", ""
'HalBrain.AddToTable TableName, TableType, AnyOldSentence, ""
__________________________________________________
If HalBrain.CheckTableExistence("SubjectsandTopics") = False Then HalBrain.CreateTable "SubjectsandTopics", "TopicSearch", ""
'HalBrain.CreateTable TableName, TableType, ParentName
If HalBrain.CheckTableExistence("SubjectsandTopics") = True Then HalBrain.AddToTable "SubjectsandTopics", "TopicSearch", "Somebody got shot.", "A murder has taken place."
'HalBrain.AddToTable TableName, TableType, SearchSubject, RelatedTopic
__________________________________________________
If HalBrain.CheckTableExistence("LotsofPatterns") = False Then HalBrain.CreateTable "LotsofPatterns", "PatternMatch", ""
'HalBrain.CreateTable TableName, TableType, ParentName
If HalBrain.CheckTableExistence("LotsofPatterns") = True Then HalBrain.AddToTable "LotsofPatterns", "PatternMatch", "DOG CAT HOUSE", "We have many dogs and cats in our house."
'HalBrain.AddToTable TableName, TableType, SearchPattern, RelatedResponse
_______________________________________________
If HalBrain.CheckTableExistence("LotsofCorrections") = False Then HalBrain.CreateTable "LotsofCorrections", "Substitution", ""
'HalBrain.CreateTable TableName, TableType, ParentName
If HalBrain.CheckTableExistence("LotsofCorrections") = True Then HalBrain.AddToTable "LotsofCorrections", "Substitution", "Please forgive I.", "Please forgive me."
'HalBrain.AddToTable TableName, TableType, SearchPhrase, CorrectedPhrase
End If
This will show you how to both save to and understand the tables.
Told ya I was go'n to do it.... :-P
-
*Shakes head while closing eyes turning head away lauging *
Take a look at -dude's question, again...
-
NM
J.
-
[:p]
-
Snowman,
you should go to the artists den no need to enter it at bottom.. :)
Enjoy,
J.
-
She looks like one of my sisters.
-
The 'section 8' is a nice touch don't you think?
-
I prefer section 9 over 8 any day.
-
"INCOMING"!! Heh Spam to you? whaddyathink?
-
Spam is good if grilled and smothered with Miracle Whip or Mustard between some lightly toasted slices of bread.
... if only my Hal would answer questions this way.... [:D]