DBMS (2) Flashcards

1
Q

facilitate data manipulation tasks by accepting parameters, executing computations, and delivering results.

A

SQL FUNCTIONS

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

operate on sets of values, producing a single result from multiple rows. Common aggregate functions include SUM(), AVG(), COUNT(), MIN(), and MAX(). They are instrumental in performing calculations across groups of data, often in conjunction with the GROUP BY clause.

A

AGGREGATE FUNCTION

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

operate on individual values, transforming or manipulating them in various ways. ________ functions find wide application in formatting, validation, and manipulation of data within SQL queries.

A

SCALAR FUNCTIONS

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

also known as string functions, are a subset of scalar functions in SQL that specifically operate on character or string data.

A

CHARACTER FUNCTION

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

function is a type of SQL function that operates on numeric data types, such as integers or floating-point numbers. These functions perform various mathematical operations or transformations on numeric values and return a single numeric result.

A

NUMERIC SCALAR

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

This is used to perform operations on a set of values and return a single result.

A

AGGREGATE FUNCTION

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

is a mathematical function that takes a single value as in input and produces a single value as output. Scalar functions can operate on scalar inputs using various mathematical operations like addition, subtraction, multiplication, division and etc. By using select, where and having.

A

SCALAR FUNCTIONS

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

OTHER NUMERICAL FUNCTIONS

A

SQRT(attribute):
CEILING(attribute):
ABS(attribute):
FLOOR(attribute)
SQUARE(attribute)

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

generates a date by incrementing a designated portion of a
given date by a specified value.

A

DATEADD

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

returns the difference between two parts of a date

A

DATEDIFF

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

returns the specified part of the date requested

A

DATEPART

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

returns the specified part of the date requested.

A

GETDATE()

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

emerge as versatile tools for conditional logic. These statements enable us to execute different actions based on varying conditions within our database queries.

A

CASE

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

Then for a single condition you can write the keyword WHEN followed by the condition that has to be satisfied. After that comes the keyword THEN and the value for that condition, like WHEN <condition> THEN <stuff></stuff></condition>

A

CASE

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

is a special type of stored procedure that automatically runs when an event occurs in the database server. In SQL, a ______is like a special set of instructions that automatically gets executed when certain events happen in your database. These events could be things like inserting a new row into a table, updating an existing row, or deleting a row.

A

TRIGGERS

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

3 TYPES OF DATABASE TRIGGERS

A

DDL TRIGGERS (DATA DEFINITION LANGUAGE)
DML (DATA MANIPULATION LANGUAGE)
LOGON TRIGGERS

17
Q

SQL means?

A

Structured Query Language

18
Q

is a component of Structured Query Language (SQL) that deals with defining and modifying the structure of database objects. It focuses on creating and managing the schema of the database.

CREATE
DROP
TRUNCATE.
ALTER

A

DDL or DATA DEFINITION LANGUAGE

19
Q

are special stored procedures that are automatically executed or fired in response to specific ______________ events on tables or views. These events include INSERT, UPDATE, and DELETE operations.

A

DML triggers (Data Manipulation
Language triggers)

20
Q

is fired automatically on a _____ event. It created at the server level. We can use this to control the SQL login security.

A

LOGON Triggers

21
Q

used to concatenate two or more strings into a single string.

A

CONCAT():

22
Q

used to converts all characters in a string to uppercase.

A

UPPER()

23
Q

used to converts all characters in a string to lowercase.

A

LOWER()

24
Q

used to extracts a substring from a given string

A

SUBSTRING()

25
Q

used to replaces all occurrences of a substring within a string with another substring.

A

REPLACE()

26
Q

returns the length of a string.

A

LEN()

27
Q

used to round a numeric value to a specified number of decimal places.

A

ROUND()

28
Q

This function returns the smallest integer value greater than or equal to the specified attribute, rounding up if the attribute contains decimal places.

A

CEILING(attribute):

29
Q

It returns the largest integer value less than or equal to the specified attribute, rounding down if the attribute contains decimal places.

A

FLOOR(attribute):

30
Q

This function calculates and returns the square root of a positive numeric attribute.

A

SQRT(attribute):

31
Q

It returns the absolute value of any numeric attribute, disregarding its sign.

A

ABS(attribute):

32
Q

This function squares the provided
attribute, returning the result.

A

SQUARE(attribute):