Databases Flashcards
What are the components of a database?
Hardware (server)
software (mySQl or RDS)
data
procedure
database access language(sql)
What are the different types of databases and their distinctions?
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
When would you use SQL vs NoSQL
SQL- transaction orientated systems. Storing students infomation of a school
NoSQL - unstructured data like a social media post
What is ETL?
- 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.
Compare a data warehouse and an Online Transaction Processing database
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.
What is DB tuning?
Optimizing the performance of a database
minimise bottle necks
keeps query times as short as possible
How would you provide high availability for a database deployed on an instance in the cloud?
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
What can’t you horizontally scale a sql db
Because when you have tables split across the different cluster nodes, joins usually become very inefficient.
Why do we use indexes?
Indexes contain all the necessary information needed to access items quickly and efficiently.
What is the port number for DNS?
53
What is the port number for http?
80
What is the port number for https?
443
What is the port number for telnet?
23
What is a dbms
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.
What do you understand by Data Redundancy?
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.