Section 1

Preview this deck

What is the difference between 'delete' and 'truncate'?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (21)

Section 1

(21 cards)

What is the difference between 'delete' and 'truncate'?

Front

Delete is for one row, truncate is for all rows in table. You can rollback 'delete', whereas 'truncate' you cannot. 'Delete' is slower than 'truncate'

Back

regexp '$'

Front

match the end of a string. fo
o --> REGEXP '^fo
o$'

Back

regexp 'a+'

Front

match any sequence of one or more a characters. Ban --> REGEXP '^Ba+n'

Back

Difference between SQL and MySQL?

Front

SQL is the language while MySQL is a database management system.

Back

regexp 'a*'

Front

match any sequence of ZERO or more a characters. Bn --> REGEXP '^Ba*n'

Back

regexp '^'

Front

match the beginning of a string. fofo --> REGEXP '^fo'

Back

Difference between CHAR and VARCHAR2?

Front

CHAR is a fixed length whereas VARCHAR2 can be variable length.

Back

What is denormalization?

Front

Denormalization refers to a technique which is used to access data from higher to lower forms of a database. It helps the database managers to increase the performance of the entire infrastructure as it introduces redundancy into a table. It adds the redundant data into a table by incorporating database queries that combine data from various tables into a single table.

Back

What is ACID property in a database?

Front

Back

SQL query to display the current date?

Front

GetDate()

Back

What is data integrity?

Front

Data Integrity defines the accuracy as well as the consistency of the data stored in a database. It also defines integrity constraints to enforce business rules on the data when it is entered into an application or a database.

Back

regexp 'a?'

Front

match either zero or one a character. BINARY Bn --> REGEXP '^Ba?n'

Back

Explain the different types of normalization.

Front

1NF - First Normal Form - NO repeating groups within rows. 2NF - Second Normal Form - Every non-key column value is dependent on the primary key. 3NF - Third Normal Form - Dependent solely on the primary key and no other non-key value.

Back

regexp (abc)*

Front

match zero or more instances of the sequence abc. pipi --> REGEXP '^(pi)*$'

Back

regexp '.'

Front

match any character--including return/newline. fofo --> REGEXP '^f.*$'

Back

What is a UNIQUE key?

Front

Uniquely identifies a single row in the table. Multiple values allowed per table. Null values allowed.

Back

regexp a{n}, a{m,n}

Front

a{n} matches exactly n instances of a. a{n,} matches n or more instances of a. a{m,n} matches m through n instances of a, inclusive. If both m and n are given, m must be less than or equal to n. abcde --> REGEXP 'a[bcd]{3}e' 'abcde' --> REGEXP 'a[bcd]{1,10}e';

Back

What is normalization?

Front

Normalization is the process of organizing data to avoid duplication and redundancy.

Back

What are constraints?

Front

Limits on the data in a table. NOT NULL CHECK DEFAULT UNIQUE PRIMARY KEY FOREIGN KEY

Back

Types of DBMS?

Front

RDBMS - data stored in relations. ex MySQL Non-RDBMS - no concept of relation ex. MongoDB.

Back

What are the different subsets of SQL?

Front

DDL - Data definition language: CREATE, ALTER, DELETE DML - Data manipulation: INSERT, UPDATE, DELETE, RETRIEVE DCL - Data control: access to the database.

Back