Database Systems Flashcards

1
Q

Data functions

A

Output the current date or time and are used either to filter records or to write date and time information

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

String functions

A

CONCAT(..,..) - combines the values passed as parameters to a character string
CONCAT_WS(separator,…,…) - combines the values passed as parameters to a character string. Always insert the characters passed as the first parameter as a separator between 2 values

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

ORDER BY + sequence indicators

A

ORDER BY is used to sort the result set of a query
DESC=descending
ASC=ascending
-(NS) = default value = ascending

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

Keywords for calculations

A
COUNT
SUM
AVG
MAX
MIN
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Column comparitive operator

A

ANY
ALL
EXISTS

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

Types of N:M Relationships

A

N:M
N:CM
CN:CM

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

Types of 1:1 relationships

A

1:1
1:C
C:C

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

Types of 1:N relationships

A

1:N
1:CN
C:CN
C:N

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

SQL command to create a table

A
CREATE TABLE name(
column defintion
primary key definition
[integrity rules, background]
[foreign key definition]
[specifying conditions for columns]
)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Column defintion

A

General schema for defining columns can be specified as follows:
name data type [NOT NULL] [DEFAULT default value] [UNIQUE] [CHECK (condition)]

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