Lecture 5 Flashcards

1
Q

What is a databas

A

A database is an organized collection of structured information, or data, typically stored electronically in a computer system.

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

Example of SQL databse

A

MySQL,
PostgreSQL,
Oracle,
MS-SQL Server

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

Example of NoSQL database

A

MongoDB,
GraphQL,
HBase,
Neo4j,
Cassandra

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

What is database normalization

A

Normalization is a database design technique that reduces data redundancy and eliminates undesirable characteristics like Insertion, Update and Deletion Anomalies.

Normalization rules divides larger tables into smaller tables and links them using relationships.

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

What is SQL

A

Structured Query langauge is a programming language used by nearly all relational databases to query, manipulate, and define data, and to provide access control.

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

Describe DDL

A

DDL stands for Data Definition Language. The DDL commands help to define the structure of the databases or schema.

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

Mention some commands

A

CREATE: It is used to create a new database and its objects such as table, views, function, stored procedure, triggers, etc.
DROP: It is used to delete the database and its objects, including structures, from the server permanently.
ALTER: It’s used to update the database structure by modifying the characteristics of an existing attribute or adding new attributes.
RENAME: This command renames the content in the database.

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

Syntax to create a database

A

CREATEDATABASEdatabasename;

CREATE DATABASE pauCafe;

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

Syntax to drop database

A

DROP DATABASE databasename;

DROP DATABASE pauCafe;

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

Syntax to drop table

A

DROP TABLE table_name;

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

Synxtax to alter table

A

ALTER TABLE Students
ADD Email varchar(255);

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

Syntax to rename statement

A

ALTER TABLE table_name
RENAME TO new_table_name;

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

Describe DML

A

Data Manipulation Language. The DML commands deal with the manipulation of existing records of a database.

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

Mention some DML commmands

A

SELECT: This command is used to extract information from a table.
INSERT: It is a SQL query that allows us to add data into a table’s row.
UPDATE: This command is used to alter or modify the contents of a table.
DELETE: This command is used to delete records from a database table, either individually or in groups.

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

Syntax for select comand

A

SELECT column1, column2, …
FROM table_name;

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

Syntax for where command

A

WHERE Syntax
SELECT column1, column2, …
FROM table_name
WHERE condition;

17
Q

Syntax for update command

A

UPDATE Syntax
UPDATE table_name
SET column1 = value1, column2 = value2, …
WHERE condition;

18
Q
A