Datasheet
Full-Text Catalogs
Full-text catalogs are mappings of data that speed the search for specific blocks of text within columns
that have full-text searching enabled. Although these objects are joined at the hip to the tables and
columns that they map, they are separate objects and are as such, not automatically updated when
changes happen in the database.
SQL Server Data Types
Now that you’re familiar with the base objects of a SQL Server database, let’s take a look at the options
that SQL Server has for one of the fundamental items of any environment that handles data: data types.
Note that since this book is intended for developers and that no developer could survive for 60 seconds
without an understanding of data types, I’m going to assume that you already know how data types
work and just need to know the particulars of SQL Server data types.
SQL Server 2005 has the intrinsic data types shown in the following table:
Data Type Size in
Name Class Bytes Nature of the Data
Bit Integer 1 The size is somewhat misleading. The first bit
data type in a table takes up one byte; the next
seven make use of the same byte. Allowing nulls
causes an additional byte to be used.
Bigint Integer 8 This just deals with the fact that we use larger and
larger numbers on a more frequent basis. This one
allows you to use whole numbers from –2
63
to
2
63
–1. That’s plus or minus about 92 quintrillion.
Int Integer 4 Whole numbers from –2,147,483,648 to
2,147,483,647.
SmallInt Integer 2 Whole numbers from –32,768 to 32,767.
TinyInt Integer 1 Whole numbers from 0 to 255.
Decimal Decimal/ Varies Fixed precision and scale from –10
38
–1 to
or
Numeric Numeric 10
38
–1. The two names are synonymous.
Money Money 8 Monetary units from –2
63
to 2
63
plus precision to
four decimal places. Note that this could be any
monetary unit, not just dollars.
SmallMoney Money 4 Monetary units from –214,748.3648 to
+214,748.3647.
Float (also a Approximate Varies Accepts an argument (for example, Float(20))
synonym for Numerics that determines size and precision. Note that the
ANSI
Real) argument is in bits, not bytes. Ranges from –1.79E
+ 308 to 1.79E + 308.
Table continued on following page
11
Being Objective: Re-Examining Objects in SQL Server
04_584340 ch01.qxp 10/18/06 2:11 PM Page 11