DBMS Flashcards

1
Q

What is SQL

A

SQL stands for Structured Query Language. SQL is a database computer language designed for the retrieval and management of data in a relational database

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

What are the data types in SQL?

A

Data Types in SQL:
● Int - integer (example: marks of a student)
● Float - decimal values (2.09, 1.35, 1.75)
● Date - for entering date (format: yyyy-MM-DD)
● Char - for characters, if we want to enter a string, we have to enter the number of letters the string has. Example: If you are entering CAR, then you have to enter 3, as there are 3 letters in CAR. It will leave 3 spaces for the car. Maximum
number of characters are 0 to 255.
● Varchar - for characters, if we want to enter a string, we have to enter the number of letters the string has. Example: If you are entering CAR, then you
have to enter 3, as there are 3 letters in CAR. It will leave 3 spaces for the car.
The maximum number of characters is 0 to 65535.

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

What is DDL?

A

DDL stands for Data Definition Language. These commands are used to change the structure of a database and database objects. For example, DDL
commands can be used to add, remove, or modify tables within a database.

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

What are the constraints in MYSQL

A

Constraints in Mysql
● Not Null - ensures that column has an appropriate value
● Unique - ensure that columns should have a distinct value, not the same
● Primary key - identifies each row uniquely
● Default - used to fill a column with default and fixed value

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

What is DML

A

A data manipulation language (DML) is a computer programming language used for adding (inserting), deleting, and modifying (updating) data in a database.

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

What are the DML commands

A

DML Commands
Insert - Inserts data in tables (Insert into table_name values();)
Modify - Adding a constraint to a column
(Alter table table_name modify column_name type() constraint;)
Delete - Deletes a table

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