.NET Framework Bookmark and Share   
 index > Microsoft Codename 'Oslo' > Utilizing the tree view in Quadrant, what tree structures can i use?
 

Utilizing the tree view in Quadrant, what tree structures can i use?

Hi there,

We need a tree view for our project. Can i specify tree types (such as nested set tree or recursive tree) with mSchema?

There is sort of a tree built with folders in Microsoft.Samples.Organization
-> People, IT Specialist, Silverman, Computers, HQ-PROD1
-> People, business analyst, akers, events, planning meeting II

This hierarchy is nice, i'm trying to find how this works.

But that is not my question; today i want to specify a hierarcy with self references. My best approach is to define this
hierarchy outside of the stored data; so there can be N hierarchies without affecting the structure of the type.

A simple recursive tree is declared like this:
    type treestructureImplementation {
        number : Integer32;
        // store a reference to another extent / type
        parent : treestructureImplementation where value in treestructure;
    } where identity(number);
    
    treestructure : treestructureImplementation*;
But does it show up in quadrant? Does it also have meaningful names (from the referred extent)? Are these types of structures already understood?

I will find out for myself, of course i can. But it's nice to have some input over this; my guess is that already more people came across this problem.


Performing my Final Project, looking into codename "Oslo".
Elger [Centric]
I think giving it a try is the best thing you can do at present. I haven't really seen any discussion about this kind of thing, either internally or externally.

Generally speaking, "Quadrant" is agnostic where "M" is concerned. That is, "Quadrant" is looking at the structures in the database, whether they got there via "M" or not. You could just as easily create tables and relationships in SQL Server Management Studio and "Quadrant" will see them.

In theory, then, "Quadrant" should be able to handle anything that "M" allows you to express. If it doesn't, then the deficiency should be filed as a bug through the Connect site. Whether it has meaningful names depends on what "Quadrant" chooses as a default, but that can always be customized.

Like I said, try it and see--

.Kraig
Kraig Brockschmidt
I think giving it a try is the best thing you can do at present. I haven't really seen any discussion about this kind of thing, either internally or externally.

Generally speaking, "Quadrant" is agnostic where "M" is concerned. That is, "Quadrant" is looking at the structures in the database, whether they got there via "M" or not. You could just as easily create tables and relationships in SQL Server Management Studio and "Quadrant" will see them.

In theory, then, "Quadrant" should be able to handle anything that "M" allows you to express. If it doesn't, then the deficiency should be filed as a bug through the Connect site. Whether it has meaningful names depends on what "Quadrant" chooses as a default, but that can always be customized.

Like I said, try it and see--

.Kraig
Kraig Brockschmidt
HI Elger--just wanted to follow up to report that our devs worked through various scenarios with hierarchical data and found that it works fine with pre-populated tables but that there were a few glitches with empty ones when trying to add/commit data. Those are important bugs to fix.

The code used for the test looked like this:

module Foo

{

TreeStructures : {TreeStructure*};

type TreeStructure

{

Number : Integer32;

// store a reference to another extent / type

Parent : TreeStructures?;

} where identity(Number);

}

The problem actually comes from Number being an Integer32 but marked as identity which means that inserting a new record attempts to auto-populate with a Guid. That bug will be addressed, of course, but in the meantime, changing the type of Number above to Guid works fine.

Thanks again for your question--as you can see, it stimulated some fruitful research!

.Kraig

Kraig Brockschmidt

You can use google to search for other answers

Custom Search

More Threads

• Usage scenarios for computed values
• Keyword field in M Grammar
• Welcome to the Microsoft Codename "Oslo" Forum
• IntelliPad Projects?
• "M Compiler Visual studio Integration cannot be installed ..."
• DynamicParser.LoadFromMgx fails silently?
• Questions about new CTP
• Is there any Antlr ---> MGrammar translator around?
• Oslo May 2009 CTP Quadrant documentation in Error on usage of MX.exe
• GraphBuilder internal inner types