0% found this document useful (0 votes)
14 views

Identifying Data Types2

Uploaded by

priyaroy111625
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Identifying Data Types2

Uploaded by

priyaroy111625
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

SQL Server Configuration Manager

SQL Server Configuration Manager helps the database administrators to manage


the services associated with SQL Server. These services include SQL Server
Agent, SQL Server Analysis Services, SQL Server Reporting Services, SQL
Server Integration Services, and SQL Server Browser service. Administrators can
start, pause, resume, or stop these services by using this tool.

In addition, it allows you to configure certain properties, such as server alias,


network protocols, and connection parameters. In addition, the tool allows you to
manage the network connectivity configuration from the SQL Server client
computers. It allows you to specify the protocols through which the client
computers can connect to the server.

Identifying Data Types

Data type represents the type of data that a database object can contain. This
data can be in the form of characters or numbers. You can store the following
types of data in a database:

 Structured data: Is the data that has definite structure. It


follows a defined format and has a predefined length, such as
string or numeric data. The structured data can be easily stored
in a table. For example, the roll number of a student is a numeric
value and can be easily stored in the RollNo column of the
Student table. In addition, you can store the spatial data, such as
geographical data with longitude and latitude, and geometrical
data with coordinates.
 Semi-structured data: Is the data that has an indefinite
structure and cannot be easily stored in a database table. The
attributes of semi-structured data can change. For example, the
details of the customers contain various attributes, such as
customer ID and customer name. These attributes change for
every customer. Semi-structured data is generally stored in the
XML format.

 Unstructured data: Is the data that does not have a defined


structure. It does not necessarily follow any format or sequence.
In addition, it does not follow any rule and is not predictable. For
example, text files, image files, streaming videos, and sound clips
represent unstructured data. Depending upon the type of data to
be stored, SQL Server supports the various data types. These
data types can be associated with the columns, local variables, or
expressions defined in the database. You need to specify the
data type of a column according to the data to be stored in the
column. For example, you can specify the character data type to
store the employee name, date data type to store the hire date
of employees. Similarly, you can specify money data type to store
the salary of the employees.

The data types supported in SQL Server can be organized into the
following categories:

 Numeric
 Character string
 Date and time
 Binary
 Others
Numeric

The numeric data types allow you to store integer values in the
database. The following table lists the numeric data types supported
by SQL Server.

Character and String

The character and string data types allow you to store text values in
the database. The following table lists the character and string data
types supported by SQL Server.
The preceding table lists various data types, such as char, varchar,
nchar, and nvarchar, which are used for storing character data.
However, you must know the difference in using these data types. The
following list describes the differences between these data types:

 char:It is used to store fixed length character data in a variable.


For example, you declare a variable of char data type with 50
character size. This declaration reserves the memory space required
to store 50 characters in that variable. If you store 10 characters in
that variable, then the remaining 40 character memory space will be
wasted.

 varchar: It is used to store variable length character data in a


variable. It does not reserve the memory space at the time of variable
declaration. Instead, it allocates memory as per the size of the data
stored in the variable. For example, you declare a variable of varchar
data type with 100 character size. Now, you store a word containing
50 characters in that variable. In this case, the system will allocate
memory space required to store 50 characters only. The space for the
rest 50 characters that can be stored in the variable will be freed.
This way, there is no memory loss. It stores only non unicode
characters.

 nvarchar: It allocates memory similar to the varchar data type.


However, it stores only unicode characters. It requires twice the
storage space as required by varchar.

 nchar: It supports fixed-length unicode data with the maximum


length of 4000 characters. It requires twice as much storage space as
required by the char data type.
Note :- Unicode is an industry wide computing standard for representing characters. It provides
unique number to every character so that these characters are represented in the same way across
different platforms and languages.

Date and Time


The date and time data types allow you to store date and time values in
the database. The following table lists the date and time data types
supported by SQL Server.
Binary
The binary data types allow you to store binary data in the database. The following
table lists the binary data types supported by SQL Server.

The Binary Data Types


Others
The other data types allow you to store unique identifiers, cursors, table, XML, and
spatial data in the database. The following table lists the other data types
supported by SQL Server.

You might also like