Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
11 views

Unit 1. Presentation. Getting Started With Databases

tema 1 de base de datos de FP superior DAm

Uploaded by

cgandulduque
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Unit 1. Presentation. Getting Started With Databases

tema 1 de base de datos de FP superior DAm

Uploaded by

cgandulduque
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Unit 1

Getting start with Databases


We have a challenge
In this unit we are going to do an introduction of
Database concepts.

Don’t worry if you don’t understand all the concepts


perfectly, some of them are very abstract.

Try to understand the main ideas and little by little you


are going to understand them.
1. Databases
1. Databases
A database is an organized collection of structured
information, or data, typically stored electronically in a
computer system.

The applications use the data stored in the database.

The purpose of DataBase is:


to store data.
to provide an organizational structure for data.
to provide a mechanism for querying, creating,
modifying and deleting data. There is an important
acronym in DataBases: CRUD (Create, Read, Update,
Delete, the four basic operations that we can use when
interacting with data).
2. Database Management Systems (DBMS)
2. Database Management System (DBMS)
Database management system (DBMS) is a special kind of software program
which controls and manages the operations of the database.
The DBMS interacts with the database but it is not itself the database.
A DBMS serves as an interface between the database and its end users or programs,
allowing users to retrieve, update, and manage how the information is organized.
Users in a DBMS environment
The following classification, is the different categories of users of a DBMS system:

Users Task
Application Programmers The Application programmers write programs in various programming
languages to interact with databases.
Database Administrators Database Admin is responsible for managing the entire DBMS system.
He/She is called Database admin or DBA.
End-Users The end users are the people who interact with the database management
system.
Functions of a
Create databases.
Read database data.

DBMS
Modify database data (insert, update, delete).
Create and maintain database structures.
Provide data security. Data breaches are happening
everywhere these days, and hackers are getting more
inventive. It’s more important than ever to ensure that
data is secure but also easily accessible to users. Security
management sets rules that determine specific users who
are allowed to access the database.
Multi-access control. It enables multiple users to access
the database simultaneously without affecting the
integrity of the database.
Perform data backup and recovery data if something was
wrong.
Examples of
popular DBMs
MySQL
Oracle Database
MariaDb
SQLite
Microsoft Access
Microsoft SQL Server
Etc.
3. DatabasesTypes of Databases depending on the model
3. Types of Databases depending on the model
A Database model determines the logical structure of a database and how the data can
be stored, organized and manipulated.
The main four types of Databases depending on the model are:
Hierarchical database.
Network database.
Relational database.
Object-Oriented database.

These types of databases are ordered chronologically.


During this course we are going to study mainly Relational Databases which are the
most widely used.
Hierarchical database
The hierarchical model was developed by
IBM in the 1960s.

In a Hierarchical database, model data is


organized in a tree-like structure.

Data is represented using a parent-child


relationship.

In Hierarchical DBMS parents may have


many children, but children have only one
parent.

In this picture, you can see an example of


Hierarchical Model.

We can represent the relationship between the


shoes presented on a shopping website in the
following way:
Network database
The network model was developed in the
1960s too by an organization named
Conference on Data Systems Languages
(CODASYL).

The network database differed from the


hierarchical model in that it allows each child
to have multiple parents.

In this model, entities are organized in a


graph.

In the example, we can see that node student


has two parents i.e. CSE Department and
Library. This was not possible in the
hierarchical model.
Relational database
The relational database was born in the 1970s and it became dominant in the 1980s.

It is the most widely used DBMS model because it is one of the easiest.

This model is based on organizing data in rows and columns of a table.

In the Relational Model, items are organized as a set of tables with columns and rows.

Tables can be relationed each other.

Relational database technology provides the most efficient and flexible way to access structured
information.
Relational database
Relational database
In the picture, you can see two different tables (Employee and Department) with different columns
and rows. In this example, we are going to introduce two important concepts:

Primary key (PK)


A primary key is a special table column (or combination of columns) designated uniquely to
identify each row.

Primary key’s main features are:


It must contain an unique value for each row of data.
It cannot contain null values.

The column Empno is the primary key of the Employee table and the column Deptno is the
primary key of the Department table.
Relational database
In the picture, you can see two different tables (Employee and Department) with different columns
and rows. In this example, we are going to introduce two important concepts:

Foreign key (FK)


As you can see in the picture there is a relationship between the two tables. This relationship is
implemented by the foreign key.

A foreign key is a column (or collection of columns) in one table that refers to the primary key
in another table. It means that a foreign key provides a link between data in two tables.

For any column acting as a foreign key, a corresponding value should exist in the linked table.

The column Deptno in the Employee table is a foreign key to the Department table. The set of
possible values of this column is {10,20, 30}.
SQL
SQL (Structured Query Language) is the most
common language for extracting and
organising data that is stored in a relational
database. During this course we are going to
spend a lot of time learning it.

SQL has sentences for querying, creating,


modifying and deleting data. In the table
below you can see some examples of SQL
sentences.
Object-Oriented Database
In an Object-oriented Model, data is stored in
the form of objects. The database is defined
like a collection of objects which stores both
data members values (attributes) and
operations (methods).

An object is an abstract concept of the


programming languages, don’t worry if you
don’t understand this concept perfectly now.
4. Other types of Databases
Centralised Database
Information (data) is stored at a centralized
location and the users from different locations can
access this data.
Distributed Database
In opposition to the centralized database
concept, we find the Distributed Database. In
the Distributed Database, the data is not at
one place, but it is distributed at various sites
of an organization. These sites are connected
to each other through communication links
which helps them to access the distributed
data easily.

In a Distributed Database, there must be


coordination between the different sites which
store and manage data.
Cloud databases
A cloud database is a collection of data, either structured or unstructured data, that resides on a cloud
computing platform.

Non-relational databases (also named NoSQL databases)


They are different from traditional relational databases in the sense that they store their data in a non-
tabular form. Instead, non-relational databases might be based on data structures like documents.

Nowadays, the most popular non-relational database is MongoDB.


Non-relational databases (also named
NoSQL databases)

In this picture, you can see an example of a JSON


document, which is the base of MongoDB
databases.
The end
of
Unit 1
Unit 1, ACHIEVED Do you want to know
more?

We can do the exercises Work with your class


partners

You might also like