chapter 1 Flashcards

1
Q

what does APEX enable users to do

A

Enables users to build and access applications as if they were running in separate databases.

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

what are the 2 components of apex

A

–> SQL workshop (learn sql)
–> application builder (design applcation)

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

which command is used to return all the rows in table

A

SELECT *

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

what is the syntax for select statement

A

SELECT *
FROM <TABLE_NAME>;</TABLE_NAME>

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

a statement is a ______

A

COMBINATION OF 2 OR MORE CLAUSES

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

what does the from clause specify

A

specifies the table containing the columns listed in the select clause

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

what statement do you use if you want to return a subset of the data

A

WHERE <CONDITION_1>;</CONDITION_1>

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

when will you get the invalid SQL statement error

A

incorrect spelling for sql commands

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

When will you get the Name invalid identifier error

A

when you enter the incorrect column name

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

when will you get the invalid SQL statement error

A

incorrect spelling for SQL commands

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

what is a relational database table

A

–> It is a collection of objects or relations, a set of operators to act on those relations, and data integrity for accuracy and consistency.

–> allows tables to be related by a common field

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

what percentage of the world’s data resides in rdbms

A

20%

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

which companies use RDBMS

A

amazon.com
France telecom
The Claria corporation

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

what is a field

A

one value found at the intersection of a row and column.

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

what is a column

A

one kind of data in a table

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

what is a table

A

basic storage structure

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

what is a row

A

data for one table instance

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

what is primary key

A

unique identifier for each row

19
Q

what is a foreign key

A

column that refers to the primary key column in another table

20
Q

what are the 6 table properties?

A

–> Entries in columns are single-valued
–> Entries in columns are of the same kind
–> Each row is unique
–> sequence of columns is insignificant
–> sequence of rows is insignificant
–> Each column has a unique name

21
Q

_______ organizes data into related rows and columns

A

Relational database management system

22
Q

what do you use to access the data in rdbms

A

SQL statements and operators

23
Q

in a very large database system ____, _____, and ______ make up the RDBMS

A

many users, servers and tables

24
Q

what are the 4 categories of sql statements

A

–> data manipulation language (DML)
–> data definition language (DDL)
–> Transaction control language (TCL)
–> data control language (DCL)

25
Q

what is DML

A

–> used to modify the table data by entering new rows, changing existing rows, or removing existing rows.

–> eg: Insert, Update, Delete, Merge

26
Q

which category of Sql statements does select come under

A

It is a limited form of DML in that it can only access the data in the database. It cannot manipulate the data in the database, although it can operate on the accessed data before returning the results of the query

27
Q

what is DDL

A

–> DDL statements create, change and remove the data structures from the database

–> eg: create, alter, drop, rename, and truncate begin DDL statements

28
Q

what is transaction control language (TCL)

A

–> used to manage the changes made by DML statements
–> can be grouped together into logical statements
–> eg: commit, rollback and savepoint

29
Q

what is the data control language (DCL)

A

–> give or remove access rights to the database
–> eg: Grant, revoke

30
Q

what must a select statement include

A

–> select clause
–> from clause

31
Q

what are the capabilities of select statements

A

–> projection: used to choose columns in a table that you want to be returned by your query
–> selection: used to choose rows in a table that you want returned by your query

32
Q

which clause determines selection

A

WHERE clause

33
Q

which clause determines projection

A

SELECT clause

34
Q

what is precedence in arithmetic operators

A

it is the order in which sql evaluates the arithmetic operators

35
Q

what is order of arithmetic operators

A
  • / + -
    (My Dear Aunt Sally)
36
Q

what happens when the operators are of the same priority

A

evaluation is done from left to right

37
Q

_______ is not the same as a 0 or space

A

Null

38
Q

why use NULL

A

When you dont know the value for a column, you cannot store unknowns in your database. Relational databases use a placeholder called NULL to represent these unknown values

39
Q

what happens when you try to divide by null

A

result is null or unknown

40
Q

how are null values displayed in apex

A

by a dash (-)

41
Q

what is an alias

A

way of renaming a column heading in the output. It is used to display a name which is easier to understand and is more user friendly

42
Q

what are the column alias rules

A

–> renames a column heading
–> is useful with calculations
–> Immediately follows the column names
–> May have optional AS keyword between the column name and alias
–> Requires double quotation marks if the alias contains special characters or is case sensitive

43
Q

is this valid

SELECT last_name AS lname
from students;

A

Yes, as quotation marks are not needed when using the as keyword. Also the column name LNAME will be displayed in caps