erichar11 wrote:
Just started playing with the multiple catalog support in llblgenPro. I created a project which contains two catalogs contained within sqlserver. I have access to tables (entities) in both catalogs, however I'm trying to understand how I can create a relationship between a table in catalog A with a table in catalog B. I've read the docs re: add custom relations but I'm still a little confused.
- If I want to create a relationship between entities in two catalogs, is the only way to achieve this through the designer and create custom relationships?
Yes, because sqlserver doesn't allow fk constraints cross catalog borders.
- If I have the following tables
Catalog A - Table1
UserId - UniqueIdentifier
UserName - varchar
Catalog B - Table2
ProductId - UniqueIdentifier
ProductName - varchar
In the designer for adding custom relationships between the Table1 in catalog A and Table2 in catalog B, only foreign key field name of productId exists (I believe this is by design). So my question is should I modify the db schema for Table2 and add a field called userId (same type as the PK) in order to create the relationship between the two tables? Or is there a way to do this in the designer without modifying the catalog B schema?
Which fields do you want to relate to eachother? Only fields with the same type can be related.
- Is there any best practices for using multiple catalog support. Looking for guidance on how to implement multiple catalog support.
If possible, use 1 catalog, as you in some form, lose referential integrity. Most situations which use multiple catalogs use one catalog which is readonly and one which is writable. You can also use schemas in 1 catalog, which can be simpler as everything is in 1 catalog.