0% found this document useful (0 votes)
2K views

SQL - Tamil

SQL is a language used to manage data in relational database management systems (RDBMS). Some common RDBMS include MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access. In an RDBMS, tables are used to organize data into rows and columns. Each table contains multiple columns to store related data. The data type of each column determines what type of data it can store such as text, numbers, dates etc. This allows structured querying of the data.

Uploaded by

ராஜா MVS
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

SQL - Tamil

SQL is a language used to manage data in relational database management systems (RDBMS). Some common RDBMS include MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access. In an RDBMS, tables are used to organize data into rows and columns. Each table contains multiple columns to store related data. The data type of each column determines what type of data it can store such as text, numbers, dates etc. This allows structured querying of the data.

Uploaded by

ராஜா MVS
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

SQL in Tamil

SQL ?
Structured Query Language
SQL ?
Database ,
,
,
SQL .
Database / SQL .
Query , , .

Database .
Database?

,
?
.
- Information, Information is Wealth .
. .
.
Table .
, .
, . ?
.
?
.
, Field Column .
.

String / Character / Variable character .


month-date-year date/month/year .
Field .
---> character(50)
---> datetime

.
Babu
4.
valpaiyan @ Arun The Hero
25.
.
. character(50)
Name Field / Column 50

---> character(50)
---> datetime Column ,
Table .
Table Field .
Field .
Field ,
Data Type .
character(50) . 50
. character Data Type .
--> datetime datetime Data Type .

character, numbers (int,bigint,decimal,float).


datetime DataType
.
Data Type .
SQL Table / / / .
Table Columns . Column DataType
. .
SQL Microsoft SQL Server 2005 Express
Edition .
: 2 SQL
. .
.
.

.
terms .
. .

.
http://www.microsoft.com/downloads/details.aspx?FamilyID=220549b5-0b07-4448-8848dcc397514b41&DisplayLang=en
Database , SQL
.
,
.

Table, Column, Data Type .


RDBMS ?
RDBMS : Relational Database Management System.
SQL :
MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.
Table ?
Database Table .
Table.
Table ?.
Table Column / Field . Column Table.
Column .
Column Data Type .

Database Table . Table Database .

Table .
( ).
Person#,LastName,FirstName,Address,City Column/Field .
Person# . Data Type numeric.
LastName,FirstName,City Data Type
character, variable character .
Address Column , character
variable character .
PinCode column Character . PinCode
,,,

. numeric character
.
Table Row Tuple ?
Table 3 row .
, 3 row
.
Row Column . Row
.
: 3,Karthik,The Hero,Space, Erode :
. .
3
Karthik : First Name
The Hero : Last Name
Space : Address

Erode : City
Row Address Space . Column
.
.
Karthik Address .
, Field City Erode .
Column
Allow Null .
A = 0, ----> (numeric)
B = "Karthik" ----> (character)
C = NULL ----> (NULL)
NULL , .
. . NULL - .

Allow NULL - (true), (false) .


true / false.
,
.
( !).
Karthik 6 .
. Person#.
Primary Key .
Primary Key?
,
Primary Key .
Table Row . Row Column .

Row Row Primary


key .
NULL . ,
NULL .
Primary key NULL ?
. Primary key NULL .
Posted by at 6:58 AM
Identity Column ?
Column , ,
Auto Increment . Column
, Column Identity Column .
Column Data Type numeric .
(Identity Increment), (Identity Seed)

.
Row, Identity Column
. Row , Identity
Column .
Primary key .
Foreign Key ?
Table . Row
. Table
Foreign key .
Table Row ,
Primary key .
Master - Detail .
Master Table Column Primary key . ( Table).

Primary key Row . Person#.


Primary key
.
Master Table Person# , Detail Table
. .
Data Type . .
Primary - Foreign key Table .
join .
key Column Master-Detail
Table .
Unique ?
Column Row Unique
.
Person# Unique Column .

( : ).
(Person#) Unique .
Primary key Unique . Primary key NULL
. Unique Column , NULL .
.
NULL . / /
. .
Primary key NULL . Unique Column
NULL .
DataType ?
SQL Server 2005 Data Types :
user-defined data types (highest)
sql_variant
xml

datetime
smalldatetime
float
real
decimal
money
smallmoney
bigint
int
smallint
tinyint
bit
ntext
text
image
timestamp
uniqueidentifier
nvarchar
nchar

varchar
char
varbinary
binary (lowest)
Data Types , Column
., , - Data Type .
Character Variable Character ?
NAME CHARACTER(50) ---> Column , Field name NAME
. character DataType
. 50 ( Space)
.

NAME = "Raja" , 4 .
50 . (50)
.

Raja 4 . 46
. 50
(hard disk) . 46 Space
50 .
variable character , Babu 4
. 46 Space
Space 4 hard
disk . .
UniCode Data Types ?
character, varchar Data Type
.
,
nvarchar, nchar Data Type .

SQL - 4
Table Structure ?
Column Name, Data Type(Width), Allow Nulls Table
Structure.

Allow Null tick ,


. .
.
Allow Null tick , column

.
. Identity Column .
Column AddressID .
Table primary key .

Primary key Row .


AddressID Identity Column ,
. Database
AddressID Input .
Table Structure AddressLine2 Allow Nulls tick
. AddressLine2

Column .
AddressLine2 Data .
.
rowguid uniqueidentifier Data Type .
Unique Identifier?
8DD27D89-6AE7-4316-B3B8-0CCEF0924F60 hexadecimal .
.
,
.
Unique Identifier Data Type Column
. .
row UniqueIdentifier .
:

declare @a uniqueidentifier
set @a = newid()
print @a
.
F94771ED-8405-4C30-893E-0325FA0A394C
T-SQL programming .
T-SQL Transact SQL . .
@a variable. .
set @a = newid() --->
hexadecimal based variable @a .
print @a --> @a .

F94771ED-8405-4C30-893E-0325FA0A394C . .
.
.
AddressLine1, AddressLine2, City, PostalCode Column DataType nVarchar
.
Column unicode , ,
.
AddressLine1 60 . 20
, 40 trim 20
table . varchar .
char
.
AddressID, StateProvinceID DataType int .
. AddressID Identity Column

( auto increment ) .
StateProviceID .
Modified Date DataType DateTime
. Modified Date column
.
T-SQL .
declare @a datetime
set @a = getdate()
print @a
@a datetime DataType .
getdate() function , .
print @a .
Jan 26 2009 11:00AM


. Primary key, Identity Column
.
. 3 ,
4
.
,
.
Posted by at 8:45 PM
Labels: Self Learning Series

You might also like