Oracle Flashcards

You may prefer our related Brainscape-certified flashcards:
0
Q

SQL

A

Structured query language

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

Relational db

A

Uses relations or two-dimensional tables to store information

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

ANSI

A

American national standards institute

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

Data retrieval operator

A

Select

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

DML

A

Data manipulation language

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

DML operators

A

Insert
Update
Delete
Merge

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

DDL

A

Data definition language

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

DDL operators

A
Create
Alter
Drop
Rename
Truncate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Transactional control operators

A

Commit
Rollback
Savepoint

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

DCL

A

Data control language

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

DCL operators

A

Grant

Revoke

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

Suppress duplicates keyword

A

Distinct

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

Arithmetic expressions containing null evaluate to …

A

null

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

Oracle SQL concatenation operator

A

||

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

Literal value is .., … or …

A

character, number or date

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

Display strucutre of table in SQL*Plus

A

Desc[ribe]

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

‘Like’ condition wildcard for one character

A

_

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

‘Like’ condition wildcard for zero or many character

A

%

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

Rules of precedence

A
Arithmetic
Concatenation
Comparison
LIKE, IS NULL, IN
BETWEEN
NOT
AND
OR
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Order by default order

A

Ascending

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

Reverse order by order with

A

desc

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

Oracle functions can be

A

Single-row and multiple-row

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

Single-row functions hierarchy

A
Character
Number
Date
Conversion
General (nvl, nullif, case, decode)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Character functions can be

A

Case-manipulation and character-manipulation

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

Case-manipulation functions

A

Lower
Upper
Initcap

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

Character-manipulation

A
Concat
Substr
Length
Instr
Lpad rpad
Trim
Replace
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Number functions

A

Round
Trunc
Mod

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

Default date format

A

DD-MON-RR

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

Translate Explicit

A

Явный

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

Coalesce

A

Returns the first non-null expression in the expression list

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

Nullif

A

Returns null if expressions are equal, returns 1 expression if not

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

SQL Conditional expressions

A

Case

Decode

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

When join is omitted or invalid we recieve

A

Cartesian product

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

Equijoin
Simple join
Inner join

A

Values on both tables must be equal

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

Nonequijoin

A

Condition contains other than an equality operator

35
Q

When outer join is used

A

To see rows that do not meet the join condition

36
Q

Where does the + resides (outer join)?

A

Table with missing information

37
Q

Cross join is equal to

A

Cartesian product

38
Q

Natural join is based on

A

all columns in 2 tables that have the same name.

Columns should be of the same type

39
Q

Natural join with the using clause

A

can be used as equijoin

40
Q

Group founction operate on … to give …

A

sets of rows to give one result per group

41
Q

All group functions … null values

A

ignore

42
Q

Clause to restrict groups

A

Having

43
Q

Group functions can be nested to a depth …

A

of two

44
Q

Multiple-row comparison operators

A

IN
Any
All

45
Q

SQL placeholder for var name

A

&

46
Q

WITH CHECK OPTION

A

progibits from changing rows that are not in the subquery

47
Q

Merge statement provides the ability

A

to conditionally update or insert data

Performs update if the row exists and insert otherwise

48
Q

Merge syntax

A
merge into table_name as table_alias
using (table|view|sub_query) as alias
on (join condition)
when matched then
update set
col1 = col1_val,
col2 = col2_val
when not matched then
insert (column_list)
values (column_values)
49
Q

Transaction ends when

A

Commit or rollback is issued
DDL or DCL executes (auto commit)
User exits
System crashes

50
Q

If a snigle DML fails what is rolled back?

A

Only that statement. Oracle implements an implicit savepoint. Other changes are retained and should be terminated explicitly.

51
Q

Уровни изолированности транзакций

A

Read uncommited
Read commited
Repeatable read
Serializable

52
Q

Как в oracle включить уровень изолированности serializable?

A

alter session set isolation_level = serializable

53
Q

Oracle lock modes:

A

Exclusive

Share

54
Q

Oracle table naming rules

A
Begin with a letter
1 to 30 characters long
Contain A-Z, a-z, 0-9, _, $, #
Unique
Not reserved word
55
Q

Default keyword can be used

A

When creating tables

In insert statement

56
Q

Tables in Oracle are divided into 2 groups:

A

User

Data dictionary

57
Q

Oracle datatypes

A
Varchar2(n)
Char[(n)]
Date
Long
Lob, clob, blob
Raw, long raw
Bfile
Rowid
58
Q

Rowid is

A

Hexadecimal string representing the unique address of a row in table

59
Q

Bfile is

A

Binary data stored in an external file

60
Q

Clob is

A

Character data up to 4 Gb

61
Q

How to mark column as unused in Oracle?

A

Set unused

62
Q

Truncate table statement …

A

Removes all rows

Releases the storage space

63
Q

Can truncate be rollbacked?

A

No

64
Q

Table DDL statements

A
Create
Alter
Drop
Rename
Truncate
Comment
65
Q

Constraints are

A

rules at table level

66
Q

FK constraint keywords

A

Foreign key
References
On delete cascade
On delete set null

67
Q

Constraint types

A
Not null
Unique
Primary key
Foreign key
Check
68
Q

Force keyword when creating view means

A

view will be created regardles of whether or not the base table exists

69
Q

With check option when creating view

A

only rows accessible to the view can be inserted or updated

70
Q

With read only when creating view

A

no DML can be performed on the view

71
Q

Cannot add data through view if view includes:

A
Group functions
Group by
Distinct
Rownum
Columns defined by expressions
Not null columns in tables not selected by view
72
Q

Inline view is

A

a subquery with an alias

73
Q

Top-n analysis SQL structure

A

Select column_list, rownum
from (select column_list from t order by 1)
where rownum <= N

74
Q

What is a sequence?

A

Sharable DB object for generating integers

75
Q

Sequence pseudocolumns

A

Nextval and currval

76
Q

When Nextval and Currval cant be used?

A
Select list of view
Select with distinct
Select with group by, having, order by
Subquery in select, delete or update
Default in create table or alter table
77
Q

What is and index?

A

Schema object that cna speed up the retrival of rows by using a pointer.

78
Q

When not to create index?

A
Small table
Columns are not used in query condition
Most queries retrieve > 4% data
Table is updated frequently
Indexed columns are referenced as part of expression
79
Q

Set operatiors

A

Union/Union all
Intersect
Minus

80
Q

What is the difference between union and union all?

A

Union eliminates duplicates

81
Q

Rollup operator

A

Used with group by to generate subtotals

82
Q

Cube operator

A

Used with group by to generate subtotals and produces all possible combination of groups

83
Q

Scalar subquery

A

returns exactly one column value from one row

84
Q

Correlated subquery

A

executes for each row

85
Q

Exists operator

A

tests for existence of rows in th results set of the subquery

86
Q

With clause

A

is used for reusing sql block