Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

AWS Notes by Quality Thoughts

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

AWS

Databases in an Enterprise

Topic-1.
What is Database
1. Database is generally used to store the
organized data i.e. master and
transactional records of an application.
2.Data present in the databases is referred
as structure data as we can query it.
3. Database is controlled by Data Base
Management System(DBMS).
4. Types of Databases
1. Relational Databases
2. NoSQL Databases
3. Cache-Database
Topic-2
Relational Databases

1. The data is stored in the tabular format.


Each row represents a record. The
structure of the table often referred as
schema is fixed.
2. To insert, update, delete, query the data
we have a language which is referred as
SQL (Structured Query Language)
3. Database Engines to use Relational
Database are
 Oracle
 Microsoft SQL Server
 mySql
 Postgresql
 IBM DB2
Traditional Setup in an enterprise

Steps required are


1. Create a server (physical/virtual)
with some os
2. install the DB engine with some
version
3. Create a Database
4. Connect from application
Maintenance: Generally done by DBA
 Backup of the data
 Replicate the data to another db server
(for high availability)
 Tuning the database queries for
performance

What is SQL?

Answer: Structured Query language, SQL


is an ANSI(American National Standard
Institute) standard programming language
that is designed specifically for storing and
managing the data in the relational
database management system (RDBMS)
using all kinds of data operations.
How many SQL statements are used?
Define them.

Answer: SQL statements are basically


divided into three categories, DDL, DML,
and DCL.

They can be defined as:

 Data Definition Language (DDL)


  commands are used to define the
structure that holds the data. These
commands are auto-committed i.e.
changes done by the DDL commands
on the database are saved permanently.

 Data Manipulation Language


(DML) 
 commands are used to manipulate the
data of the database. These commands
are not auto-committed and can be
rolled back.
 Data Control Language (DCL)
  commands are used to control the
visibility of the data in the database like
revoke access permission for using data
in the database.
Enlist some commands of DDL, DML,
and DCL.

Answer: Data Definition Language


(DDL) commands:

 CREATE to create a new table or


database.
 ALTER for alteration.
 TRUNCATE to delete data from the
table.
 DROP to drop a table.
 RENAME to rename a table.
Data Manipulation Language (DML)
commands:
 INSERT to insert a new row.
 UPDATE to update an existing row.
 DELETE to delete a row.
 MERGE for merging two rows or two
tables.
Data Control Language (DCL)
commands:

 COMMIT to permanently save.


 ROLLBACK to undo the change.
 SAVEPOINT to save temporarily.
 Define DML Compiler.
 Answer: DML compiler translates
DML statements in a query language
into a low-level instruction and the
generated instruction can be understood
by Query Evaluation Engine.

What is DDL interpreter?

Answer: DDL Interpreter interprets the


DDL statements and records the generated
statements in the table containing
metadata.

Q #15) Enlist the advantages of SQL.

Answer: Advantages of SQL are:

 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.

2. NoSQL Databases:
 This is a broad category that includes a
database that doesn’t use SQL as its
primary access language.
 NoSQL database doesn’t have to
confirm to pre-defined schema.
 This is popular for organizations
dealing with semi-structured or
unstructured data.
Examples:
Mongo DB
Apache Cassandra
 The database types that can be derived
from NoSQL are
Key-Value
Document Database
Graph Database.
 Data WareHouse:
These type of databases
generally deal with large data
stores and OLAP/OLTP
Examples:
Terradata
Informatica
3.Cache Databases
 All the databases discussed above store
the data on the disk. Disk is not a very
high speed device, There might be
some information of your application
which does not change frequently.
RAM is a faster device than disk, If we
can store the data in the RAM and
when application queries if this
infrequently changed data is returned
from RAM the application
performance increases. Databases
which can do this are called Cache-
Databases. Examples
 Redis
 Memcached.
Database as a Service
 Generally when we use Database as a
Service (i.e. cloud databases), CSP like
AWS
1. will support only few database engines
not all.
2. Will support only fewer versions
(generally latest)
3. Will give users the option to directly
create database (no need to install)
4. Will give options for easier backups and
restores (one-click)
5. Will give easier options for replications
across datacenters (one-click)
6. Charges will be applied based on the
size of the engine, DB Engine used.
(Hourly charges)

 AWS offers Database as a Service for


many different database types

Machine Setup For AWS
 Refer Here
 Any Windows 10 users Refer Here
 Mac:
 Install Homebrew Refer Here
 Install git brew install git
 visual studio code Refer Here brew
install --cask visual-studio-code
 AWS Free tier cloud account
creation Refer Here

You might also like