Databases Flashcards

1
Q

What are the components of a database?

A

Hardware (server)
software (mySQl or RDS)
data
procedure
database access language(sql)

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

What are the different types of databases and their distinctions?

A

SQL is relational and NoSQL is not
SQL scales vertically but NoSQL scales horizontally
SQL has structed predefined schema, NoSQL is dynamic and flexible and is for unstructed data
SQL has tables based on relationships between those tables, NoSQL has other types of data structures such as Document, Key-value, Graph, or wide column
An example of Relational is oracle, MySQL, and example of NoSQL is Redis, MongoDB

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

When would you use SQL vs NoSQL

A

SQL- transaction orientated systems. Storing students infomation of a school
NoSQL - unstructured data like a social media post

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

What is ETL?

A
  • Extract the data from various sources or legacy systems
  • Transform the data by cleansing, de-duplicating, and standardising to make it into a form that fits your database
  • Load the data into the target database.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Compare a data warehouse and an Online Transaction Processing database

A

They are both databases.
OLTP is centerd around inserting, updating, searching and viewing the data

Data Warehousing is generally used to collect and manage data from multiple sources to provide a meaningful business insight.

OLTP are typically in third normal form dw is not

OLTP is produced for real-time business operations whereas DW are for analysis of business measures by categories and attributes.

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

What is DB tuning?

A

Optimizing the performance of a database
minimise bottle necks
keeps query times as short as possible

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

How would you provide high availability for a database deployed on an instance in the cloud?

A

Deploy a primary database and one or more standby database in a different location/availability zone that synchronously replicates the data. In case of an infrastructure failure, ensure there is an automatic failover to the standby database.
You can do this with Amazon RDS

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

What can’t you horizontally scale a sql db

A

Because when you have tables split across the different cluster nodes, joins usually become very inefficient.

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

Why do we use indexes?

A

Indexes contain all the necessary information needed to access items quickly and efficiently.

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

What is the port number for DNS?

A

53

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

What is the port number for http?

A

80

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

What is the port number for https?

A

443

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

What is the port number for telnet?

A

23

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

What is a dbms

A

DBMS stands for Database Management System. It is a collection of application programs which allow the user to organize, restore and retrieve information about data efficiently and as effectively as possible.

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

What do you understand by Data Redundancy?

A

Duplication of data in the database is known as data redundancy. As a result of data redundancy, duplicated data is present at multiple locations, hence it leads to wastage of the storage space and the integrity of the database is destroyed.

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

What are the advantages of DBMS?

A

Data is stored in a structured way and hence redundancy is controlled.

Validates the data entered and provide restrictions on unauthorized access to the database.

Provides backup and recovery of the data when required.

It provides multiple user interfaces.

17
Q

What is normalisation?

A

the process of removing redundant data from the database by splitting the table in a well-defined manner in order to maintain data integrity. This process saves much of the storage space.
There are seven normal forms.

18
Q

What is the first normal form?

A

First Normal Form (1NF): A relation is said to be in 1NF only when all the entities of the table contain unique or atomic values.

19
Q

Second normal form?

A

Second Normal Form (2NF): A relation is said to be in 2NF only if it is in 1NF and all the non-key attribute of the table is fully dependent on the primary key.

20
Q

What is 3NF

A

Third Normal Form (3NF): A relation is said to be in 3NF only if it is in 2NF and every non-key attribute of the table is not transitively dependent on the primary key.

21
Q

What is SQL?

A

Structured Query language, SQL is a standard programming language that is designed specifically for storing and managing data in the relational database management system (RDBMS) using all kinds of data operations.

22
Q

Enlist the advantages of SQL.

A

Simple SQL queries can be used to retrieve a large amount of data from the database very quickly and efficiently.

SQL is easy to learn and almost every DBMS supports SQL.

It is easier to manage the database using SQL as no large amount of coding is required.

23
Q

What is a record?

A

A record is a collection of values or fields of a specific entity. For Example, An employee, Salary account, etc.

24
Q

What is a field?

A

A field refers to an area within a record that is reserved for specific data. For Example, Employee ID.

25
Q

What is a table?

A

A Table is the collection of records of specific types. For Example, the Employee table is a collection of records related to all the employees.