Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
JVP, flexibility of databases
Message
 
 
To
21/11/2003 07:44:19
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00851534
Message ID:
00852506
Views:
20
>Hi John,
>
>>I was not making the argument - I was responding to the argument. No question that Fox + DBF's is flexible. The point I made was that .NET + SQL Server can be just as flexible. Put another way - it cannot be demonstrated that .NET + SQL Server is any less flexible than Fox + DBF's.
>
>O.k. You asked for it:
>
>Just imagine a famility tree. Query: Find the oldest ancestor of any given person through the male line:
>
>VFP
>
FUNCTION GetUpperMaleAncestor(nPerson)
>
>DO WHILE SEEK(nPerson,"FamilyTrees","MaleParent")
>   nPerson = FamilyTrees.Person
>ENDDO
>RETURN nPerson
>
>Now retrieve all offspring of this person
>
>
FUNCTION RetrieveOffSpring(nPerson)
>
>CREATE CURSOR offSpring (Person I)
>SELECT FamilyTrees
>SET ORDER TO TAG MaleParent
>
>DO GetOffSpring(nPerson)
>
>SELECT * FROM FamilyTrees WHERE EXIST (SELECT Person FROM OffSpring) INTO CURSOR Result
>RETURN
>
>*-
>
>FUNCTION GetOffSpring(nPerson)
>LOCAL nRec
>
>nRec=RECNO()
>SEEK nPerson
>DO WHILE !EOF() AND MaleParent = nPerson
>    INSERT INTO Offspring (Person)
>    DO GetOffSpring (Person)
>    SKIP
>ENDDO
>GO nRec
>RETURN
>
>
>O.K. Your turn to write the SQL example and the ADO.NET implementation (Good luck).
>

I don't have a lot of time to deal with this now - but consider this. What you have written above can easily be replicated in T-SQL. That said, I would write a stored proc - and call it in ADO. Big deal....


>
Fact is that SQL DML is terrible in solving hierarchical problems. This is one area where record oriented DMLs like xBase excell and indeed have an advantage over a SQL implementation.
>

What are you talking about. I can declare a cursor in SQL - and loop through the results row by row.

What you state here is not supported by the facts. I suggest you check out and learn what can be done in T-SQL.

For one thing - T-SQL supports the full ambit of SQL - unike Fox. Be careful about he challenges you lay out - just as you did here. With little effort - they can be met.

< JVP >
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform