Terminology Flashcards

1
Q

SQL

A

Structured Query Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

T-SQL

A

Transact-Structures Query Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Record

A

A set of fields in a row

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Field

A

One or more characters of related information of the same data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Schema

A

A schema is a collection of database objects including tables, views, triggers, stored procedures, indexes, etc. A schema is associated with a username which is known as the schema owner, who is the owner of the logically related database objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

View

A

A View is a virtual table whose contents are defined by a query.

Like a table, a view consists of a set of named columns and rows of data. Unless indexed, a view does not exist as a stored set of data values in a database.

The rows and columns of data come from tables referenced in the query defining the view and are produced dynamically when the view is referenced.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Collation

A

Collations in SQL Server provide sorting rules, case, and accent sensitivity properties for your data.

SQL Server includes a large set of collations for handling the language and regional differences that come with supporting users and applications in different parts of the world.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How many data types?

A

30

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

char(n)

A

Fixed width character string
Max= 8000 characters
defined width

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

varchar(n)

A

Variable width character string
Max=8000 characters
2 bytes + # of chars

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

varchar(max)

A

Variable width character string
Max=1,073,741,824 characters
2 bytes + # of chars

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

text

A

Variable width character string
Max=2GB of text data
4 bytes + # of chars

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

nchar

A

Fixed width Unicode string
Max=4000 characters
defined width x 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

nvarchar

A

Variable width Unicode string

Max=4000 characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

nvarchar(max)

A

Variable width Unicode string

Max=536,870,912 characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

ntext

A

Variable width Unicode text

Max=2GB text data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

binary(n)

A

Fixed width binary string

Max=8000 bytes

18
Q

varbinary

A

Variable width binary string

Max=8000 bytes

19
Q

varbinary(max)

A

Variable width binary string

Max=2GB

20
Q

image

A

Variable width binary string

Max=2GB

21
Q

bit

A

Integer

0, 1, Null

22
Q

tinyint

A

Whole number
0 - 255
1 byte

23
Q

smallint

A

Whole number
-32,768 to 32,767
2 bytes

24
Q

int

A

Whole number
-2,147,483,648 to 2,147,483,647
4 bytes

25
Q

bigint

A

Whole number
-9,223,372,036,854,775,808 and 9,223,372,036,854,775,807
8 bytes

26
Q

decimal(p,s)

A

Fixed precision and scale numbers
p = max digits that can be stored (1 to 38) default=18
s = max digits on the right side of decimal (0 to p) default=0
5-17 bytes

27
Q

numeric(p,s)

A

Fixed precision and scale numbers
p = max digits that can be stored (1 to 38) default=18
s = max digits on the right side of decimal (0 to p) default=0
5-17 bytes

28
Q

money

A

Monetary data
-214,748.3648 to 214,748.3647
8 bytes

29
Q

float(n)

A

Floating precision
n = indicates 4 or 8 bytes
4 or 8 bytes

30
Q

real

A

Floating precision
-3.40E + 38 to 3.40E + 38
4 bytes

31
Q

datetime

A

January 1, 1753 -> December 31, 9999
accuracy = 3.33 milliseconds
8 bytes

32
Q

datetime2

A

January 1, 0001 -> December 31, 9999
accuracy = 100 nanoseconds
6-8 bytes

33
Q

smalldatetime

A

January 1, 1900 -> June 6, 2079
accuracy = 1 minute
4 bytes

34
Q

date

A

January 1, 0001 -> December 31, 9999

3 bytes

35
Q

time

A

accuracy 100 nanoseconds

3-5 bytes

36
Q

datetimeoffset

A

Same of datetime2 but with time zone offset

8-10 bytes

37
Q

timestamp

A

Stores a unique number that gets updated every time a row gets created or modified. The timestamp value is based upon an internal clock and does not correspond to real time. Each table may have only one timestamp variable

38
Q

sql_variant

A

Stores 8000 bytes of data

except text, ntext, timestamp

39
Q

uniqueidentifier

A

Stores globally unique identifier (GUID)

40
Q

xml

A

Stores formatted data (Extensible Markup Language)

Max = 2GB

41
Q

Truncate Table

A

Deletes the data inside a table, but not the table itself

TRUNCATE TABLE [table]

42
Q

Add Constraint

A

Create a constraint AFTER a table is already created
ALTER TABLE [table]
ADD CONSTRAINT [pk_constraint] PRIMARY KEY ([columns])