SQL1 Flashcards

0
Q

Database Query?

A

Is an inquiry into the database that returns information back from the database.

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

Database?

A

Is an organized collection of data, typically stored in electronic format. It allows you to input, organized, and retrieve data quickly.

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

An index?

A

Is a data structure that improves the speed of data retrieval operation on a database table.
Pro-retrieval speed
Con-created and updated,disk space

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

Three type of SQL files?

A

Primary-.mdf
Tables,views,system tables
2nd-.ndf
Transaction log-.ldf

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

Database Management System (DBMS)?

A

A collection of programs that enable you to enter, organize, and select data in a database.

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

Three type of database?

A

Flat-type database
Hierarchical database
Relational database

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

Flat-type database?

A

Plain-text formats

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

Hierarchical database?

A

A tree structure (family tree)
Each child can have ONLY one parent

XML : extensible markup language

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

Relational database?

A

Data is stored in tables and any new information is automatically added into the table without the need to reorganize the table itself.

Multiple parents

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

Two categories of database objects?

A

Storage

Programmability

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

Constraints?

A

Limitations or rules place on a field or column to ensure that data that is considered invalid is not entered.

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

A variety of SQL constrains?

A

A unique constraint: no duplicate
A check constraint: limit data type
A default constraint: insert default value
A not null constraint: no blank allowed
Primary key constraint: uniquely identifies, cannot contain NULL
A foreign key constraint: point to primary key

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

SQL Server Management Studio (SSMS), the Query Analyzer supports?

A

XQuery: a query and functional programming language
SQLCMD: a command-line application
Transact-SQL: the primary means of programming and managing SQL Server.

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

Type of SQL commands?

A
Data Definition Language (DDL)
Data Manipulation Language (DML)
Data Query Language (DQL)
Data Control Language(DCL)
Data Administration Commands
Transactional Control commands
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Data Definition Language (DDL)?

A
Use
Create
Alter
Drop
Truncate ( free the space)
Delete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Data Manipulation Language (DML)?

A
Select
Insert
Update
Delete
Merge
16
Q

Data Control Language (DCL)?

A

Grant
Deny
Revoke

Deny overwrite grant
Revoke overwrite grant and deny

17
Q

Table?

A

Use to store data,are 2 dimensional objects consisting of rows and columns.
Is to provide a structure for storing data within a relational database.

18
Q

Data administration Commands?

A

Start audit

Stop audit

19
Q

Function?

A

Return value, never update data

20
Q

Transactional Control Commands?

A

Commit
Rollback
Savepoint
set transaction

21
Q

Stored Procedures?

A

Is a previously written SQL statement that has been “store” or saved into a database.

  • “usp” is indicates to SQL that this is a user-created stored procedure.

Syntax:
Exec ups_displayallusers