Shared Flashcard Set

Details

Databases Lesson 5
Databases on MS SQL Server
53
Computer Science
Undergraduate 4
09/27/2013

Additional Computer Science Flashcards

 


 

Cards

Term
Catalog
Definition

Another term for

Database

Term
Extent
Definition

Eight pages

Page is 8KB

8KB * 8 = 64 KB

 

All objects are stored here; basic unit in the databases

 

One object to the 8 pages is a UNIFORM EXTENT

MIXED EXTENT is when objects are too small they just go (many of them) onto one Extent

Term
page
Definition

8KB

 

The basic unit of the DB

Term
Spindle
Definition

This is a physical disk drive

 

It can have several or just one partition

Term
VLDB
Definition

Very

Large

Data

Base

Term
OLTP
Definition

OnLine

Transaction

Processing

 

gets data into the DB

Term
OLAP
Definition

OnLine

Analytical

Processing

 

focuses on getting info out of the DB

Term
.mdf
Definition

default extension of the database file

This is the primary

Term
.ndf
Definition
secondary data file
Term
.ldf
Definition
transaction log files
Term

database files

take up how many databases

Definition
One database per database file and can exceed beyond it
Term
What happens when you don't specify transaction log size when you create a new DB
Definition

It is resized to 25% of the size

of your data file request

Term
Filegroups
Definition

You use this to create a logical filegrouping

of the DB

 

It's to improve admin on VLDBs

 

It doesn't improve performance

-if you work with small DBs with RAID5

 

You separate them into:

 

data or tables

nonclustered indexes

 

Term
Two Basic Filegroups
Definition

primary default (where the system files must go and the first data file goes)

 

user defined

 

you can add additional filegroups using

ALTER DATABASE

Term

 Can a filegroup contain:

indexes

tables

text

ntext

image data?

Definition
yes
Term

Can a file be a member of

more than one filegroup

at a time?

Definition
NO
Term

What are the components of

RDBMS?

Definition

maintain relationships

among the data

in the DB

 

ensures data is being stored correctly and follows rules defining the relationships

 

recovers data in case of failure

Term
What does the New DB follow?
Definition
It follows the MODEL DB
Term

What must you specify when you create a DB

In SQL Server?

Definition

at least one file to store data

 

at least one file to hold transaction log

Term

Where can you store data files

and log files?

Definition

SAN Storage Area Network

 

iSCSI-based network

 

locally attached drive

Term
RAID
Definition

Redundant

Array of

Independent

Disks

Term
RAID 0
Definition

striping

 

writes data

across multiple hard disk PARTITIONS

in a

STRIPE SET

 

best speed but

no fault tolerance

Term
RAID 1
Definition

mirroring

 

this is slow because you must write to disk twice

Term
disk duplexing
Definition

this is when you place a separate controller

for each drive in the mirror

Term
RAID 5
Definition

parity checksums

are written across all disks in the stripe set

 

However

if more than one disk in the

stripe set fails

you lose all your data

Term

RAID 10

or

RAID 1+0

Definition

mission critical systems

incredible speed and fault tolerance

 

However

you use more than twice the disk space of RAID 1

 

MS recomends 5 and 1: 5 for data files and 1 for log files so they can be mirrored

Term

Other RAID

2

3

4

 

Definition

2 uses Hamming code to recover from 2 disk drive failures in the array

 

3 uses a single check per group

 

4 supports independent reads and writes

 

These are much faster and are called Hardware Solutions

Term
Data Pages
Definition

actual database record

 

8192KB

 

8060 is for data storage

 

except for variable length, rows don't span more than one page they stay in one

Term
Index pages
Definition

These store

index keys and levels making up the entire index tree

 

On a single page you can have many entries (unlimited)

Term
Text/image
Definition

contains a 16-Byte pointer

to a linked list of text pages

that holds the actual data

Term

GAM

Global Allocation Map

pages

Definition

maps the data pages

 

what's filled and what's available for filling

Term

IAM

Index

Allocation

Map

Definition
Keeps track as to why an extent (set of 8 pages) exists
Term

PFS

Page

Free

Space

Definition

keeps track of free space on the other pages

up to 8000 pages

Term
How does SQL Server manage memory I/O?
Definition

it does so in

8KB chunks

Term
How does SQL Server manage disks?
Definition
It does so in 64KB chunks
Term
torn page
Definition

since SQL server handles memory in 8KB chunks and disk in 64KB chunks BUT

Microsoft OS Windows write to disk I/O in 4KB Chunks,

 

this may result

 

"torn pages"

Term
How does data get read or written (in what unit?)
Definition

this occurs in page units

 

However they are held in (cached) memory until

 

an extent (8 pages) has been reached

 

Data cache is divided into 8KB buffers

Term
How do you create a database in SQL
Definition
CREATE DATABASE
Term
How do you create reports on a DB
Definition

select the DB

in Management Studio

right click

choose reports

Term
sp_configure
Definition
stored procedure that addresses configuration
Term
SELECT DB_ID()
Definition

this reports the internal DB identifier

 

Gives detail about your DB

Term
sp_databases
Definition

system stored procedures

 

an example of the detail available about your DB

Term
DBCC CheckDB
Definition
this gives you details about your DB
Term
sp_helpdb
Definition
stored procedures that gives you info about all databases in your SQL Server
Term
Collation
Definition

under DB's properties and options

 

this will let you choose the language and whether it is case sensitive

Term
Simple Recovery Model
Definition

log records almost nothing

 

from last back up to present

 

used for simple DBs like OLAP

Term
Bulk-Logged Recovery Model
Definition

SELECT INTO

BCP

BULK INSERT

 

only bulk operations may be lost

 

you set this option just before doing Bulk Insert

 

You need to do back up just before doing Bulk Insert

Term
Default Full Recovery Model
Definition
highest level of protection
Term
Compatibility Levels
Definition

80 means SQL Server 2000

 

90 means 2005

 

100 means 2008

Term
Page Verify Options
Definition

None

Checksum

Torn_Page_Detection

Term
Database State Settings
Definition

Read-Only (true or false)

 

State:

OFFLINE

NORMAL

EMERGENCY

Term
EMERGENCY Database State Settings
Definition

DB becomes read-only

logging is disabled

sysadmin fixer server role has limited access

 

Used for troubleshooting purposes

 

Only set by sysadmin fixer server role

Term
Restrict Access Option
Definition
  • MULTI_USER

 

  • SINGLE_USER (one user at a time with a single connection)

 

  • RESTRICTED_USER

restricts access to:

db_owner

db_creator

sysadmin security roles

Supporting users have an ad free experience!