Solved

Maintain Strict Domain Integrity

Posted on 2010-11-30
2
462 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article describes some very basic things about SQL Server filegroups.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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…

708 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

13 Experts available now in Live!

Get 1:1 Help Now