Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Domains Expand / Collapse
Author
Message
Posted Sunday, December 2, 2007 11:49 AM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
Comments posted to this topic are about the item Domains
Post #428498
Posted Monday, December 3, 2007 1:32 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:59 AM
Points: 5,930, Visits: 8,181
<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
Posted Tuesday, December 4, 2007 7:54 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, October 7, 2013 11:35 AM
Points: 1, Visits: 27
TinyInt has values 0 - 255 not 0 - 127 !
Post #429315
Posted Tuesday, December 4, 2007 8:08 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 5:09 PM
Points: 23,089, Visits: 31,635
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
Posted Tuesday, December 4, 2007 11:18 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, January 12, 2011 12:35 PM
Points: 24, 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
Posted Tuesday, December 4, 2007 2:12 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 5:09 PM
Points: 23,089, Visits: 31,635
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 »

Add to briefcase

Permissions Expand / Collapse