Solved

Database Expert - "ENFORCE FROM", "ENFORCE TO", etc.

Posted on 2006-06-13
9
476 Views
Last Modified: 2012-06-21
Could someone explain to me how the different enforce options work and how they affect data between tables?   I'm a little lost on the relationship.
0
Comment
Question by:trs28
  • 3
  • 3
9 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 16895399
Here's a very generic description, but the implementation of this really depends on the specific database you're working with.

Enforced From:
When you select this option, if the "to" table for the link is used, the link is enforced. For example, if you create a link from Table A to Table B using Enforce From and select only a field from Table B, the Select statement will still include the join to Table A because it is enforced. Conversely, selecting only from Table A with the same join condition will not cause the join to Table B to be enforced.

Enforced To:
When you select this option, if the "from" table for the link is used, the link is enforced. For example, if you create a link from Table A to Table B using Enforce To and select only a field from Table A, the join to Table B will be enforced, and the Select statement that is generated will include both tables.

frodoman
0
 

Author Comment

by:trs28
ID: 16895556
well, i've read that ... but i'm looking more for a "real life" example where enforcing might be beneficial to use rather than just the general description.   thanks though!
0
 
LVL 42

Expert Comment

by:frodoman
ID: 16896157
Real life example:  Say you have a table containing employees and another table containing job descriptions.  You'll want to enforce links if you wanted a list of job descriptions that have matching employees.  You won't enforce links if you want a list of all job descriptions, whether or not you have any employees with that job.

That's a highly simplified example but it should illustrate the point somewhat.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 16

Expert Comment

by:wykabryan
ID: 16896264
Are you using Business view in BOE?
0
 

Author Comment

by:trs28
ID: 16896396
wykabryan -
     I'm using Crystal Reports XI Developer to do internal and application reporting.  

frodoman -
     I see where you're going with that, but couldn't you accomplish the same thing with an inner join?  Elaborate on that a bit if you    
     wouldn't mind.  Here's where I'm going with that... For example, tell me how you'd setup your two tables (i.e. the way you'd
     connect them & on what fields, which way you enforce a link, etc.).  If you could do that, and then tie that back to why you
     enforced a like and what it will do for you (relating to your scenerio above), that'd be damn wonderful!   Thanks!


(by the way, i bumped the points up a little for ya)
0
 
LVL 42

Accepted Solution

by:
frodoman earned 175 total points
ID: 16897632
trs28,

Yes, you could accomplish the same thing with an inner join or outer join.  My understanding (and I'm not a DBA so this isn't my best topic of discussion) is that 'enforce from' and 'enforce to' basically are the equivalent of joins.  

Maybe if you can explain where you are seeing this used it would help?  Where I've seen it, is a case where relationships between tables are pre-defined but you're pulling a query that may or may not use the defined relationship (enforce both = inner join, enforce from / to = outer join left / right).

frodoman
0
 

Author Comment

by:trs28
ID: 16906974
Well I've noticed the option when I've connected tables when doing a new report in crystal.  I'm doing a report now that has me connecting custom datasets with more custom datasets to views ... it's a mess, but it's the best way to do what I'm accomplishing ...and I'm having trouble getting some of the data to appear ... so I figured, "hey, why not ask on experts exchange and see what everyone has to say"
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Crystal Report fractions 4 68
Crystal Reports remove alpha characters only 5 46
Crystal Reports 11 Multiple Parameters on same field 9 50
Need to learn crystal reports 7 56
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now