BD Flashcards

1
Q

GROUP_CONCAT

A

Не забывайте про замечательную функцию GROUP_CONCAT. Она может выручить при сложных запросах.

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

Index

A

Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for the columns in question, MySQL can quickly determine the position to seek to in the middle of the data file without having to look at all the data. This is much faster than reading every row sequentially.

Most MySQL indexes (PRIMARY KEY,UNIQUE,INDEX, andFULLTEXT) are stored inB-trees. Exceptions: Indexes on spatial data types use R-trees;MEMORYtables also supporthash indexes;InnoDBuses inverted lists forFULLTEXTindexes.

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

What are joins in SQL?

A

A JOIN clause is used to combine rows from two or more tables, based on a related column between them. It is used to merge two tables or retrieve data from there. There are 4 joins in SQL namely:

Inner Join

Right Join

Left Join

Full Join

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

What are Constraints?

A

Constraints are used to specify the limit on the data type of the table. It can be specified while creating or altering the table statement. The sample of constraints are:

NOT NULL

CHECK

DEFAULT

UNIQUE

PRIMARY KEY

FOREIGN KEY

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