Author Topic: How hal stores information  (Read 7067 times)

nalkari

  • Newbie
  • *
  • Posts: 16
    • View Profile
How hal stores information
« 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?
hello

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
How hal stores information
« Reply #1 on: September 17, 2009, 01:48:18 pm »
Stored? With ones and zeros.

DB Tables. :)
Today Is Yesterdays Future.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
How hal stores information
« Reply #2 on: September 17, 2009, 07:34:58 pm »
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!
« Last Edit: September 17, 2009, 07:39:21 pm by jasondude7116 »
 

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
How hal stores information
« Reply #3 on: September 17, 2009, 07:58:51 pm »
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
Today Is Yesterdays Future.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
How hal stores information
« Reply #4 on: September 18, 2009, 09:13:10 pm »
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
« Last Edit: September 19, 2009, 12:40:52 am by snowman »
Live long and prosper or die trying.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
How hal stores information
« Reply #5 on: September 18, 2009, 11:48:49 pm »
*Shakes head while closing eyes turning head away lauging *

Take a look at -dude's question, again...
Today Is Yesterdays Future.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
How hal stores information
« Reply #6 on: September 18, 2009, 11:50:40 pm »
NM

J.
Today Is Yesterdays Future.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
How hal stores information
« Reply #7 on: September 19, 2009, 12:39:50 am »
[:p]
Live long and prosper or die trying.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
How hal stores information
« Reply #8 on: September 19, 2009, 01:21:37 am »
Snowman,
you should go to the artists den no need to enter it at bottom.. :)


Enjoy,

J.
« Last Edit: September 19, 2009, 01:35:45 am by One »
Today Is Yesterdays Future.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
How hal stores information
« Reply #9 on: September 19, 2009, 01:27:29 am »
She looks like one of my sisters.
Live long and prosper or die trying.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
How hal stores information
« Reply #10 on: September 19, 2009, 02:16:18 am »
The 'section 8' is a nice touch don't you think?
Today Is Yesterdays Future.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
How hal stores information
« Reply #11 on: September 19, 2009, 03:50:47 am »
I prefer section 9 over 8 any day.
Live long and prosper or die trying.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
How hal stores information
« Reply #12 on: September 19, 2009, 10:11:23 pm »
"INCOMING"!! Heh Spam to you? whaddyathink?
Today Is Yesterdays Future.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
How hal stores information
« Reply #13 on: September 20, 2009, 12:32:51 am »
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]
Live long and prosper or die trying.