Solved

Maintain Strict Domain Integrity

Posted on 2010-11-30
2
482 Views
Last Modified: 2012-05-10
I'm curious to see if anyone can suggest a good way to maintain good domain integrity on sql server that will stop or warn user's if they try to join incompatible fields with the same data types.
For example
Select ORDER_ID, CUSTOMER_ID
FROM ORDERS o
INNER JOIN CUSTOMERS c
ON o.ORDER_ID = c.Customer_ID

This query clearly doesn't make sense as orders are not customers but SQL server will allow it if the data types are the same. Hence is there a good way to warn or prevent users from doing such queries?
0
Comment
Question by:geoffcoles
  • 2
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 34239108
no way to block such incorrect "joins" from sql server.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34239118
of course, good training will help to avoid :)
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Read about achieving the basic levels of HRIS security in the workplace.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

773 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