RSDB En-Us SG M06 Databasesintro
RSDB En-Us SG M06 Databasesintro
Database Fundamentals
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Country table
Code Name Continent Region
ARG Argentina South America South America
AUS Australia Oceania Australia and New Zealand
3 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data is raw bits and pieces of information. The bits of information that make up
images, words, and phone numbers that you see on mobile phones or computer
monitors are examples of data.
A database is a collection of bits of data that is organized into files, which are called
tables. Tables are a logical way of accessing, managing, and updating data.
In a database, data can also appear in other formats, such as figures, graphics,
images, and audio-video recordings.
Data models
4 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
A data model represents the logical design and structure of a database. Data models
are used to determine how data can be stored and organized. Relational, semi-
structured, entity relationship, and object-based are all data model types. This course
focuses mainly on the relational data model.
Relational model
country
Field (table)
World
(column)
(database)
5 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The relational model is a data model that Dr. Edgar F. Codd, a mathematician at IBM,
developed in the late 1960s. Codd developed it to improve handling of large amounts
of data. The relational model is based on a mathematical domain that is called
relational algebra.
This slide provides an example of a relational model. Looking at the model, start with
the database that is named World. Inside the World database is a table. Tables are
used to hold information about the objects to be represented in the database. The
country table can have multiple records (which are also known as rows) and fields
(which are also known as columns). Each row is a set of values for the columns of the
table. In this example, each record or row contains information about a country. This
table contains the country code, the country name, the country’s continent name,
and the country’s region name.
Region District
6 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
7 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Databases can operate on a small scale. They might run on one computer and
support a single user.
Other databases are distributed across multiple systems and locations across a
company’s network, or they can be cloud-based databases that support millions of
users.
Relational databases
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• A relational database is a collection of data items that have predefined relationships between them.
9 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Ecommerce
• Customer relationship management (CRM):
Managing interactions with customers
• Business intelligence (BI) tools: Finance reporting
and data analysis
10 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Relational databases are popular and continue to be used because they provide many
benefits. For example, they support SQL, a language that is relatively simple to learn
and get started with to query the data in a relational database. Also, a relational
database provides features to protect the integrity of the data that you store. For
example, each column attribute in a table is defined to hold only a certain type of
data. If you attempt the enter a value that is of a different data type, the database
will not allow it.
Relational database examples
11 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In relational databases, tables are used to hold information about the objects to be
represented in the database. Each table is organized in columns and rows. Each
column (or field) holds a special type of data, such as numbers, strings, or dates. Each
row is a set of values for the columns of the table. Each row in a table can also be
marked with a unique identifier, which is called a primary key. Rows among multiple
tables can become related by using foreign keys.
Can you identify how the first table can relate to the second table? The tables can be
related by the CountryCode field.
These related fields can link multiple tables and are called primary keys and foreign
keys.
Nonrelational databases
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• A nonrelational database is a database that does not follow the relational model.
• An nonrelational database does not require a fixed definition of the structure of the data.
• A nonrelational database, which is often referred to as a NoSQL database, is a database that does
not use a table structure to store data.
13 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
14 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In a relational database, objects are broken down into multiple tables (customers,
orders, and more) by using a fixed schema. With a nonrelational database, objects
are stored instead with flexible schemas with no constraints, or as documents in
JSON or XML formats.
NoSQL databases use various data models for accessing and managing data. These
types of databases are optimized specifically for applications that require large data
volumes, low latency, and flexible data models. These requirements are achieved by
relaxing some of the restrictions around data consistency that other databases use.
Pros and cons of relational and nonrelational databases
15 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
This slide shows the pros and cons of using relational (SQL) databases.
DBMS
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
17 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do you store and manage data in a database? You use a DBMS.
If you want to avoid the cost of installing and maintaining the servers that your
database uses, use a DBaaS service. A DBaaS manages the infrastructure to support
your database so that you can focus on designing, creating, and maintaining the data
in your database.
DBMS basics (2 of 2)
Locations
On-premises (data center): Data is stored on In the cloud (virtualized data center): Data is
computers and networks that the organization located outside the organization, such as in remote
owns. These computers and networks are located data centers that are owned by cloud providers
in the organization's own data center. such as Amazon Web Services (AWS).
18 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
With DBaaS, the DMBS is in the cloud in a virtualized data center. The company needs
to pay for only the database-related cloud resources that they use.
DBaaS
19 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
With DBaaS, database servers are hosted in third-party data centers. They are
accessed over the internet (the cloud) instead of being hosted on local networks.
DBaaS examples
Amazon RDS manages common A part of Amazon RDS, Aurora DynamoDB is a fully
relational database is a fully managed relational managed NoSQL database
administrative tasks. database engine. service.
20 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Relational Database Service (Amazon RDS) is a web service that facilitates
setting up, operating, and scaling a relational database in the cloud. It provides cost-
efficient, resizable capacity for an industry-standard relational database and manages
common database administration tasks.
Amazon Aurora is a fully managed relational database engine that is compatible with
MySQL and PostgreSQL. Aurora is part of the managed database service Amazon RDS.
Amazon DynamoDB is a fully managed NoSQL database service. You can use
DynamoDB to create a database table that stores and retrieves any amount of data
and serves any level of request traffic. DynamoDB automatically spreads the table’s
data and traffic over a sufficient number of servers to handle the request capacity
that the customer specifies. It can handle the amount of data that is stored while
maintaining consistent and fast performance.
Checkpoint questions
21 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
A relational database.
Any one of the following answers is correct: data, data models, schema, and small
scale or distributed.
Key takeaways • A relational database, which is often referred to as a SQL
database, provides the ability for data to be spread across
multiple tables.
22 © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022 Amazon Web Services, Inc. or its affiliates. All rights reserved. This work may not be reproduced or redistributed, in whole or in part, without prior written permission from Amazon Web Services, Inc.
Commercial copying, lending, or selling is prohibited. Corrections, feedback, or other questions? Contact us at https://support.aws.amazon.com/#/contacts/aws-training. All trademarks are the property of their
owners.