Some Questions 1) inheritance in DB Model; 2) Many to Many Relationships


Author
Message
Geoffrey Goldberg
Geoffrey Goldberg
StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)
Group: Forum Members
Posts: 5, Visits: 14
Hey there...Strataframe looks REALLY cool.  I am seriously considering using it on a project that i am working on, however, i have some concerns.  Most specifically, those concerns relate to complicated, ie. highly normalized, data models.

Of particular concern are the following:

1) Is the Business Object mapper designed to recognize and implement a class/BO that consists of say 2 or 3 tables sharing a primary key with a discriminator?  For example Contact --> Employee--> Manager.  In other words does it support subtyping in the DB model out of the box? (and i dont mean can it be forced to work somehow Tongue)

2) My data model is also pretty normalized.  For example, given a Contact Table(person, or organization), a ContactInfo table(phone number, postal address, or eaddress), and a ContactInfoAlias(home phone, work email, etc.) with a link table between Contact and ContactInfo that also has a foreign key reference to the ContactInfoAlias (with the intent being to assign contactinfo rows to contacts and give them a nice name) does Strataframe seem like the right tool for the job?  I have done some searching of these forums and had seen mention of something called a linkmanager (i think) - which handles many to many relationships.  Can someone explain those a little bit, how they are used and their intended purpose within the framework?

In addition to handling contact info with link tables, many other things in the data model are implemented this way, for example Party Roles, relationships between those roles, etc... it gets a little hairy.  Would this be a problem for the BO mapper?

Finally, what kind of projects would you say are not a good match for Strataframe (be honest)?

Thanks alot! BigGrin

Geoff

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I'll let some of our users give you their ideas, but with a type/subtype model, in SF, it is generally accomplished by creating a view that joins the appropriate tables on their surrogate keys.  Then, the BOMapper maps a business object to that view, and you create insert, update and delete stored procedures to allow the business object to be updatable (the procedures update the appropriate tables on the backend). 

As for the business objects and the BusinessLayerLinkManager, business objects can only have one relationship, but a business object can belong to several link managers, so you should be able to effectively map as many relationships as you need.

Geoffrey Goldberg
Geoffrey Goldberg
StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)
Group: Forum Members
Posts: 5, Visits: 14
Thanks for the quick reply....Can you please elaborate on the businesslayerlinkmanager, how and why it is used and what the intended result is?  And possibly how it would apply to these 4 tables:

Contact

ContactInfo

ContactInfoAlias

ContactContactInfoLink(ContactID,ContactInfoID,ContactInfoAliasID)

Tnks again!

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
The BusinessLayerLinkManager allows 3 business objects to be linked together, one of which is a link table (or a table of foreign keys).  You can populate one business object and the link manager will automatically load the other two (assuming you have the auto-Fill properties turned on...which by default they are).

For example, one of our users had this scenario this morning.  He had a Group table, Organization Table, and a link table named GroupOrganization.  So the Link Manager properties look somthing like this:

In this example the foreign and primary keys are defined as well..so when the GroupBO1 table is filled, it will automatically fill the Link OrganizationBO1 and GroupOrganizationBO1 tables.  This control gives you a lot of control when dealing with very normalized data structures since most times you are dealing with a foreign key of some sort.  Just so you can get a visual, below is another image showing the controls dropped on the form:

The properties show above are from the BusinessLayerLinkManager1 control in this image.

Geoffrey Goldberg
Geoffrey Goldberg
StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)
Group: Forum Members
Posts: 5, Visits: 14
Thanks for the explanation and Fancy screenshots...i dig those "tear effects" Hehe

It seems lke the linkmanager would work great in a simple link table with 2 foreign keys..but in my case the ContactContactInfoLink actually has a reference to another table as well, the ContactInfoAlias table...is all lost?  It seems to me that this would be pretty common scenario - where not only are you creating a many to many relationship, but describing that relationship in some (normalized) way.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
but in my case the ContactContactInfoLink actually has a reference to another table as well, the ContactInfoAlias table...is all lost? 

Not at all...just create another LinkManager class.  They can "piggy-back" each other so to speak.  When one is loaded it will create a ripple effect.  So you can basicallly go as deep as you want.

Geoffrey Goldberg
Geoffrey Goldberg
StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)
Group: Forum Members
Posts: 5, Visits: 14
I think i understand...probably need to sleep on it..thanks guys for your quick and helpful responses.
Chris Crabtree
Chris Crabtree
StrataFrame User (157 reputation)StrataFrame User (157 reputation)StrataFrame User (157 reputation)StrataFrame User (157 reputation)StrataFrame User (157 reputation)StrataFrame User (157 reputation)StrataFrame User (157 reputation)StrataFrame User (157 reputation)StrataFrame User (157 reputation)
Group: Forum Members
Posts: 57, Visits: 107
I'll chime in on subtyping. That was also basically my first question about StrataFrame, and I brought it up during the September training class.

The team discussed options, took input from a couple of other customers in the class, and later that month they posted support for updateable views (using 'instead of' triggers), which was what we had recommended as the most maintainable solution.

Now, they posted it, but I have not been able to get back to my original project that required it, so I can't tell you with 100% certainty that all is working, but I am 90% sure based on what is in the UI and simply the fact that MicroFour is telling us that it works.Smile

Geoffrey Goldberg
Geoffrey Goldberg
StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)
Group: Forum Members
Posts: 5, Visits: 14
Thanks for chiming in Chris!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search