Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss Content Posted by Unknown Unknown
»
Domains
Domains
Rate Topic
Display Mode
Topic Options
Author
Message
Site Owners
Site Owners
Posted Sunday, December 02, 2007 11:49 AM
SSChampion
Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,040,
Visits: 1
Comments posted to this topic are about the item
Domains
Post #428498
Hugo Kornelis
Hugo Kornelis
Posted Monday, December 03, 2007 1:32 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 5:06 AM
Points: 5,235,
Visits: 7,041
<nitpicking>
Especially in a question in the design and theory category, I'd prefer the answer to use the proper term "attribute" or "column" rather than "field".
</nitpicking>
Otherwise, a good question. I never before realized that the term domain is overloaded like that (though I think I always intinctively chose the right understanding).
Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog:
http://sqlblog.com/blogs/hugo_kornelis
Post #428610
vxxSQL
vxxSQL
Posted Tuesday, December 04, 2007 7:54 AM
Forum Newbie
Group: General Forum Members
Last Login: Monday, February 28, 2011 1:07 PM
Points: 1,
Visits: 25
TinyInt has values 0 - 255 not 0 - 127 !
Post #429315
Lynn Pettis
Lynn Pettis
Posted Tuesday, December 04, 2007 8:08 AM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 11:30 AM
Points: 21,606,
Visits: 27,436
True, a tinyint can hold a value between 0 and 255, but the DOMAIN of a specific column defined as a tinyint may be 0 to 127. You can use a constraint to disallow values above 127.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #429332
Izak Joubert
Izak Joubert
Posted Tuesday, December 04, 2007 11:18 AM
Grasshopper
Group: General Forum Members
Last Login: Wednesday, January 12, 2011 12:35 PM
Points: 22,
Visits: 22
A "domain" in database design is much more than just the data range. It is the collective meta-data description of a data object, including attributes such as its data type, length, values, constraints and business rules. SQL server may not fully implement meta-data domains, but explaining a domain as simply a range of values, is a little misleading.
Regards,
Izak Joubert
Post #429474
Lynn Pettis
Lynn Pettis
Posted Tuesday, December 04, 2007 2:12 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 11:30 AM
Points: 21,606,
Visits: 27,436
True, true, but to say that a tinyint holds values between 0 and 255 not 0 and 127 is also misleading in the context of the question. The given data range in the question establishes part of the domain, in which a tinyint is good chioce for holding those values.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #429532
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.