main logo
Subject: Re: Trying to build a search in a hierarchy
Author: Ruslan Zasukhin
Posted: 2000/10/31 12:59:31
 
View Entire Thread
New Search


on 10/31/00 7:35 PM, Nilton Lessa at nlessa /at/ moleque DOT com.br wrote:

> Hi everybody,
>
> First of all, sorry by my poor English.
>
> I am trying to build a database with 2 Tables;
> 1- Table 1 {name, URL, objectPRT to Table 2}
>
> 2- Table 2{category, desciption, objectPTR to self} , trying to implement
> subcategory, subsubcategory,and so on.
>
> Suppose that I have on Table 2:
> Category A
> Category B points to A (subcategory of A)
> Category C point to B (subcategory of B)
>
> And on Table 1:
> Record1 points to CAtegory C.
>
> I would like to be able to find this record even if I search by Category B
> (its father) or Category A(its grandfather), and so on.
>
> Is it possible to construct a SQL command to do this?
>
> Oh, I will use this database in a site that I am migrating from
> LAsso/FileMAker to WebSiphon/Valentina.
>
> Thanks a lot for any assistance.

Hi Nilton,

1) IF you have only this 3 subcategory then in future you will be able
create 3 BaseObjects which inherit one another.

On the other hand, as I see, all your 3 categories have the same structure,
since you store them in the same table.

Okay what about present time?


2) I think you need add one field:
"Category" as Long, Short or Byte

So records of category A will have value if "Category" = 1,
Records of category B - 2, C - 3.

About exact SQL query I can't say you nothing now.
You need write on paper for self and us:
-- what you have to do search
-- what you want get as result of search.


--
Best regards,
Ruslan Zasukhin

-------------------------
Paradigma.

e-mail: ruslan@paradigmasoft.com
web : http://www.paradigmasoft.com

To subscribe to the Valentina mail list
send a letter to valentina-on /at/ lists DOT macserve.net



-------------------------------------------------------------
The Valentina mailing list is brought to you by MacServe.net
For info on lists services, see http://www.macserve.net/lists.html
 
©2000 Ruslan Zasukhin
<-- Prior Message New Search Next Message -->