0% found this document useful (0 votes)
20 views

A Database or Data Bank

The document talks about databases. Explains that a database is a set of data systematically stored for later use. Furthermore, it describes that currently most databases are in digital format and that there are programs called DBMS that allow data to be stored and accessed in a structured way. Finally, mention that although databases can contain many types of data, some are protected by data privacy laws.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

A Database or Data Bank

The document talks about databases. Explains that a database is a set of data systematically stored for later use. Furthermore, it describes that currently most databases are in digital format and that there are programs called DBMS that allow data to be stored and accessed in a structured way. Finally, mention that although databases can contain many types of data, some are protected by data privacy laws.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 89

A database or data bank (sometimes abbreviated with the acronym BD or with the

abbreviation b. d. ) is a set of data belonging to the same context and


systematically stored for later use. In this sense, a library can be considered a
database composed mostly of documents and texts printed on paper and indexed
for consultation. Currently, and due to the technological development of fields such
as computing and electronics , most databases are in digital (electronic) format,
which offers a wide range of solutions to the problem of storing data.

There are programs called database management systems , abbreviated SGBD,


that allow you to store and later access data in a quick and structured way. The
properties of these DBMSs, as well as their use and administration, are studied
within the field of computing.

The most common applications are for the management of companies and public
institutions. They are also widely used in scientific environments in order to store
experimental information.

Although databases can contain many types of data, some of them are protected
by the laws of various countries. For example, in Spain personal data is protected
by the Organic Law on the Protection of Personal Data (LOPD).

Content

[ disguise ]

 1 Types of database
o 1.1 Depending on the variability of the stored data
 1.1.1 Static databases
 1.1.2 Dynamic databases
o 1.2 According to the content
 1.2.1 Bibliographic databases
 1.2.2 Full text databases
 1.2.3 Directories
 1.2.4 Databases or "libraries" of chemical or biological
information
 2 Database models
o 2.1 Hierarchical databases
o 2.2 Network database
o 2.3 Transactional databases
o 2.4 Relational databases
o 2.5 Multidimensional databases
o 2.6 Object-oriented databases
o 2.7 Documentary databases
o 2.8 Deductive databases
 2.8.1 Language
 2.8.2 Advantages
2.8.3 Disadvantages

2.8.4 Phases

2.8.5 Interpretation

2.8.6 Mechanisms

o 2.9 Distributed Database Management (DBMS)
 3 See also

Database Types

Databases can be classified in several ways, according to the context being


managed, their usefulness or the needs they satisfy.

Depending on the variability of the stored data

Static databases

They are read-only databases, used primarily to store historical data that can later
be used to study the behavior of a set of data over time, make projections , make
decisions , and perform data analysis for business intelligence .

Dynamic databases

These are databases where the stored information is modified over time, allowing
operations such as updating, deleting and adding data, in addition to fundamental
query operations. An example of this may be the database used in an information
system of a supermarket, a pharmacy, a video store or a company.

According to the content

Bibliographic databases

They only contain a surrogate (representative) of the primary source, which allows
it to be located. A typical record in a bibliographic database contains information
about the author, publication date, publisher, title, edition, of a given publication,
etc. It may contain a summary or extract of the original publication, but never the
full text, because otherwise we would be in the presence of a full-text database (or
primary sources - see below). As its name indicates, the content is figures or
numbers. For example, a collection of laboratory analysis results, among others.

Full text databases

They store primary sources, such as all the content of all editions of a collection of
scientific journals.

Directories
One example are the phones guides in electronic format.

Databases or "libraries" of chemical or biological information

They are databases that store different types of information from chemistry , life
sciences or medicine . They can be considered in several subtypes:

 Those that store nucleotide or protein sequences.


 The databases of metabolic pathways.
 Structure databases, comprising records of experimental data on 3D
structures of biomolecules.
 Clinical databases.
 Bibliographic databases (biological, chemical, medical and other fields):
PubChem , Medline , EBSCOhost .

Database models

In addition to classification by database function, they can also be classified


according to their data management model.

A data model is basically a "description" of something known as a data container


(something where information is stored), as well as the methods for storing and
retrieving information from those containers. Data models are not physical things:
they are abstractions that allow the implementation of an efficient database
system; They generally refer to algorithms and mathematical concepts.

Some models frequently used in databases:

Hierarchical databases

Main article: Hierarchical database .

In this model the data is organized in a way similar to a tree (seen in reverse),
where a parent information node can have several children . The node that has no
parents is called the root , and the nodes that have no children are known as
leaves .

Hierarchical databases are especially useful in the case of applications that handle
a large volume of information and highly shared data, allowing the creation of
stable and high-performance structures.

One of the main limitations of this model is its inability to efficiently represent data
redundancy.

Network database
Main article: Network database .

This is a slightly different model from the hierarchical one; Its fundamental
difference is the modification of the node concept: the same node is allowed to
have several parents (a possibility not allowed in the hierarchical model).

It was a great improvement over the hierarchical model, as it offered an efficient


solution to the data redundancy problem; But even so, the difficulty of managing
information in a network database has meant that it is a model used mostly by
programmers rather than end users.

Transactional databases

They are databases whose sole purpose is to send and receive data at high
speeds. These databases are very rare and are generally aimed at the quality
analysis environment, production and industrial data. It is important to understand
that their sole purpose is to collect and recover data at the highest speed possible,
therefore redundancy and duplication of information is not a problem as with other
databases, generally in order to make the most of them they allow some type of
connectivity to databases relational.

A common example of a transaction is the transfer of an amount of money


between bank accounts. It is normally carried out through two different operations,
one in which the balance of the source account is decreased and another in which
we increase the balance of the destination account. To guarantee the atomicity of
the system (that is, so that no money appears or disappears), the two operations
must be atomic, that is, the system must guarantee that, under any circumstances
(even a system crash), the final result is that either the two operations have been
carried out, or neither has been carried out.

Relational databases

Main article: Relational model .


Main article: Relational database .

This is the model currently used to model real problems and manage data
dynamically. After its foundations were postulated in 1970 by Edgar Frank Codd ,
from the IBM laboratories in San José (California) , it did not take long to
consolidate itself as a new paradigm in database models. Its fundamental idea is
the use of "relations". These relationships could logically be considered as sets of
data called " tuples ." Although this is the theory of relational databases created by
Codd, most of the time it is conceptualized in a way that is easier to imagine. This
is thinking of each relationship as if it were a table that is composed of records (the
rows of a table), which would represent the tuples, and fields (the columns of a
table).
In this model, where and how data is stored is irrelevant (unlike other models such
as hierarchical and network). This has the considerable advantage of being easier
for a casual user of the database to understand and use. Information can be
retrieved or stored using "queries" that offer extensive flexibility and power to
manage information.

The most common language to build queries to relational databases is SQL ,


Structured Query Language , a standard implemented by the main relational
database management engines or systems.

During its design, a relational database goes through a process known as


database normalization .

During the 1980s, the appearance of dBASE produced a revolution in


programming languages and data management systems. Although it should never
be forgotten that dBase did not use SQL as the base language for its management.

Multidimensional databases

Main article: Multidimensional database .

They are databases designed to develop very specific applications, such as


creating OLAP Cubes . Basically they are not too different from relational
databases (a table in a relational database could also be a table in a
multidimensional database), the difference is more at a conceptual level; In
multidimensional databases, the fields or attributes of a table can be of two types:
either they represent dimensions of the table, or they represent metrics that you
want to study.

Object database

Main article: Object-oriented database .

This model, quite recent, and typical of object-oriented computer models , tries to
store complete objects (state and behavior) in the database.

An object-oriented database is a database that incorporates all the important


concepts of the object paradigm:

 Encapsulation - Property that allows information to be hidden from the rest


of the objects, thus preventing incorrect access or conflicts.
 Inheritance - Property through which objects inherit behavior within a class
hierarchy.
 Polymorphism - Property of an operation by which it can be applied to
different types of objects.
In object-oriented databases, users can define operations on data as part of the
database definition. An operation (called a function) is specified in two parts. The
interface (or signature) of an operation includes the name of the operation and the
data types of its arguments (or parameters). The implementation (or method) of the
operation is specified separately and can be modified without affecting the
interface. User application programs can operate on data by invoking those
operations through their names and arguments, regardless of how they are
implemented. This could be called independence between programs and
operations.

SQL:2003 , is the expanded SQL92 standard, supports object-oriented concepts


and maintains compatibility with SQL92.

Documentary databases

They allow full-text indexing, and generally perform more powerful searches.
Tesaurus is an index system optimized for this type of databases.

Deductive databases

A deductive database system is a database system but with the difference that it
allows deductions to be made through inferences. It is mainly based on rules and
facts that are stored in the database. Deductive databases are also called logical
databases, because they are based on mathematical logic. This type of database
arises due to the limitations of the Relational Database in responding to recursive
queries and deducing indirect relationships from the data stored in the database.

Language

It uses a subset of the Prolog language called Datalog which is declarative and
allows the computer to make inferences to answer queries based on stored facts
and rules.

Advantages

 Use of logical rules to express queries.


 Allows you to answer recursive queries.
 Has stratified denials
 Ability to obtain new information through that already stored in the database
through inference.
 Use of query optimization algorithms.
 Supports complex objects and sets.

Disadvantages

 Create effective deduction procedures to avoid falling into infinite loops.


 Find criteria that decide the use of a law as a deduction rule.
 Rethink common database conventions.

Phases

 Interrogation Phase: is responsible for searching the database for implicitly


deducible information. The rules in this phase are called derivation rules.
 Modification Phase: is responsible for adding new deductible information to
the database. The rules in this phase are called generation rules.

Interpretation

We find two theories of interpretation of deductive databases:

 Proof Theory: we consider rules and facts as axioms.

Facts are base axioms that are considered true and do not contain variables. Rules
are deductive axioms since they are used to deduce new facts.

 Model Theory: an interpretation is called a model when for a specific set of


rules, they always hold for that interpretation. It consists of assigning to a
predicate all the combinations of values and arguments of a given domain of
constant values. Next we must verify whether that predicate is true or false.

Mechanisms

There are two inference mechanisms:

 Ascending: where you start from the facts and obtain new ones by applying
inference rules.
 Descending: where we start from the predicate (objective of the query
carried out) and try to find similarities between the variables that lead us to
correct facts stored in the database.

Distributed Database Management (DBMS)

The database and DBMS software may be distributed across multiple sites
connected by a network. There are two types:

1. Homogeneous distributed: they use the same DBMS in multiple sites.

2. Heterogeneous distributed: Gives rise to federated DBMSs or multi-database


systems in which the participating DBMSs have a certain degree of local autonomy
and have access to several pre-existing autonomous databases stored in the
DBMSs, many of these employ a client architecture. -server.
These arise due to the physical existence of decentralized organizations. This
gives them the ability to join the databases of each location and thus access
different universities, store branches, etc.

See also

 Database management system


 Relational model , database normalization
 Object-oriented database
 Data warehouse
 Data mining
 Biological database
 Probabilistic database

DesarrolloWeb.com > Manuals > Introduction to programming manual

A Database Management System (DBMS) or DBMA (DataBase


Management System) is a collection of programs whose objective is to serve as an
interface between the database, the user and the applications. It consists of a data
definition language, a data manipulation language, and a query language. A DBMS
allows you to define data at different levels of abstraction and manipulate said
data, guaranteeing its security and integrity.

Some examples of DBMS are Oracle, DB2, PostgreSQL, MySQL, MS SQL Server,
etc.

A DBMS must allow:


• Define a database: specify data types, structures, and restrictions.
• Build the database: save the data in some medium controlled by the DBMS itself
• Manipulate the database: perform queries, update it, generate reports.

The characteristics of a DBMS Database Management System are:


• Information abstraction. DBMSs spare users details about the physical storage of
data. It does not matter if a database occupies one or hundreds of files, this fact is
made transparent to the user. Thus, several levels of abstraction are defined.
• Independence. Data independence is the ability to modify the schema (physical
or logical) of a database without having to make changes to the applications that
use it.
• Minimum redundancy. A good database design will avoid the appearance of
repeated or redundant information. From the outset, the ideal is to achieve zero
redundancy; However, in some cases the complexity of the calculations makes the
appearance of redundancies necessary.
• Consistency. In those cases in which this zero redundancy has not been
achieved, it will be necessary to ensure that the information that appears repeated
is updated coherently, that is, that all the repeated data are updated
simultaneously.
• Security. The information stored in a database can have great value. DBMSs
must guarantee that this information is secured against malicious users who try to
read privileged information; against attacks that wish to manipulate or destroy
information; or simply due to the clumsiness of some authorized but clueless user.
Normally, DBMSs have a complex system of permissions for users and user
groups, which allow various categories of permissions to be granted.
• Integrity. It is about adopting the necessary measures to guarantee the validity of
the stored data. That is, it is about protecting data against hardware failures, data
entered by careless users, or any other circumstance capable of corrupting the
stored information.
• Backup and recovery. DBMSs must provide an efficient way to make backup
copies of the information stored in them, and to restore from these copies any data
that may have been lost.
• Control of attendance. In most environments (except perhaps the home), the
most common thing is that many people access a database, either to retrieve
information or to store it. And it is also common for these accesses to be carried
out simultaneously. Therefore, a DBMS must control this concurrent access to
information, which could lead to inconsistencies.

The database manager

It is a set of programs not visible to the end user that are responsible for privacy, integrity,
data security and interaction with the operating system. It provides an interface between
data, the programs that handle it, and end users.
Any operation that the user does against the database is controlled by the manager.

The manager stores a description of data in what we call a data dictionary, as well as
allowed users and permissions.
There must be an administrator user in charge of centralizing all these tasks.

Data Dictionary

It is a database where all the properties of the database, structure description, relationships
between data, etc. are stored.
The dictionary must contain:

 The external, conceptual and internal description of the database


 Restrictions on data
 Access to data
 User account descriptions
 User permissions
 The external schematics of each program
The database administrator

It is a person or group of people responsible for controlling the database management


system.
The main tasks of an administrator are:

 The definition of the logical and physical schema of the database


 Defining user views
 Assigning and editing permissions for users
 Database security maintenance and monitoring
 General maintenance of the database management system

The languages

A database management system must provide a series of languages for the definition and
manipulation of the database. These languages are the following:

 Data Definition Language (DDL). To define database schemas


 Data Manipulation Language (DML). To manipulate database data
 Data Control Language (DCL). For user administration and database security.
 A database can be defined, as a file is saved in fields or delimiters, for example, we
can store the first and last name of people separately, in this way it is possible to
obtain all the first names or all the last names from the file. , both separately and
jointly.
Normally the number of fields in a database varies according to the needs in terms
of data management, so that the information can later be exploited in an orderly and
separate manner, although the rest of the information continues to be stored and
saved in the database. of data

 A database is not only the file where the data is, but in said file is the structure of
the data, that is, to know what length it has to contain everything from letters to
numbers or even other more complex data, depending on the structure of the base
and the management system.

 In reality, apart from the data that is stored in the file, there is also a series of data,
in which the type of field, the fields and the length of each field are reported, this is
what is called a data manager, which allows know that each record (a record is a
sum of fields, for example to Ana LOPEZ LOPEZ, Ana we store in the Name field
and LOPEZ LOPEZ in the Surname field, each record is each person that we store
in the base, that is, a person is a record and each record is made up of the fields
Name and Last Name

 A Database System (DBS) is a series of resources to manage large volumes of
information, however not all systems that manage information are databases.

 A database system must respond to the following characteristics:

==== ~- Data Independence. That is, the data does not depend on the program and
therefore any application can use the data.

 ~- Reduction of Redundancy. We call redundancy the existence of data duplication,


by reducing this to the maximum we achieve greater use of space and also prevent
inconsistencies between the data. Inconsistencies occur when we find contradictory
data.

 ~- Security. An SBD must allow us to have control over the security of the data.
====

2. Database
3. Components of a Database
4. Types of Users in Database
5. Database Basics
6. Abstraction Levels in Database
7. DBMS
8. Data Integrity
9.
10. Data recovery
11. Mirror or Mirror
12. Data Security
13. Control and Administration of Resources
14. Database operations lifecycle
15. Database Design
16. Entity – Relationship Model
17. Exercises

It is a system that stores data that is related.

It is a repository where we keep integrated information that we can store and retrieve.

 A set of information stored in auxiliary memory that allows direct access and a set
of programs that manipulate that data
Components of a Database:

 Hardware: consisting of a storage device such as disks, drums, tapes, etc.



 Software: which is the DBMS or Database Management System.

 Data: which are stored according to the external structure and will be processed to
become information.

Types of Users in Database

 End User: is the person who uses the data, this person sees data converted into
information:
 Application Developer: is the person who develops the systems that interact with
the Database.
 DBA: is the person who ensures integrity, consistency, redundancy, security. This is
the Database Administrator who is in charge of carrying out daily or periodic
maintenance of the data.

People who have DBMS access are classified as follows:

NAIVE USERS. – They are those that interact with the system through permanent
applications.

SOPHISTICATED USERS - are those with the ability to access information through query
languages.
APPLICATION PROGRAMMERS - are those with extensive knowledge of DML capable
of generating new modules or utilities capable of handling new data in the system.

SPECIALIZED USERS - are those who develop modules that do not refer precisely to data
management, but rather to advanced applications such as expert systems, image
recognition, audio processing and others.

Basic Database Concepts

 File: These are sets of records .



 Records: are sets of fields.

 Fields: it is the minimum reference unit.

Abstraction Levels in Database

External: that is the vision of the end user, it is seen how the data already converted into
information is handled.
It is the one in which it is presented to the end user and that allows combinations or
relationships between the data that make up the global database. It can be defined as the
way in which the user appreciates information and its relationships.

Conceptual: you see how the Database is structured, field teams have how the records are
structured.

It is the one in which the logical storage structures and the relationships that will exist
between them are defined. Common examples of this level are the design of records and
links that will allow the connection between records of the same file , of different files ,
even links to files.

Internal: it shows how the data is physically stored.

It is the one in which the storage characteristics in the secondary medium are determined.
Designers at this level have extensive knowledge of technical issues and hardware
management. Many times it is chosen to maintain the physical level provided by the
operating system to facilitate and speed up development .

DBMS (Data Management System)

Database Management Systems are a very specific type of software , dedicated to serving
as an interface between databases and the applications that use it. It consists of a data
definition language , a data manipulation language, and a query language. In the texts that
deal with this topic, or related topics, the terms SGBD and DBMS are mentioned, both
being equivalent, and acronyms, respectively, of Database Management System and
DataBase Management System , its English expression.

Subsystem of a DBMS

DBMS Engine or Core: receives logical I/O requirements and converts them into read and
write operations .
Logical: are any type of query requiring reading with data entry (structure requirement) is
helped by the Operating System to convert these logical requirements into physical ones
that act on storage devices.

Definition tools: allows you to define and modify the structure of the Database, at this level
we define what is known as "Schema" which is the total definition of the Database, it is that
we define the structure of the table, the types of fields, the restrictions for the fields.

 Subschema: management of data views, external levels.



 Scheme: management of conceptual levels.

Processing Interface: it provides me with the facilities for updating, displaying and
visualizing data.

Application Development: allows me to generate an application, for example: form


generators, screen, code, case tools , etc.

Data Dictionary: this is the subsystem component with which the DBA interacts directly,
providing query levels and reports useful for their administration work . It is the description
of the Database structure and relationships between data and programs.

DBMS

Characteristics and Objects:

 Data Independence: the DBMS provides me with independence of my data vs. the
applications.
 Change in data does not imply change in programs and vice versa (Lower
maintenance cost).

 Minimize Redundancy (Repeated Data): waste of Storage Space.


Data independence is protecting our application program against changes in the data
structure and vice versa, whether in physical or logical form.

 Physical Independence: it is protection for application programs due to changes in


the file structure, with changes in the characteristics of the fields. Ex: change from
primary to secondary key.

 Logical Independence: protection of application programs when the scheme is
modified.

Redundancy , data repeated and distributed anywhere. The effect of redundancy is data
inconsistency and waste of storage space.

This occurs when data is unnecessarily repeated in the files that make up the database.

 Data Inconsistency: data that is in place with one value and found in another place
with another value. Ex: the client file is updated but the transaction file is not
updated.

It occurs when there is contradictory or incongruent information in the database.

Data Integrity

Integrity: set of safeguards that are used to keep data correct.

It occurs when uniform validation procedures for data do not exist throughout the system.

 Error Source: These error sources originate if the data entry program is not
validated. Ex: hardware failures, incomplete updates, software defects, invalid data
insertion, human errors.

One technique that the BDMS uses for an invalid data entry is validation.

Validation: is to protect the data, validate the data in the data entry. There are types of
validations:
 Data Type: it is if a field is defined as character or char and you cannot enter
integers.

 Data Value: if an integer value is defined, a range can be specified and cannot go
beyond that value.

 Key Values / Not Null: ensures unique records and whose values are not null.

 Referential Integrity: ensures the DBMS that no child records exist without their
corresponding parent records.

Concurrency Control or Simultaneity

It occurs in a multi-user environment , trying to access a data object at the same time .

It occurs when the system is multi-user and the appropriate controls are not established to
synchronize the processes that affect the database. It commonly refers to the little or no
effectiveness of blocking procedures.

Granularity: which is the size of the insured units. Ex: granularity can protect a field, a
record , a file, etc.

Dead-look (blocking): it is the technique that avoids concurrency errors, it occurs when a
circular wait develops between two transactions and each of these requests an update on the
same file, it does not allow other users the resource until it ends. the process , there is
circular waiting.

Data recovery
Recover data against the error sources mentioned above. Restoring the Database to its
normal state is the responsibility of the DBA, who is responsible for implementing error
detection and recovery procedures.

The DBA is the one who has centralized control of the database. This is intended to reduce
the number of people who have access to the technical and design details for the operation
of the DBMS.

The main solutions of a DBA are:

SCHEMA DEFINITION.- Creates the original database schema and generates the data
dictionary through DDL propositions.

DEFINITION OF STORAGE STRUCTURES AND ACCESS METHODS.- It is


responsible for generating and selecting structures for the secondary medium and defining
the methods of access to information, the latter through propositions in DML.

MODIFICATION OF SCHEMA AND ORGANIZATION.- It is a rare activity that


consists of redesigning the database schema. This would become necessary due to the
abrupt modification of the original conditions that gave rise to the design of the primary
scheme. The proposals to carry out this task are made in DDL.

GRANTING ACCESS AUTHORIZATIONS.- It is responsible for registering users to


allow their access to the DBMS. It assigns each of them a series of attributes that allow
them to enjoy privileges such as access to certain application areas, data or the use of
resources in the system.

SPECIFICATION OF INTEGRITY LIMITATIONS.- Creates a series of tables where the


set of restrictions that will be applicable during the update processes is specified.

To recover:

Backup : hard drive, tape.

 Hot backup: Database is operational.



 Cold backup: Database is not operational.

Mirror or Mirror
Log Files: (transaction record)

These are the daily transactions that are recorded in the Database. When a problem occurs,
the log files are used, a REVERSE is performed and the last transaction that was made can
also be recovered.

Data Security

They occur when it is not possible to establish access and security codes uniformly for the
entire system, thus facilitating access for intruders.

Data security can be defined in the following aspects:

 Object to secure: the first object to secure are the objects, programs and finally the
schema.
 Key Coding: the DBMS provides login security (username and password).
 Access Control: security is specified against indicated access aimed at unauthorized
persons.

Control and Administration of Resources

The DBMS must provide the DBA with all the mechanisms for control and management of
resources. So that the DBA with data integrity, error recovery and security implementation.

Establishing Relationships between Data

The BDMS must provide the resources for establishing relationships between the data,
which are the relationships: 1 -> 1, 1 -> n, n -> n

Database operations lifecycle

Stages :

 Project planning
 System Definition
 Collection and Analysis of Requirements
 Design of the topic base
 SGDB / DBMS selection
 Application Design
 Prototype
 Implementation
 Data Conversion and Loading
 Proof
 Maintenance

These stages are not strictly sequential, in fact some of the stages must be repeated several
times doing what is known as "Feedback Cycles" For example: problems found in the
Database Design stage may require additional requirements gathering and subsequent
analysis.

The database development life cycle consists of seven steps:

Analysis of needs

Viability study

Definition of requirements

Conceptual/logical design

Implementation

Evaluation and Maintenance

Project planning :

This stage involves planning how the life cycle stages can be carried out in the most
efficient way. There are three main components:

 The work to be carried out.


 The resources to carry it out.
 The money to pay for all of this.

System Definition

In this stage, the scope and indexes of the Database application are specified, as well as
what other systems it interacts with. You also have to determine who the users are and the
areas of the application.

Collection and Analysis of Requirements:


In this stage, the requirements of users and application areas are collected and analyzed.
This information can be collected in several ways:

 Interviewing the company 's personnel , specifically those who are considered
experts in the area in question.
 Observing the operation of the company .
 Examining documents , especially those that are used to collect or display
information.
 Using questionnaire to collect information from large groups of users.
 They use the experience acquired in the Design of similar Systems.

This stage results in a set of documents with the specifications of user requirements where
the operations carried out in the company are described from different points of view.

The development requirements involve the software and hardware necessary for
implementation, the necessary human resources (both internal and external), and staff
training.

Database Design:

In this stage, a conceptual schema of the database is created. Specifications are developed
to the point where implementation can begin. During this stage, detailed models of the user
views and especially the relationships between each element of the system are created,
documenting the use and manipulation rights of the different user groups.

If part of the information necessary to create an established element is already implemented


in another storage system, it is necessary to document the relationship that will exist
between one and the other and detail the systems that avoid duplication or inconsistency of
data.

The design consists, as seen previously, of three phases: the global or conceptual design,
the logical design and the physical model .

This stage consists of three phases: conceptual design, logical design, physical design of
the Database.

The first phase consists of the production of a conceptual scheme that is independent of all
physical considerations. This model is then refined into a

logical scheme eliminating constructions that cannot be represented in the chosen Database
model (relational, object-oriented, etc.). In the third

phase the logical schema that translates a physical schema for the chosen Database
management system. The physical design phase considers the structures of
storage and access methods necessary to provide efficient access to the Database in
secondary memory.

SGBD / DBMS selection:

If you do not have a Database Management System or it is obsolete, you must choose a
DBMS that is suitable for the information system in question.

Choice must be made at any time before logical design.

App Design:

In this stage of designing the application programs that will use and apply the Database,
this stage the design of the Database are parallel in most of

In some cases, the design of the applications cannot be finalized until the Database design
has been completed. On the other hand, the Database requires to support

to the applications so now a feedback from the design of the applications to the design of
the Database. At this stage you must ensure that

All functionality specified in the user requirements is found in the application design.

Prototype:

This optional stage is to build a prototype of the application that allows the designers and
the user to test the system, a prototype is a working model of the system applications. The
prototype does not have all the functionality of the final system but it is enough for users to
be able to use the system and identify which aspects are good, which are not adequate, as
well as being able to suggest improvements or the inclusion of new elements.

Implementation:

In this stage, the definitions of the Database are created at an external or internal conceptual
level, as well as the application programs. The implementation of the Database is carried
out through SQL statements. These statements are responsible for creating the database
system. , the files where the data and user views will be stored.

The application programs are implemented using third and fourth generation language,
parts of these applications are Database transactions that are also implemented using SQL
language. The statements of this language can be embedded in a host programming
language such as Visual Basic, Java , etc. All security and integrity controls are also
implemented at this stage.
Once the conceptual model is fully detailed, the physical implementation of the data model
begins. As the model progresses, the system administrator ensures the correctness of the
model and the validator ensures its usefulness .

Data Conversion and Loading:

This stage is necessary when replacing an old system with a new one. The data is loaded
from the old system to the new system directly or if necessary it is converted to the format
required by the new DBMS and then loaded. This stage is usually called "Migration".

Proof:

In this stage the system is tested and validated with the requirements specified by the users.
To do this, a test subject must be designed with real data that must be carried out in a
methodical and rigorous manner. If the testing phase is carried out correctly, it will discover
errors in the application programs and in the structure of the Database.

Maintenance:

Once the system is fully tested or implemented, it is launched. The system is now in the
maintenance phase in which the following tasks are carried out: monitoring of system
performance and maintenance, and updating of the system.

In this last stage, all users of the system access the database and must ensure its correct
functioning, that their rights are appropriate, and have all the information they need at their
disposal. They must also ensure that access to data is convenient, practical, secure and that
the possibilities of error have been eliminated, as far as possible.

The administrator ensures that all rights and restrictions have been implemented correctly
and that the style manual has been followed throughout the implementation

Entity – Relationship Model

 Modeling: it is the process by which we can identify the dynamic or static properties
of an application domain with a view to transforming it into a design interpretable in
a computerized system. It is the expression of user requirements in a program to be
able to implement it.

 Entity: is the object about which information is required to be maintained or stored.

 Relationship: is the significant and stable association between two entities
 Attribute: are the properties that describe and qualify an entity. Ex: Client entity
(name, surname, address, age, sex )

Entities are represented by boxes with the name of the entity in capital letters. Ex:

Relationships are represented with lines that connect the boxes of the entities. Ex:

Attributes are included within entity boxes and are written in lowercase letters. Ex:

Entities: Subjects, objects, events , places and abstractions can be considered entities.
Relationships: relationships have three properties or characteristics:

 Degree ò Cardinality: which is classified as:

 Optionality: it is the mandatory or optional participation in the entity of the


relationship.
 Legend: it is an expression that writes the role of each entity in the relationship.

How to read the Degree or Cardinality:

 One-to-many: an instance of entity A is related to one or more instances of entity B.

 Many-to-many: an instance of entity A is related to one or more instances of entity


B and an instance of entity B is related to one or more instances of entity B.

 One-to-one: an instance of entity A is related to one and only one instance of entity
B.
Recursive Relationship

An instance of an entity is associated with an instance of itself, it is optional at both ends,


that is, there is no mandatory character. Ex:

Attribute:

Attributes are used to identify, describe, qualify or express the state of an entity.

Every entity has an attribute or combination of attributes called "primary key" and which it
uses to differentiate each instance from the others.

Additionally, attributes can be mandatory or optional.

 The attributes that are part of the primary key are identified by prefixing them with
the number sign (#).
 Mandatory attributes are preceded by an asterisk (*).
 Optional attributes are preceded by a circle (o).

Example:

In an entity-relationship diagram you can also group entities into supertype and subtype.
 The supertype groups two or more subtype entities.
 Subtypes inherit the attributes of supertype entities.

 Each subtype can have its own relationships independent of the supertype.
 Subtypes are represented as boxes drawn inside the supertype box.

EXERCISES:

SAN JUAN BOAT COMPANY

San Juan is an agent that rents boats to clients for a certain fee. San Juan does not own
boats, instead renting them on behalf of owners who wish to earn income when their boats
are not in use. For this service, San Juan charges a fee and specializes in boats that can be
used for trips of several days or weeks.

The smallest boat is 28 feet long and the largest is 44. Each boat is fully equipped when
rented; Much of the equipment is provided by the owner, San Juan adds another part. The
equipment provided by the owner includes what is part of the boat such as: radio ,
compass , depth indicators . Other important instruments such as stoves and refrigerators.
Other implements provided by the owner are not installed as part of the boat such as sails,
ropes, anchors, rubber bags, life preservers, and in the cabin dishes, cutlery, kitchen
utensils, etc. San Juan provides consumer equipment that could be considered provisions,
books , soap, kitchen towels and similar items.

An important responsibility of San Juan is to record the equipment that is on the boat,
particularly what is not fixed to the boat.

San Juan prefers to keep accurate records of its clients and trips to have statistics of which
clients have gone and on what trip; Some itineraries are more dangerous than others, for
this reason San Juan would like to know which clients have certain experiences.

On some trips, clients request crew services and San Juan hires such people by the hour.

Boats need maintenance, San Juan includes precise services for all those maintenance
processes and costs including normal activities such as cleaning, oil changes or
unscheduled performances.

In some cases invitations are necessary during a trip, in which case customers communicate
by radio with the San Juan dispatcher who determines the best option to make the repair.
Therefore, in these decisions, dispatchers need information about their repair options and
background information on repair costs and quality .

ENTITIES:

 CUSTOMER
 OWNER
 BOAT
 EQUIPMENT
 JOURNEY
 MAINTENANCE
 REPAIR
 CREW
 TEAM_TIP
Videoclub

In a video store you need to keep information on around 3000 cassettes, each of the
cassettes is assigned a number for each movie, you need to know a title and category, for
example: comedy, suspense, drama, action , science fiction, etc. Some copies of many films
are kept. Each film is given an identification and track is kept of what each cassette
contains.

A cassette can come in various formats and a movie is recorded on a single cassette;
Frequently, movies are requested according to a specific actor. Tom Cruise and Demi More
are the most popular, which is why information must be maintained on the actors who
belong to each movie.

Not all movies feature famous artists; store customers like to know information such as the
actor's real name and date of birth.

In the store, information is kept only on the actors who appear in the films and that are
available. Videos are only rented to those who belong to the video club. To belong to the
club you must have good credit . For each member of the club, a file is maintained with
their name, telephone number and address , each member of the club is assigned a
membership number. It is desired to maintain information on all the cassettes that a client
rents. When a client rents a cassette, the name of the film, the date on which it was rented
and the date of return should be known.
ENTITY

 CUSTOMER
 FILMS
 PEL_TYPE
 ACTORS
 CASSETTE
 RENT

VANDALIC ACTS

A hotel chain has decided to put an end to customers who damage the hotel furniture . They
want to save in a database the clients who have damaged or stolen furniture and what the
furniture is.

In the database we will have information about each hotel ( code , address, telephone), as
well as a set of rooms identified with a unique identification number for each hotel and a
standard real estate number with a code, price description , for example: " Leather chair,
classic design, $43."

After making an inventory, all the hotel furniture is identified, that is, we know what and
how much furniture is in each room of each hotel.

The furniture can change rooms but we do not need to keep the old room. For each room
we will also keep if it is sunny, if it has a washing machine and if it has a refrigerator. Each
client has personal information ( identity card, name, etc.) and also a history of their acts of
vandalism. For each client we will keep which furniture and how much has been damaged.

We also want to know the stay that each client has made in the hotel, we will save in an
attribute the date of arrival and departure, as well as the date of the room in which they
stayed.

A client can stay in the same hotel room in different stays.

We want to know the acts of vandalism (what and how many pieces of furniture) that each
client has done as a whole, regardless of the room that was produced.

We want to know the acts of vandalism of each client in each room.

ENTITIES

 CUSTOMER
 HOTEL
 ROOM
 FURNITURE
 STAY
 CLIENT TYPE
 VANDAL_ACT
 ROOM_TYPE
 FURNITURE_TYPE
Proposed Exercises

The Institute The aim is to provide a school with computer resources


in order to automate its management .
Description
At the center, note booklets are used for each student, where they put
the notes corresponding to each evaluation of the subjects attended by the student
student. To do this, it is necessary to have a list of students who follow a subject and
a list of students who do not have a grade for a specific subject. I also know
He wants the list of grades given by a teacher .
In addition, each class has a teacher who acts as a tutor, a teacher
You can tutor several classes and teach several subjects in one class, but one
subject can only be taught by a teacher in a class. In each class, there are
also two representatives or delegates.
Results to consider
The system must answer the following questions:
1. Professor J. Pérez teaches English in 4th C (List of teacher destinations by
subject and class).
2. Q. Sánchez is a student in class 3o A (List of students by class).
3. Q. Rodríguez obtained a grade of 6 in English on 3/12/97 (Notebooks).
4. Professor C. Castillo is a 5o B tutor (List of tutors).
5. J. Largo is a delegate of 3rd A (List of delegates).
6. Professor J. Pérez has been a professor at the Institute since September 1992.
The "Friends of the Fiesta" association wants to collect in a database all the information
about the bullfights held in Spain and all the data related to them.

It is desired to have information about each bullfight, jointly identified by an order number,
the fair in which it is held and the year of celebration (for example: order = 2, fair = San
Isidro, Year = 1999).

In a given bullfight, a series of bullfighters perform (minimum 1 and maximum 3) of whom


you want to save their ID, name, nickname and date on which they took the alternative
(date on which they became a bullfighter). Additionally, you want to know who the
bullfighter was who gave him the alternative (godfather) in his day (a bullfighter can give
the alternative to several bullfighters or to none).

In each bullfight a bullfighter obtains a series of prizes (how many ears, how many tails and
whether he left through the front door or not) about which information is desired.

Each bullfighter can have a representative from whom he is protected. In turn, a


representative can be the representative of several bullfighters. We want to know his ID,
name, address and telephone number.

A bullfight is held in a bullring where you want to know its name, which is supposed to be
unique, location, address and capacity.

Several bullfights can be held in the same square.

In each bullfight at least 6 bulls are stabbed. Each bull is identified by the code of the farm
to which it belongs, the year in which it was born and an order number. In addition, it is
desired to maintain information about its name and color as well as the order in which it
was bullfighted.

Each bull belongs to a specific farm. For each livestock farm, the aim is to know its code,
location and age (date of creation).

Examples of Statements

1.
2. Each purchase order gives rise to an invoice .

3. An employee may or may not be a salesperson but a salesperson can be an


employee.
4. A customer can only submit one purchase order at a time; anyone who does not
have a pending order is not a customer.

5. A customer is a customer regardless of the purchase order number pending to date.


Each purchase order belongs to a customer.

6. A seller can have one or more clients.


7. Each product we have in stock is made up of one or more parts, each part is used in
a single product.

RELATIONAL MODEL

Model
Programmer Field
Relational
Relationship Archive Board
Tuple Record Row
Attribute Field Column

The set of a database is the relational table set.

The table.- It is a set of restrictions.

NORMALIZATION.- The process that checks that the table is well structured is called
normalization .

Normalization is based on the concept of normal forms, each normal form has a set of rules
that must be verified (1NF, 2NF, 3NF).
These normal forms are nested, that is, for a relationship to be in 3NF it must have passed
through 2NF and this one through 1NF.

Concepts used in standardization

 Functional Dependency.- is the relationship that exists between two attributes.


Example:

Given a value of X there exists a value of Y so Y is functionally dependent on Y.

EMPLOYEE

Employee_Cod
Name
e
001 Juan Perez
002 Ana Quiroz
X to Y

 Keys or keys.- It is the attribute that gives the difference to each table. This
attribute means that we do not have tuples or repeated rows.

client_code Client name


001 Juan Perez
002 Ana Quiroz
003 Ana Quiroz
004 Juan Perez
005 Jose Lopez

 Transitory dependency.- It is the dependency that is chained.

XYZ = Given a value of "X" there is a value of "Y" and given a value of "Y" there is a
value of "Z" then it is said that "z" is transitively dependent on "X".
First Normal Form (1NF)

1. Cells or fields must have singular values.


2. The entries of any column or attribute must be of the same class.
3. Each column must have a unique name.
4. Two rows or tuples cannot be equal.

ID Sport Worth
100 Ski 200
Swimmi
150 50
ng
175 Squas 50
Swimmi
200 50
ng

When performing operations on the table, problems may arise, these problems are called
anomalies, these anomalies can be insertion, update, deletion, etc.

Second Normal Form (2NF)

Every non-key attribute depends on a key attribute "Remove partial dependencies on the
Primary key of a Table"

Third Normal Form (3NF)

A relation is in 3NF if and only if it is in 2NF and has transitive dependencies, that is,
chained dependency.

EXERCISE APPLYING NORMALIZATION


XYZ COMPANY
Customer: _________________________ Invoice No.: __________
Date: __________________________ Order No.: __________
Amount
Code EI Price Price Price
Detail Size T A Worth
Product H N R Sale Disc. Special
E D
R
xxx xxxxxx xx x xxx.xx xxx.xx xxx.xx xxx.xx
xxx xxxxxx xx x xxx.xx xxx.xx xxx.xx xxx.xx
xxx xxxxxx xx x xxx.xx xxx.xx xxx.xx xxx.xx

Total Invoice $ xxx.xx

 1FN

* Bill number

Invoice date

* Total bill

* order_number

order_date

Account_bco_client

* Client name

customer_address

Delivery address

Product code

Product_Description

product_size

ordered_quantity
Delivered quantity

Remaining amount

Sale price

discount_price

Special price

line_value

 2FN

Bill number
*
Invoice date

Total bill
order_number
*
order_date
Account_bco_clie
nt
*
Client name

customer_address

Delivery address
* Product code

Product_Description

product_size

ordered_quantity

Delivered quantity

Remaining amount
Sale price

discount_price

Special price

line_value

 3 FN

Bill number
*
Invoice date

Total bill
order_number
*
order_date
Account_bco_clie
nt
*
Client name

customer_address

Delivery address
Product code

Product_Description
*
product_size

Sale price

discount_price

Special price
* invoice_code

* Product code

ordered_quantity
Delivered quantity

Remaining amount

line_value

Exercise 1. Vandalism

A hotel chain has decided to put an end to customers who damage the hotel's furniture.
They want to save in a database the clients who have damaged or stolen furniture and what
these furniture are.

In the database we will have information about each hotel (code, address and telephone), as
well as a set of rooms identified by a unique room number for each hotel and a set of
standard furniture elements with a code, description and price, for example: "classic design
leather chair, €98.75".

After making an inventory, all the hotel furniture is identified, that is, we know what and
how many furniture elements are in each room of each hotel. The furniture can change
rooms, but we don't need to save the old room.

For each room, we will also save if it is sunny, if it has a sink and if it has a refrigerator.
Each client has personal information (ID, name, etc.), and also a history of their acts of
vandalism: for each client we will save which furniture and how much they have damaged.
We also want to know the stays that each client has made in the hotels, saving in a The only
attribute is the date of arrival and departure, as well as the room in which you have stayed.
A client can stay in the same hotel room in different stays.

Exercise 1.1: We want to know the acts of vandalism (what and how many pieces of
furniture) that each client has done together, regardless of the room and hotel that occurred.

Exercise 1.2: We want to know the acts of vandalism of each client in each room of the
hotel.

Exercise 2. Warehouses

Some stores want to do a study on the purchasing habits of their customers. They have a set
of items identified by their barcode, each one with a description and the name of its
manufacturer. For each item, they want to test different placements to study how its sale
varies.

For each placement we will have a price and a slogan (such as "Sweeter than honey"), not
necessarily different. Since an item and a place determine a collocation, a collocation
cannot exist without any article.
Our warehouse customers are identified by their name, visa number, and we also want to
save their address and telephone number. Of the purchases you make, we only want to
know what item, in what placement and the number of units you have purchased. Various
purchases of the same item in the same placement are accumulated in the same tuple by
adding the number of units.

Exercise 3. Library

In a library you have to store the information of all the publications you have. Each post has
a unique title. Publications may or may not be periodic. Of the periodic ones you have to
know their periodicity. Periodicals consist of magazines, each defined by a volume , issue,
and year. Each journal contains articles, specified by authors, title, and journal pages. You
can have more than one copy of each magazine (volume and number), characterized by a
copy number. You can have more than one copy, although not all volumes or numbers.

Publications can be classified into different topics, which can be grouped in a hierarchical
topic-subtopic relationship.

Library members can borrow as many periodicals as they wish for a period of fifteen days.
The loans always refer to the specific copies of the publications. If when requesting a loan
of a publication, it has all the copies occupied, the member can be put on a waiting list for
the periodical publication, to be notified when any of the copies are returned.

Exercise 4. Electrician

The electrical supply company "El Chispa" asks you to create a stock control and billing
database design with the following requirements:

"El Chispa" sells items. For each item you want to save the item code, name, color,
measurements, manufacturer and sales price. For example:

E12, txuco socket, white, 9x 9 cm, Simon, €2.10.

An item cannot be supplied by more than one manufacturer and we do not want to save old
sales prices , only the current one.

For each manufacturer we want to save information on the manufacturer's code, name,
address, town, telephone number and payment method (cash, check or transfer).

For each sale, "El Chispa" makes a delivery/sale document, which includes the
delivery/sale code, date, customer information, number and code of the items sold, price
per unit and total price per item (number of units). x price/unit).

At the end of the month or whenever necessary, the delivery notes made to a client are
grouped into an invoice where we want it to appear: invoice code, date, customer data, the
information on each delivery note (number and name of the items, price per unit and total
price per item), invoice total, payment method and expiration date if payment is not in cash.
Each delivery note can only be invoiced once.

You want to save a client's NIF, name, address, city and telephone number. An invoice
belongs to only one customer.

We have a single warehouse where we keep all items. We want to save the number of items
we have in the warehouse at a given time.

Manufacturers send items to the warehouse. We want to save incoming shipments to the
warehouse. Each shipment consists of only one item. For each shipment we want to know
the date, item code and number of units shipped. A manufacturer can ship units of the same
item on the same day. In this case, the number of units shipped on the same date is added.

Exercise 5. Wars

An international organization wants to monitor the war conflicts that occur in the world.
For this reason, you want to create a database that meets the following requirements:

A conflict is any armed struggle that affects one or several countries, where deaths and/or
injuries occur. Every conflict will be identified by a name or cause that causes the conflict.
This name may change over time, so each conflict will be identified with a unique
numerical code. For each conflict we want to save the countries it affects as well as the
number of deaths and injuries for each country and the total.

Conflicts can be of different types, depending on the cause that originated them, being
classified, at most, into four groups: territorial, religious, economic and racial. Different
data will be saved in each one. In the territorial ones we will have the affected regions, in
the religious ones the religions in conflict, in the economic ones the disputed raw materials
and in the racial ones the opposing races.

Different armed groups (at least two) and different intermediary organizations intervene in
conflicts, and there may not be any. The same armed groups and intermediary organizations
can intervene in different conflicts. Both groups and organizations will be able to enter and
exit the conflict. In this case, the incorporation and departure dates will be collected. It
could be that at a given time a group or organization did not intervene in any conflict.

For each armed group, a code assigned to it and a name are saved. Each armed group has
one or more divisions and is led by a single political leader . The divisions available to a
group are numbered consecutively and the number of ships, tanks, planes and men
available is recorded, as well as the casualties they have suffered. For armed groups, the
number of casualties is obtained as the sum of the casualties in all divisions.

Arms traffickers supply different types of weapons to armed groups. For each type of
weapon, a name and an indicator of its destructive capacity are collected. For each
trafficker there is a name and the different types and quantities of weapons they can supply.
The total number of weapons of each type that each trafficker supplies to an armed group is
recorded.

Political leaders are identified by their name and by the code of the armed group they lead.

In addition, a text description of the support you have received is saved.

Each division can be jointly led by a maximum of three military commanders, although
each military commander only commands one division. Each military leader is identified
by a code and rank he or she has. Given that a military leader does not act on his own
initiative, but rather on the initiative of a single political leader of those who lead the armed
group to which the leader belongs, we want to know who this political leader is whom he
obeys.

From the intermediary organizations, their code, name, type (governmental, non-
governmental, international), the organization on which they depend (maximum one), the
number of people deployed in each conflict and the type of aid they provide will be
collected. each conflict that can only be one of the following types: medical, diplomatic or
face-to-face.

For different purposes, political leaders dialogue with organizations. We wish to explicitly
collect this information. Thus, for each leader those organizations with which he dialogues
will be saved and vice versa.

Exercise 6. Natural parks

The Ministry of Environment decides to create an information system on natural parks


managed by each Autonomous Community . After an exhaustive analysis of the context,
the following conclusions have been reached:

An Autonomous Community (CA) can have several natural parks. In the entire autonomous
community there is a single body responsible for the parks. A park can be shared by more
than one community.

A natural park is identified by a name and the date it was declared a natural park, and is
made up of several areas identified by a name (unique within the park but can be generic
among natural parks) and an area in square kilometers. For reasons of efficiency , we want
to favor consultations that refer to the number of existing parks in each AC and the total
area declared as a natural park in each AC.

In each area reside species that can be of three types: plants, animals and minerals .

Each species has a scientific name, a common name and a number of individuals in each
area. For plant species we want to know if they have flowering and in what period (month)
it occurs. We want to know about the animals their type of diet (herbivorous, carnivorous
or omnivorous) and their heat period. Regarding minerals, we want to know if they are
crystals or rocks . It is also interesting to record which species serve as food for other
species, taking into account that no mineral species is considered food for any other species
and that a plant species does not feed on any other species.

Each park has a dedicated staff. The DNI, SS number, name and surname, address,
telephone numbers (landline and mobile) and salary are kept for this personnel. There are
four types of personnel:

• Management staff: records the data of park visitors and is located at the park entrance.
Entrances are identified by a number and orientation (N, S, E, W).

• Surveillance personnel: monitor a specific area of the park that a vehicle of a specific type
and with a license plate travels through.

• Conservation staff: maintains and conserves a specific area of the park. Each one
performs a specific task (cleaning, feeding, gardening, etc.) in a specific place in the area
(paths, recreational area, gardens, etc.).

• Research staff: they have a qualification that must be kept and can carry out research
projects on a specific species alone or in a group.

A research project has a title, budget , a single principal investigator, a period of completion
and a set of participating researchers.

A visitor (ID, name, surname, address and profession) can stay in the accommodations that
the park has. The accommodations have a limited capacity and a certain category.

The accommodations organize excursions to the park by vehicle or on foot on certain days
of the week and at certain times. To go on these excursions you must be a visitor to the
park.

Exercise 7. NGO

The national NGO coordinator wants to maintain a database of associations of this type that
exist in our country. For this reason, you need to save information about each association,
the partners that form them, the projects they carry out and the workers who participate. For
the associations, we want to store their CIF, name, address, province, the type of NGO
(ecologist, integration , development, etc.) as well as whether it is declared of public utility
by the Ministry of the Interior.

Each association is made up of members whose ID, name and surname, address, province,
date of registration of the association, monthly fee with which they collaborate and the
annual contribution they make. The annual contribution will be the total of the monthly fees
plus other voluntary contributions.
Each NGO worker is identified by their ID, first and last name, address, telephone numbers
and date of entry. Every worker works for a single NGO. These workers can be of two
types: professionals and volunteers. Professionals earn a salary and hold a certain position
in the association. You want to save the position they hold, the amount they pay to the SS
and the percentage of personal income tax that is deducted from them. Volunteers work in
the organization selflessly. We want to know their age, profession and hours they dedicate
to the association.

The associations carry out projects to which their workers are assigned. A worker can work
on different projects in the same country. For each project we want to store an identification
number in the NGO, country and region where it is carried out, the objective it seeks and
the name of the people it affects.

Exercise 8. Gallery

The Ministry of Education and Science wants to have information about all the paintings
found in art galleries.

For each art gallery we want to know the unique name, city where it is located, address and
extension in square meters.

Each art gallery has a set of paintings for which you want to save the code (unique for all
art galleries), name, measurements, date it was painted and technique used to paint it.

Each painting is painted by a single painter, of whom we want to know the name and
surname, city and country where he or she was born, date of birth and date of death . A
painter can have a single teacher, but a teacher can be the teacher of several painters.

The painters may or may not belong to a school whose name, as well as the country and
date in which it appeared, is desired.

Painters may also have one or more patrons who protect them. From the patrons we want to
know the name and surname, country and date of birth, date of death and the start and end
date of the support they gave to the painter. A patron can be a patron of several painters and
a painter can have several patrons in different periods. The aim is to capture the relationship
that exists between a painter and his patron.

Exercise 9. Research projects

At the UAB we want to keep track of the research projects that are carried out.

We want to design a database that contains all the information about the projects,
departments, research groups and professors. The following requirements are considered: A
department is identified by a name, code, center (Faculty or School) where it is located,
address, university professor who serves as department director and a contact telephone
number (department secretary).
Within a department, Units are created where teachers are assigned. Every teacher must
belong to a unit. Each unit has a unique name within the university, belongs to a single
department and is associated with a knowledge area (CCIA, ATC, etc.). Each unit has a
unit head who must be a university professor.

A professor in the department is identified by an ID, name and surname, years of


experience in research, unit to which he or she belongs, and projects on which he or she
works. There are three types of teaching staff: Civil Servants (University Professors and
University Professors), University Assistants and Associates. For civil servants we want to
know the civil servant code, the year of taking office and the profile of the subject they
took. From the University Assistants we want to know the date of incorporation. We want
to know the Associate's incorporation date and the company he works for.

Each research project has a name, unique code, budget, start and end dates of the project,
and a single professor who serves as the project's principal investigator. A project may be
financed by one or more national programs.

A national program is identified by a unique name and the total amount of money that the
program has available to finance projects. Within each program, each project has an
associated number and an amount of money with which the program finances the project.

A professor can participate in several projects and can be the principal investigator of
several projects. In each project a teacher joins on a certain date and leaves on another with
a certain dedication (hours per week). A teacher can join a project more than once on
separate dates.

Exercise 10. Room reservation

The ETSE wants to control the reservation system for its rooms that it makes available to
the School staff during an academic year with the following restrictions:

For each room (degree room, assembly hall, seminars, classrooms) we want to know the
code (Q2/xxxx,Q0/xxxx, etc.), the type of room (classroom, seminar , assembly hall, degree
hall, etc.), capacity and audiovisual equipment that it permanently contains.

For the audiovisual equipment that the School has, we want to save a unique code, name
(projector, cannon, etc.), whether it is permanent or mobile, and the room where it is
located, if it is fixed. We have four types of equipment: projection cannon, overhead
projector, slide projector and computer. From the projection cannon we want to know the
brand , model, luminosity and maximum resolution at which it works. We want to know
about the transparency projector its luminosity and whether it accepts color transparencies
or not. Of the slide projector, it is important to keep the brand, model, whether it supports a
classic or modern charger, and brightness. From the computer we want to know the
processor , RAM and maximum resolution.
A teacher can reserve a room on a specific date (day, month and year) at hourly intervals
(12:00 to 13:00, 17:00 to 18:00). When reserving the room, the teacher also reserves all the
fixed equipment that the room contains.

A teacher can also reserve mobile audiovisual equipment with a variable number (2 guns, 3
projectors, etc.) on a specific date (day, month and year) at one-hour intervals. Given a date
and time, we want to know the available rooms and the audiovisual equipment available. At
the end of the course we want to know the degree of occupancy of the rooms.

What are databases?


A database is a “warehouse” that allows us to store large amounts of information in an
organized way so that we can easily find and use it later. Below we present a guide that will
explain the concept and characteristics of databases.

The term databases was heard for the first time in 1963, at a symposium held in California,
USA. A database can be defined as a set of related information that is grouped or
structured.
From a computer point of view, the database is a system made up of a set of data stored on
disks that allow direct access to them and a set of programs that manipulate that set of data.

Each database is made up of one or more tables that stores a set of data. Each table has one
or more columns and rows . The columns store a part of the information about each
element that we want to store in the table, each row of the table makes up a record.

Definition of database

A database is defined as a series of organized and related data, which are collected and
exploited by the information systems of a particular company or business.

Characteristics

Among the main characteristics of database systems we can mention:

 logical and physical data independence.


 Minimal redundancy.
 Concurrent access by multiple users.
 Data integrity.
 Optimized complex queries.
 Security of access and audit.
 Backup and recovery.
 Access through standard programming languages .

Database Management System (DBMS)

Database Management Systems (DataBase Management System) are a very specific type of
software, dedicated to serving as an interface between the database, the user and the
applications that use it. It consists of a data definition language, a data manipulation
language, and a query language.

Advantages of databases

Control over data redundancy:

File systems store multiple copies of the same data in different files. This wastes storage
space and causes data inconsistency.

In database systems all these files are integrated, so multiple copies of the same data are not
stored. However, redundancy cannot be completely eliminated in a database, as it is
sometimes necessary to model the relationships between data.

Data consistency:
Eliminating or controlling data redundancies greatly reduces the risk of inconsistencies. If a
piece of data is stored only once, any updates must be made only once, and are available to
all users immediately. If a piece of data is duplicated and the system is aware of this
redundancy, the system itself can take care of ensuring that all copies remain consistent.

Data sharing:

In file systems, files belong to the people or departments that use them. But in database
systems, the database belongs to the company and can be shared by all authorized users.

Standards maintenance:

Thanks to the integration, it is easier to respect the necessary standards , both those
established at the company level and the national and international ones. These standards
can be established on the format of the data to facilitate its exchange, they can be
documentation standards, update procedures and also access rules.

Improved data integrity:

Database integrity refers to the validity and consistency of stored data. Typically, integrity
is expressed by constraints or rules that cannot be violated. These restrictions can be
applied to both the data and their relationships, and it is the DBMS that must be in charge
of maintaining them.

Improved security:

Database security is the protection of the database from unauthorized users. Without good
security measures, the integration of data in database systems makes them more vulnerable
than in file systems.

Improved data accessibility:

Many DBMSs provide query languages or report generators that allow the user to make any
type of query on the data, without requiring a programmer to write an application to
perform such a task.

Improved productivity:

The DBMS provides many of the standard functions that the programmer needs to write to
a file system. At a basic level, the DBMS provides all the file management routines typical
of application programs.

Having these functions allows the programmer to better focus on the specific function
required by users, without having to worry about low-level implementation details.

Improvement in maintenance:
In file systems, data descriptions are embedded in the application programs that handle
them.

This makes programs dependent on data, so that a change in their structure, or a change in
the way they are stored on disk, requires major changes to the programs whose data is
affected.

However, DBMSs separate data descriptions from applications. This is what is known as
data independence, thanks to which the maintenance of the applications that access the
database is simplified.

Increased attendance:

In some file systems, if there are several users who can simultaneously access the same file,
it is possible that the access interferes with each other so that information is lost or integrity
is lost. Most DBMSs manage concurrent access to the database and ensure that problems of
this type do not occur.

Improvement in backup services:

Many file systems leave it to the user to provide the necessary measures to protect data
against system or application failures. Users have to make backup copies every day, and if
any failure occurs, use these copies to restore them.

In this case, all work done on the data since the last backup is lost and has to be done again.
However, current DBMSs operate in a way that minimizes the amount of work lost when a
failure occurs.

Disadvantages of databases

Complexity:

DBMSs are sets of programs that can be complex with great functionality. It is necessary to
understand this functionality very well to be able to make good use of them.

Cost of additional equipment:

Both the DBMS and the database itself may make it necessary to purchase more storage
space. Additionally, to achieve the desired performance, it may be necessary to purchase a
larger machine or a machine dedicated solely to the DBMS. All this will make the
implementation of a database system more expensive.

Vulnerable to failures:

The fact that everything is centralized in the DBMS makes the system more vulnerable to
failures that may occur. That is why you must have backup copies.
Field Types

Each Database System has types of fields that can be similar or different. Among the most
common we can name:

 Numeric: among the different types of numerical fields we can find integers “without
decimals” and “decimal” reals.
 Boolean: they have two states: True “Yes” and False “No”.
 Memos: are alphanumeric fields of unlimited length. They have the disadvantage of not
being indexed.
 Dates: they store dates, facilitating their exploitation later. Storing dates in this way makes
it possible to sort records by date or calculate the days between one date and another.
 Alphanumeric: contain numbers and letters. They have a limited length (255 characters).
 Autoincrementable: they are integer numerical fields that increase their value by one unit
for each incorporated record. Its usefulness is: Serve as an identifier since they are unique
to a record.

Database Types

Among the different types of databases, we can find the following:

 MySql – is a server-based GPL licensed database. It is characterized by its speed. It is not


recommended to use for large volumes of data.

 PostgreSql and Oracle: They are powerful database systems. It manages large amounts of
data very well, and is usually used in intranets and large-caliber systems.
 Access: It is a database developed by Microsoft . This database must be created under the
access program, which creates a .mdb file with the structure already explained.
 Microsoft SQL Server: is a more powerful database than access developed by Microsoft. It
is used to handle large volumes of information.

Entity-relationship model

Entity-relationship diagrams or models (called by its acronym, ERD “Entity Relationship


Diagram”) are a tool for modeling data from an information system. These models express
entities relevant to an information system, their inter-relationships and properties.
Cardinality of Relationships

The design of relationships between the tables of a database can be as follows:

 One-to-one relationships: An instance of entity A is related to one and only one of entity
B.
 One-to-many relationships: Each instance of entity A is related to multiple instances of
entity B.
 Many-to-many relationships: Any instance of entity A is related to any instance of entity
B.

Structure of a Database

A database, in order to organize information logically, has an order that must be met to
access the information in a coherent manner. Each database contains one or more tables,
which fulfill the function of containing the fields.

In the following example we show a “comments” table that contains 4 fields.

The data would be organized as shown in the following example:


Therefore, a database has the following hierarchical order:

 Boards
 Fields
 Records
 SQL language

The SQL language is the most universal in database systems. This language allows us to
make queries to our databases to display, insert, update and delete data.

Below we will see an example of them:

 Show: the Select statement is used to show the records. Select * From comments .
 Insert: records can be introduced from statements that use the Insert statement. Insert
Into comments (title, text, date) Values ('greetings', 'how is
this', '10-22-2007')
 Delete: To delete a record, the Delete instruction is used. In this case we must specify
which records we want to delete. It is therefore necessary to establish a selection that will
be carried out through the Where clause. Delete From comments Where id='1' .
 Update: the Update statement is used to update the records. As in the case of Delete, we
need to specify through Where which are the records in which we want to make our
modifications effective. Additionally, we will have to specify which are the new values of
the fields that we want to update. Update comments Set title='My First
Comment' Where id='1'.

Don't miss the Web Forums section dedicated especially to the topic of databases .

Database (module)
Database

 Database Features
 Add a database
 Details of a database
 Database templates
 Database fields
 Predefined set
 Add a record to the database
 View a database
 Delete a Database
 Didactic uses
 Links

Moodle 1.6
This activity allows users to enter data into a form designed by the course instructor.
Entries can be sorted, searched, etc. Entries can contain text, images and other information
formats.

This module is new in Moodle version 1.6, but also works with Moodle 1.5.4.

 It allows creating an accessible database, in reading and writing, to both students and
teachers.

 It has different types of fields:


o Text
o Images
o Archive
o URL
o Date
o Menu
o Menu (Multiple selection)
o Check button (Checkbox)
o Choice buttons (Radio buttons)

 Its standard icon is:

The Database Module allows teachers and/or students to build, display and search a
repository of entries with records on any conceivable topic. The format and structure of
these entries can be almost unlimited, including images, files, URLs, numbers and text
among other things. You may be familiar with similar technologies for creating databases
such as Microsoft Access or Filemaker.

Content
[ disguise ]

 1 How to use the Database module


 2 Examples of Databases
 3 See also
o 3.1 Activity module table

How to use the Database module


 The first thing you need to do is add a database . You will be required to provide a name,
provide some descriptive text that indicates the purpose to users, and complete a few
other options.
 Next, define the type of Fields that define the information you want to store. For example,
a database of famous painters might have one image field called painting , for uploading
an image file showing the painting, and two text fields called artist and title for the name
of the artist and the title of the painting.
 You have the option, optionally, to edit the Templates to modify the way the database will
display the entries.
 Note that if you later edit the database fields, you will need to use the Restore Template
Button, or manually edit the template, to ensure that the new fields are correctly added to
the visualization.
 Finally, the Teacher and/or Students can begin entering data and (optionally) comment or
rate other submissions. These entries can be displayed as a single record , list or can be
searched and sorted.

Database Examples
On Moodle.org we have three good examples of Database module application:

 Moodle Buzz , A database of articles about Moodle with their title, author and Web link.
 Themes , A database of Moodle Themes with capture, download link and user comments.
 Modules and plugins , A database on Moodle modules containing web links (download,
docum

A relational database is a database that complies with the relational model , which is the
most used model today to implement already planned databases. They allow
interconnections (relationships) to be established between the data (which are stored in
tables), and through these connections to relate the data of both tables, hence its name:
"Relational Model" . After its bases were postulated in 1970 by Edgar Frank Codd , from
the IBM laboratories in San José (California), it did not take long to consolidate itself as a
new paradigm in database models. 1

Content
[ disguise ]

 1 Features
 2 Elements
o 2.1 Base and derived relations
o 2.2 Restrictions
o 2.3 Domains
o 2.4 Unique key
o 2.5 Primary key
o 2.6 Foreign key
 3 Index key
o 3.1 Stored procedures
 4 Structure
 5 Information manipulation
 6 Relational database managers
 7 Advantages and disadvantages
 8 Design of relational databases
 9 See also
 10 References
 11 External links

[ edit ] Features
 A relational database is made up of several tables or relationships.
 There cannot be two tables with the same name or record.
 Each table is in turn a set of records (rows and columns).
 The relationship between a parent table and a child is carried out through primary
and foreign keys.
 Primary keys are the primary key of a record within a table and these must comply
with data integrity .
 Foreign keys are placed in the child table, they contain the same value as the parent
record's primary key; Through these relationships are made.

[ edit ] Elements
[ edit ] Base and derived relations

In a relational database, all data is stored and accessed through relationships. The
relationships that store data are called "base relationships" and their implementation is
called "table." Other relationships do not store data, but are calculated by applying
relational operations. These relationships are called "derived relationships" and their
implementation is called a "view" or "query." Derived relations are convenient because
they express information from several relations acting as if they were a single one.

[ edit ] Restrictions

A constraint is a condition that forces certain conditions to be met in the database. Some are
not determined by users, but are inherently defined by the simple fact that the database is
relational. Some other restrictions can be defined by the user, for example, using a field
with integer values between 1 and 10.

Constraints provide a method of implementing rules in the database. Constraints restrict the
data that can be stored in tables. They are usually defined using expressions that result in a
Boolean value, indicating whether the data satisfies the constraint or not.

Constraints are not a formal part of the relational model, but they are included because they
play the role of better organizing the data. Constraints are much discussed along with
relational concepts.

[ edit ] Domains
A domain describes a set of possible values for a certain attribute. Since a domain restricts
the values of the attribute, it can be considered a constraint. Mathematically, attributing a
domain to an attribute means "all values of this attribute must be elements of the specified
set."

Different types of domains are: integers, text strings, date, non-procedurals, etc.

[ edit ] Unique key

Each table can have one or more fields whose values uniquely identify each record in said
table, that is, there cannot be two or more different records whose values in said fields are
identical. This set of fields is called a unique key.

There can be several unique keys in a given table, and each of these is usually called a
primary key candidate.

[ edit ] Primary key

A primary key is a unique key chosen from all the candidates that uniquely defines all the
other attributes of the table, to specify the data that will be related to the other tables. The
way to do this is through foreign keys.

There can only be one primary key per table and no field in that key can contain NULL
values.

[ edit ] Foreign key

A foreign key is a reference to a key in another table, it determines the relationship between
two tables. Foreign keys do not need to be unique keys in the table where they are located,
but rather where they are referenced.

For example, the department code can be a foreign key in the employees table. Multiple
employees are allowed in the same department, but there will be one and only one
department for each distinct department key in the employees table.

[ edit ] Index key


Index keys arise with the need to have faster access to data. Indexes can be created with any
combination of fields in a table. Queries that filter records using these fields can find the
records non-sequentially using the index key.

Relational databases include multiple sorting techniques, each of which is optimal for a
certain data distribution and relationship size.
Indexes are generally not considered part of the database, as they are an added detail.
However, the index keys are developed by the same group of programmers as the other
parts of the database.

[ edit ] Stored procedures

A stored procedure is executable code that is associated and stored with the database.
Stored procedures usually collect and customize common operations, such as inserting a
record into a table, collecting statistical information, or encapsulating complex calculations.
They are frequently used by an API for security or simplicity.

Stored procedures are not part of the relational model, but all commercial implementations
include them.

[ edit ] Structure
The database is organized into two distinct sections; the schema and the data (or instance).

The schema is the definition of the database structure and mainly stores the following data:

 The name of each table


 The name of each column
 The data type of each column
 The table to which each column belongs

Relational databases go through a process known as normalization ; the result of this


process is a schema that allows the database to be used optimally.

The data or instance is the content of the database at a given time. It is in itself the content
of all records.

[ edit ] Information manipulation


To manipulate information we use a relational language, currently there are two formal
languages: relational algebra and relational calculus . Relational algebra allows you to
describe how to perform a query, however, relational calculus only indicates what you want
to return.

The most common language to build queries to relational databases is SQL (Structured
Query Language), a standard implemented by the main relational database management
engines or systems.

In the relational model, attributes must be explicitly related to a name in all operations,
however, the SQL standard allows the use of unnamed columns in result sets, such as the
shorthand asterisk ( * ) as query notation.
Unlike the relational model, the SQL standard requires that columns have a defined order,
which is easy to implement on a computer since memory is linear.

It should be noted, however, that in SQL the order of the columns and records returned in a
certain result set is never guaranteed, unless explicitly specified by the user.

[ edit ] Relational database managers


There is software exclusively dedicated to dealing with relational databases. This software
is known as SGBD (Relational Database Management System ) or RDBMS ( Relational
Database Management System ).

Among the most popular current managers or handlers we find: MySQL , PostgreSQL ,
Oracle , DB2 , INFORMIX , Interbase , FireBird , Sybase and Microsoft SQL Server .

[ edit ] Advantages and disadvantages


Advantages

 Provides tools that guarantee to avoid duplicate records.


 It guarantees referential integrity, so deleting a record deletes all dependent related
records.
 It favors standardization because it is more understandable and applicable.

Disadvantages

 They present deficiencies with graphic data, multimedia, CAD and geographic
information systems .
 Blocks of text as a data type are not manipulated in a manageable way.
 Object-oriented databases (OBDO) were proposed with the objective of satisfying
the needs of previous applications and thus complement but not replace relational
databases.

[ edit ] Relational database design


The first step to create a database is to plan the type of information you want to store in it,
taking into account two aspects: the information available and the information we need.

Planning the structure of the database, particularly the tables, is vital for its effective
management. The design of the structure of a table consists of a description of each of the
fields that make up the record and the values or data that each of these fields will contain.

The fields are the different types of data that make up the table, for example: first name,
last name, address. Defining a field requires: the field name, the field type, the field width,
etc.
The records constitute the information that is contained in the fields of the table, for
example: the patient's name, the patient's last name and the patient's address. Generally, the
different types of fields that can be stored are the following: Text (characters), Numerical
(numbers), Date / Time, Logical (logical information yes/no, true/false, etc.), images.

In summary, the main aspect to take into account during the design of a table is to clearly
determine the necessary fields, define them appropriately with a name specifying their type
and length.

Hierarchical database
Jump to: navigation , search

A hierarchical database is a type of database management system that, as the name


suggests, stores information in a hierarchical structure that links records in the form of a
tree structure (similar to a tree viewed upside down), where a parent information node can
have several child nodes.

This hierarchical relationship is not strictly mandatory, so relationships can be established


between sibling nodes. In this case the tree-shaped structure becomes a directed graph-
shaped structure. This variant is called Network Databases .

Content
[ disguise ]

 1 Brief historical overview


 2 How they work
 3 Limitations of the hierarchical model
o 3.1 Duplication of records
o 3.2 Referential integrity
o 3.3 Denormalization
 4 Hierarchical database managers
 5 See also
 6 External links

[ edit ] Brief historical overview


Hierarchical databases were conceived in the 1960s . The first database metamodel
proposed was the aforementioned Network Database , conceived under the auspices of
CODASYL (COnference on DATA SYstems Languages) . The idea was later refined,
giving rise to the hierarchical database. The first implementation of this metamodel was
IMS (Information Management System) . It is a design by IBM and other collaborators in
1966 for NASA 's Apollo Program . IMS is still active. The banking sector and Public
Administrations quickly adopted this technology, without which the degree of automation
they have today would not have been possible. These sectors were the only ones with
sufficient economic capacity to acquire enormous mainframes for database automation, the
only possible solution at the time.

Shortly after, in 1970 , E. F. Codd proposed the relational model . The advantages of this
model and its mathematical approach focused the industry's efforts, giving rise to relational
database management systems. The latter have replaced hierarchical databases today, but
not completely. Most of the old hierarchical databases of banks and Public Administrations
are still active. This is because the performance of hierarchical databases is still not
surpassed by relational databases. Furthermore, these sectors suffer a large volume of
transactions. Note, for example, the number of accounting entries that a network of ATMs
requires in a single day.

[ edit ] How they work


Unlike the relational model, the hierarchical model does not differentiate a logical view
from a physical view of the database. So the relationships between data are always
established at the physical level, that is, by reference to physical addresses of the storage
medium (sectors and tracks).

Data is stored in the form of records , the equivalent of rows in the relational model. Each
record consists of a set of fields , the equivalent of the columns of the relational model. A
set of records with the same fields is called a file ( record type , in English), the equivalent
of the tables of the relational model.

The hierarchical model facilitates parent-child relationships, that is, 1:N (one-to-many)
relationships of the relational model. But unlike the latter, the relationships are
unidirectional. In fairness, these relationships are son-father , but not father-son . For
example, an employee's record ( child node) can be related to its department's record (
parent node), but not the other way around. This implies that the database can only be
queried from the leaf nodes to the root node. The reverse query requires a sequential search
through all records in the database (for example, to query all employees in a department).
In hierarchical databases there are no indexes that facilitate this task.

Note that, a priori, there are no N:M (many-to-many) relationships in the hierarchical
model. Unless they are simulated using several 1:N relationships. However, this can cause
inconsistency problems, since the database manager does not control these relationships.

As already mentioned, relationships are established through pointers between records. That
is, a child record contains the physical address on the storage medium of its parent record.
This has a fundamental advantage over relational databases: performance. Access from one
record to another is practically immediate without the need to consult correspondence
tables.
Hierarchical relationships between different types of data can make it very easy to answer
certain questions, but very difficult to answer others.

[ edit ] Limitations of the hierarchical model


Below are the typical problems of hierarchical databases that do not exist in relational
databases. All of these problems derive from the fact that the database management system
does not implement any control over the data itself, but it is up to the applications to ensure
that the required invariant conditions are met (for example, avoiding duplication of data).
records). Since all applications are subject to errors and crashes, this is impossible in
practice. Furthermore, these conditions are usually broken specifically for operational
reasons (generally, adjustments due to changes in the business) without evaluating their
consequences.

[ edit ] Duplication of records

The absence of duplicate records is not guaranteed. This is also true for "key" fields. That
is, any two records are not guaranteed to have different values in a particular subset of
fields.

[ edit ] Referential integrity

There is no guarantee that a child record is related to a valid parent record. For example, it
is possible to delete a parent node without first deleting the child nodes, so that the latter
are related to an invalid or non-existent record.

[ edit ] Denormalization

This is not so much a problem with the hierarchical model as with the use made of it.
However, unlike the relational model, hierarchical databases do not have controls that
prevent denormalization of a database. For example, there is no concept of key fields or
unique fields.

Denormalization allows redundancy to be introduced in a controlled way, following a series


of steps leads to:

 Combine relationships
 Duplicate non-key attributes
 Introducing repeating groups
 Create extraction tables

When to denormalize:

 It must be denormalized to optimize the relational scheme


 To refer to the combination of 2 relations that form a single relation
Example:
Supplier (supplier_number, street, city, postal_code, description) The Supplier relationship
is denormalized, since to normalize it we should create a table with city and postal code

[ edit ] Hierarchical database managers

Network database
Jump to: navigation , search

A network database is a database made up of a collection or set of records , which are


connected to each other through links on a network. The registry is similar to that of an
entity such as those used in the relational model .

A record is a collection or set of fields ( attributes ), where each one contains only a single
stored value, exclusively the link is the association between two records, so we can see it as
a strictly binary relationship.

A network database structure, sometimes called a plex structure , encompasses more


than the tree structure, because a child node in the network structure can have more than
one parent node . In other words, the restriction that in a hierarchical tree each child can
have only one parent becomes less severe.

Thus, the tree structure can be considered as a special case of the network structure .

[ edit ] Example
To illustrate the structure of the records in a network database , we will show the student
– subject database , with the following records (in the Pascal programming language ):

type matter = record


key: string[7]
mname: string[25]
cred: string[2];
end;
type student = record
name: string[30];
control: string[8];
matter: Matter; {Link to subject}
end;

In summary, a network database can have 1 or more parent elements.

[ edit ] See also


Databases
A database or data bank is a set of data that belong to the same context systematically
stored for later use. In this sense, a library can be considered a database composed mostly
of documents and texts printed on paper and indexed for consultation. Currently, and due to
the technological development of fields such as computing and electronics , most
databases have electronic format, which offers a wide range of solutions to the problem of
storing data.

In computing, there are database management systems (DBMS), which allow data to be
stored and later accessed in a quick and structured way. The properties of database
management systems are studied in computer science.

The most common applications are for the management of companies and public
institutions. They are also widely used in scientific environments in order to store
experimental information.

Although databases can contain many types of data, some of them are protected by the laws
of various countries. For example, in Spain, personal data is protected by the Organic Law
on the Protection of Personal Data (LOPD).

Types of databases
Databases can be classified in several ways, according to the criteria chosen for their
classification:

Depending on the variability of the stored data

Static databases

These are read-only databases, used primarily to store historical data that can later be used
to study the behavior of a data set over time, make projections and make decisions .

Dynamic databases

These are databases where the stored information is modified over time, allowing
operations such as updating and adding data, in addition to fundamental query operations.
An example of this may be the database used in an information system of a grocery store, a
pharmacy, a video store, etc.

According to the content


Bibliographic databases

They only contain a surrogate (representative) of the primary source, which allows it to be
located. A typical record in a bibliographic database contains information about the author,
publication date, publisher, title, edition, of a given publication, etc. It may contain a
summary or extract of the original publication, but never the full text, because otherwise we
would be in the presence of a full-text database (or primary sources—see below). As its
name indicates, the content is figures or numbers. For example, a collection of laboratory
analysis results, among others.

Full text databases

They store primary sources, such as all the content of all editions of a collection of
scientific journals.

Directories

One example are the phones guides in electronic format.

Bank of images, audio, video, multimedia, etc.

Databases or “libraries” of Biological information

They are databases that store different types of information from life or medical sciences.
They can be considered in several subtypes:

 Those that store sequences of nucleotides or proteins.


 The databases of metabolic pathways
 Structure databases, comprising records of experimental data on 3D structures of
biomolecules
 Clinical databases
 Bibliographic (biological) databases

Database models
In addition to classification by database function, they can also be classified according to
their data management model.

A data model is basically a “description” of something known as a data container


(something where information is stored), as well as the methods for storing and retrieving
information from those containers. Data models are not physical things: they are
abstractions that allow the implementation of an efficient database system; They generally
refer to algorithms and mathematical concepts.

Some models frequently used in databases:


Hierarchical databases

These are databases that, as their name suggests, store your information in a hierarchical
structure. In this model the data is organized in a way similar to a tree (seen in reverse),
where a parent information node can have several children . The node that has no parents is
called the root , and the nodes that have no children are known as leaves .

Hierarchical databases are especially useful in the case of applications that handle a large
volume of information and highly shared data, allowing the creation of stable and high-
performance structures.

One of the main limitations of this model is its inability to efficiently represent data
redundancy.

Network database

This is a slightly different model from the hierarchical one; Its fundamental difference is
the modification of the node concept: the same node is allowed to have several parents (a
possibility not allowed in the hierarchical model).

It was a great improvement over the hierarchical model, as it offered an efficient solution to
the data redundancy problem; But even so, the difficulty of managing information in a
network database has meant that it is a model used mostly by programmers rather than end
users.

Relational database

Main article: Relational model

This is the most used model today to model real problems and manage data dynamically.
After its foundations were postulated in 1970 by Edgar Frank Codd, from the IBM
laboratories in San José (California), it did not take long to consolidate itself as a new
paradigm in database models. Its fundamental idea is the use of “relations”. These
relationships could logically be considered as sets of data called “tuples.” Although this is
the theory of relational databases created by Edgar Frank Codd, most of the time it is
conceptualized in a way that is easier to imagine. This is thinking of each relationship as if
it were a table that is composed of records (the rows of a table), which would represent the
tuples, and fields (the columns of a table).

In this model, where and how data is stored is irrelevant (unlike other models such as
hierarchical and network). This has the considerable advantage of being easier for a casual
user of the database to understand and use. Information can be retrieved or stored through
“queries” that offer extensive flexibility and power to manage information.
The most common language to build queries to relational databases is SQL, Structured
Query Language , a standard implemented by the main relational database management
engines or systems.

During its design, a relational database goes through a process known as database
normalization.

During the '80s (1980-1989) the appearance of dBASE produced a revolution in


programming languages and data management systems. Although it should never be
forgotten that dBase did not use SQL as the base language for its management.

Object database

This model, quite recent, and typical of object-oriented computer models, tries to store
complete objects (state and behavior) in the database.

An object-oriented database is a database that incorporates all the important concepts of the
object paradigm:

 Encapsulation – Property that allows information to be hidden from the rest of the
objects, thus preventing incorrect access or conflicts.
 Inheritance – Property through which objects inherit behavior within a class
hierarchy.
 Polymorphism – Property of an operation through which it can be applied to
different types of objects.

In object-oriented databases, users can define operations on data as part of the database
definition. An operation (called a function) is specified in two parts. The interface (or
signature) of an operation includes the name of the operation and the data types of its
arguments (or parameters). The implementation (or method) of the operation is specified
separately and can be modified without affecting the interface. User application programs
can operate on data by invoking those operations through their names and arguments,
regardless of the way they are implemented. This could be called independence between
programs and operations.

Work is underway on SQL3, which is the expanded SQL92 standard, which will support
the new object-oriented concepts and maintain compatibility with SQL92.

Documentary databases

They allow full-text indexing, and generally perform more powerful searches. Tesaurus is
an index system optimized for this type of databases.

Deductive database
A deductive database system is a database system but with the difference that it allows
deductions to be made through inferences. It is mainly based on rules and facts that are
stored in the database. Deductive databases are also called logical databases , because they
are based on mathematical logic.

Distributed database management

The database is stored on several networked computers. They arise due to the physical
existence of decentralized organizations. This gives them the ability to join the databases of
each location and thus access different universities, store branches, etc.

2.
3. Main elements
4. In summary
5. Some background, why was it created?
6. Evolution of client-server architecture
7. What is an architecture
8. What is a client
9. What is a server
10. Elements of the client/server architecture
11. Characteristics of the client/server model
12. Types of clients, servers
13. Client Server Model Styles
14. Remote presentation
15. Distributed logic
16. Remote data management
17. Distributed database
18. Definition of Middleware
19. Functions of a server program
20. Bibliography

INTRODUCTION

In view of the learning we have daily in the classroom, we are challenged by a world full of
knowledge that calls for research .

This work was carried out precisely to fulfill the expectations and desire for intellectuality
that the career offers us, from databases , we see the importance of the client- server
architecture .

This is exactly what will be reflected in the following work, the way of

Knowing an architecture that is currently one of the most important and used in the field of
sending and receiving information is also a powerful tool for saving data in a database as a
server.
-------------------------------------

Regarding the definition of client/server architecture, the following definitions are found:

 Any combination of systems that can collaborate with each other to give users all
the information they need without them having to know where it is located.
 It is a cooperative processing architecture where one of the components requests
services from another.
 It is collaborative data processing between two or more computers connected to a
network .
 The term client/server is originally applied to the software architecture that
describes processing between two or more programs : an application and a
supporting service .
 IBM defines the Client/Server model . "It is the technology that provides the end
user with transparent access to applications, data, computing services or any other
resource of the work group and/or, throughout the organization , on multiple
platforms. The model supports a distributed environment in which service requests
made by intelligent workstations or " clients " result in work performed by other
computers called servers .
 "It is a model for building information systems, which is based on the idea of
distributing the processing of information and data throughout the computer
system , allowing the performance of the global information system to be improved"

Main elements

"The main elements of the client-server architecture are precisely the element called client
and the other element called server." For example, within a multimedia environment, the
client element would be the device that can view the video, pictures and text , or reproduce
the audio distributed by the server element.

On the other hand, the client can also be a personal computer or a smart television that has
the ability to understand digital data. Within this case, the server element is the repository
of the digital video, audio, digital photographs and text and distributes them on demand as
it is a machine that has the capacity to store the data and execute all the software that
provides these to the client.

IN SUMMARY

C/S is a relationship between processes running on separate machines

The server (S) is a service provider.

The client (C) is a consumer of services.


C and S They interact through a message passing mechanism:

Service request.

Answer

SOME BACKGROUND, WHY WAS IT CREATED?

There are various points of view on the way in which data processing should be carried out,
although the majority who agree agree that we are in the middle of an evolutionary process
that will continue for some years and that will change the way in which we obtain data. and
we use electronically stored information.

The main reason behind this evolution is the need for organizations (public or private
companies or institutions ) to carry out their operations more agilely and efficiently, due to
the growing competitive pressure to which they are subjected, which translates into the
need for their staff to be more productive, to reduce operating costs and expenses , while
generating products and services more quickly and with better quality .

In this context, it is necessary to establish an information processing infrastructure that has


the elements required to provide adequate, accurate and timely information for decision
making and to provide better service to customers.

The Client/Server model brings together the necessary characteristics to provide this
infrastructure, regardless of the size and complexity of the operations of public or private
organizations and, consequently, plays an important role in this evolution process.

Evolution of client-server architecture

The mainframe era

"From its beginnings, the data management model through computers was based on the use
of remote terminals, which were connected directly to a central computer." This central
computer was responsible for providing services characterized by the fact that each service
was provided only to an exclusive group of users.

The era of dedicated computers

This is the era when each service employed its own computer that allowed users of that
service to connect directly. This is a consequence of the appearance of small, easy-to-use
computers, cheaper and more powerful than conventional ones.

The era of free connection

It has been more than 10 years since desktop computers appeared en masse. This allowed
an appreciable portion of the computing workload in both the calculation scope and the
presentation scope to be carried out from the user's desktop. In many cases the user obtains
the information he needs from a service computer. These desktop computers connect to the
service computers using software that allows the emulation of some type of terminal. In
other cases, the information is transferred using magnetic resources or by transcription.

The era of computing through networks

This is the era that is based on the concept of computer networks , in which the information
resides in one or several computers, the users of this information use computers to work
and all of them are connected to each other. This provides the possibility for all users to
access information from all computers and at the same time for the various systems to
exchange information.

The era of client-server architecture

"In this architecture, the computer of each of the users, called the client, produces a demand
for information to any of the computers that provide information, known as servers," the
latter responding to the demand of the client that produced it.

Clients and servers can be connected to a local network or a wide network, such as one that
can be implemented in a company, or to a global network such as the Internet .

Under this model, each user has the freedom to obtain the information they require at a
given time from one or more local or distant sources and to process it as they see fit. The
different servers can also exchange information within this architecture.

WHAT IS AN ARCHITECTURE

An architecture is a framework of functional components that, taking advantage of different


standards, conventions, rules and processes, allows the integration of a wide range of
computer products and services, so that they can be used effectively within the organization
.

We must point out that to select an architecture model, we must start from the technological
and organizational context of the moment and that the Client/Server architecture requires a
certain specialization of each of the different components that make it up.

WHAT IS A CUSTOMER

It is the one that initiates a service request. The initial request can become multiple work
requests over LAN or WAN networks . The location of data or applications is completely
transparent to the client.

WHAT IS A SERVER
It is any computing resource dedicated to responding to customer requirements. Servers can
be connected to clients through LANs or WANs, to provide multiple services to clients and
citizens such as printing, database access, fax , image processing, etc.

To view the graph select the "Download" option from the top menu

This is the graphical example of the client-server architecture.

ELEMENTS OF THE CLIENT/SERVER ARCHITECTURE

In this approach, and with the objective of defining and delimiting the reference model of a
Client/Server architecture, we must identify the components that allow said architecture to
be articulated, considering that every application of an information system is characterized
by three basic components:

 Presentation/Collection of Information
 Processes
 Information Storage

Which are usually distributed as shown in the figure:

Client/Server Applications
To view the graph select the "Download" option from the top menu

And they are integrated into a Client/Server architecture based on the elements that
characterize said architecture, that is:

 Job positions
 Communications
 Servers

As presented in the figure:

Client/Server Architecture

To view the graph select the "Download" option from the top menu

Of these elements we must highlight:

The Job or Client

A workstation or microcomputer (PC: Personal Computer ) connected to a network, which


allows you to access and manage a series of resources" which is emerging as a universal
workplace. We are referring to a microcomputer connected to the information system and
in which a majority of the processes are carried out.
This is a phenomenon in the computer sector. Those IT managers who oppose the use of
non-programmable terminals end up being marginalized due to pressure from users.

We must highlight that the workplace based on a microcomputer connected to a network


favors flexibility and dynamism in organizations. Among other reasons, because it allows
changing the location of jobs, given the advantages of the network.

The Servers or Back-end

A machine that provides a series of services such as Databases, Files ,


Communications ,...).
The Servers, depending on the specialization and requirements of the services they must
provide, can be:

 Mainframes
 Minicomputers
 Specialized (Network Devices, Image , etc.)

A characteristic to consider is that the different services, depending on the case, can be
provided by a single Server or by several specialized Servers.

The comunications

In its two aspects:

 Network infrastructure
 Communications infrastructure

Network infrastructure

Hardware and Software components that guarantee the physical connection and data
transfer between the different computers on the network.

Communications infrastructure

Hardware and Software components that allow communication and management between
clients and servers.
The Client/Server architecture is the result of the integration of two cultures. On the one
hand, that of the Mainframe that provides storage capacity, integrity and access to
information and, on the other, that of the computer that provides ease of use (PC culture ),
low cost , attractive presentation (playful aspect) and a wide range of products and
applications.

CHARACTERISTICS OF THE CLIENT/SERVER MODEL

In the CLIENT/SERVER model we can find the following characteristics:


1. The Client and the Server may act as a single entity and may also act as separate entities,
performing independent activities or tasks.

2. Client and Server functions can be on separate platforms, or on the same platform.

To view the graph select the "Download" option from the top menu

3. A server serves multiple clients concurrently.

4. Each platform can be independently scalable. Changes made to the Client or Server
platforms, whether due to updating or technological replacement, are made in a transparent
manner for the end user.

5. The interrelation between hardware and software is based on a powerful infrastructure,


so that access to network resources does not show the complexity of different types of data
formats and protocols .

6. A server system performs multiple functions while presenting an image of a single


system to Client stations . This is achieved by combining computing resources that are
physically separated into a single logical system, thus providing the most effective service
to the end user.

It is also important to note that Client/Server functions can be dynamic. For example, a
server can become a client when it makes a request for services to other platforms within
the network.

Its ability to allow the integration of existing equipment in an organization, within a


decentralized and heterogeneous computer architecture.

7. Furthermore, it is the most appropriate link to reconcile information systems based on


mainframes or minicomputers with those based on small computing environments and
workstations.

8. Designates a construction model for distributed computer systems.

1. Its typical representation is a work center (PC), where the user has their own office
applications and their own databases, without direct dependence on the
organization's central information system, while at the same time being able to
access the
2. resources of this central host and other systems of the organization put at your
service.

In conclusion, Client/Server can include multiple platforms, databases, networks and


operating systems. These can be from different providers , in proprietary and non-
proprietary architectures, and all working at the same time. Therefore, its implementation
involves different types of standards: APPC, TCP/IP, OSI , NFS, DRDA running on DOS,
OS/2, Windows or PC UNIX , on TokenRing, Ethernet , FDDI or coaxial medium, just to
name a few. of the possibilities.

TYPES OF CUSTOMERS

1. "skinny customer":

 Server quickly saturated.


 Large circulation of interface data on the network.

1. "fat customer":

 Almost all work on the client.


 There is no centralization of DB management.
 Large circulation of useless data on the network.

SERVER TYPES

File servers

Server where files and productivity applications are stored, such as word processors ,
spreadsheets, etc.

Database servers

Server where databases, tables, indexes are stored. It is one of the servers with the most
load.

Transaction servers

Server that fulfills or processes all transactions. Validate first and then generate a request to
the database server.
Groupware Servers

Server used to monitor operations within the network.


Object servers

They contain objects that must be outside the database server. These objects can be videos,
images, multimedia objects in general.
Web Servers

They are used as an intelligent way to communicate between companies through the
Internet.

This server allows transactions with the conditioning of a specific browser.

Client Server Model Styles

DISTRIBUTED PRESENTATION

1.
2. The interface is distributed between the client and the server platform.
3. The application and data are both on the server.
4. Similar to the traditional architecture of a Host and Terminals.
5. The PC is used only to improve the graphical user interface.

Advantages

 Revitalizes old systems.


 Low development cost.
 There are no changes to existing systems.

Disadvantages

 The system remains on the Host.


 The GUI and/or LAN is not used.
 The user interface is maintained on many platforms.

REMOTE PRESENTATION

1.
2. The user interface is completely on the client.
3. The application and data are on the server.

Advantages
 The user interface makes good use of the GUI and LAN.
 The application takes advantage of the Host.
 Suitable for some types of decision support applications.

Disadvantages

 Applications can be complex to develop.


 The application programs remain on the Host.
 The high volume of network traffic can make it difficult to operate very heavy
applications.

DISTRIBUTED LOGIC

1.
2. The interface is on the client.
3. The database is on the server.
4. The application logic is distributed between the client and the server.

Advantages

 Most common architecture that can handle all types of applications.


 System programs can be distributed to the most appropriate node.
 They can be used with existing systems.

Disadvantages

 It is difficult to design.
 Difficult testing and maintenance if the client and server programs are made in
different programming languages.
 They are not handled by the 4GL GUI.

REMOTE DATA MANAGEMENT

1.
2. Both the interface and the application processes reside on the client.
3. The databases are on the server.
4. It is what we commonly imagine as a client-server application.

Advantages

 Typical 4GL GUI tool configuration.


 Well suited for end-user decision support applications.
 Easy to develop since the application programs are not distributed.
 Host programs are downloaded.

Disadvantages
 Does not handle heavy applications efficiently.
 All data travels over the network, since there is no processing carried out by the
Host.

DISTRIBUTED DATABASE

1.
2. The interface, the application processes, and some of the database data are on the
client.
3. The rest of the data is on the server.

Advantages

 Configuration supported by 4GL GUI tools .


 Suitable for end-user support applications.
 Supports access to data stored in heterogeneous environments.
 Data location is transparent to the application.

Disadvantages

 Does not handle large applications efficiently.


 Access to the distributed database is dependent on the database management
software provider.

Definition of middleware

"It is a term that encompasses all distributed software necessary to support interactions
between Clients and Servers."

It is the link that allows a client to obtain a service from a server.

This is initiated in the client-side API module that is used to invoke a real service; this
belongs to the server domains. Neither to the user interface nor to the application logic in
the client domains.
Types of Middleware

There are two types of middleware:

1. This type allows remote document printing, transaction management, user


authentication, etc.
2. General Middleware
3. Specific service middleware

They generally work message-oriented. Work only one transaction at a time.

Functions of a server program


1.
2. Wait for customer requests.
3. Run many requests at the same time.
4. Serve VIP clients first.
5. Undertakes and operates task activities in the background.
6. It remains active permanently.

BIBLIOGRAPHY

 www.elrincondelvago.com
 Information Systems Workshop 1
 InCo – Faculty of Engineering
 2005
 www.ciber-tec.com/ads.htm
 www.virtual.unal.edu.co/cursos/sedes/manizales/4060029/lecciones/cap6-3.html
 www.pcm.gob.pe/portal_ongei/publicaciones/cultura/Lib5038

Client-server
Jump to: navigation , search

The client-server architecture is a distributed application model in which tasks are


distributed between resource or service providers, called servers , and requesters, called
clients . A client makes requests to another program, the server , which responds. This idea
can also be applied to programs that run on a single computer, although it is more
advantageous in a multi-user operating system distributed over a computer network .

In this architecture, the processing capacity is distributed between clients and servers,
although the organizational advantages due to the centralization of information
management and the separation of responsibilities are more important, which facilitates and
clarifies the design of the system. .

The separation between client and server is a logical separation, where the server does not
necessarily run on a single machine nor is it necessarily a single program. Specific types of
servers include web servers, file servers, mail servers, etc. While their purposes vary from
one service to another, the basic architecture will remain the same.

A very common arrangement is multi-tier systems in which the server is decomposed into
different programs that can be executed by different computers , thus increasing the degree
of distribution of the system.
The client-server architecture replaces the monolithic architecture in which there is no
distribution, both at the physical level and at the logical level.

The client-server network is that communications network in which all clients are
connected to a server, in which the various resources and applications available are
centralized; and that makes them available to clients whenever they are requested. This
means that all the procedures carried out are concentrated on the server, so that it contains
the requirements from the clients that have priority, the files that are for public use and
those that are for restricted use, the files that are read-only and those that, on the contrary,
can be modified, etc. This type of network can be used together if it is being used in a
mixed network.

Content
[ disguise ]

 1 Features
 2 Comparison of C/S architecture with other network architectures
o 2.1 Comparison with peer networks
o 2.2 Comparison with Client-Queue-Client architecture
 3 Multi-layer architectures
 4 Advantages
 5 Disadvantages
 6 Address
 7 Examples
 8 Client-server cooperation
o 8.1 Multiple Server
 8.1.1 Cooperation of parallel processes
 8.1.2 Database cooperation
 9 See also

[ edit ] Features
In the C/S architecture, the sender of a request is known as the client . Their
characteristics are:

 It is the one who initiates requests or requests, therefore they have an active role in
communication ( master or master device).
 Wait and receive responses from the server.
 You can usually connect to multiple servers at once.
 It typically interacts directly with end users using a graphical user interface .
 When contracting a network service, you have to take into account the connection speed
provided to the client and the type of cable used, for example: copper cable ranges
between 1 ms and 50 ms.

The recipient of the request sent by the client is known as the server . Their characteristics
are:

 When they start, they wait for client requests to arrive, thus playing a passive role in the
communication ( slave device).
 Upon receipt of a request, they process it and then send the response to the client.
 They usually accept connections from a large number of clients (in certain cases the
maximum number of requests may be limited).
 It is not often that they interact directly with end users.

[ edit ] Comparison of C/S architecture with other


network architectures
[ edit ] Comparison with peer networks

Peer networks , also known as peer-to-peer or peer-to-peer networks (abbreviated by the


acronym P2P M) are another type of network architecture.

[ edit ] Comparison with Client-Queue-Client architecture

While the classic C/S architecture requires one of the communication endpoints to act as a
server , which can be somewhat more difficult to implement, the Client-Queue-Client
architecture enables all nodes to act as simple clients, while that the server acts as a queue
that captures client requests (a process that must pass its requests to another, does so
through a queue, for example, a query to a database, then the second process connects to
the database, prepares the request, passes it to the database, etc.). This architecture allows
software implementation to be greatly simplified. The P2P architecture was originally
based on the “Client-Queue-Client” concept.

[ edit ] Multi-layer architectures


The generic client/server architecture has two types of nodes in the network: clients and
servers . Consequently, these generic architectures are sometimes referred to as two-tier or
two-tier architectures.

Some networks have three types of nodes:

 Clients interacting with end users.


 Application servers that process data for clients.
 Database servers that store data for application servers.
This configuration is called a three-tier architecture.

 Advantages of n-tier architectures :

The fundamental advantage of an n-tier architecture compared to a two-tier architecture


(or a three-tier with a two-tier) is that it separates the process outwards, this occurs to
improve the load balance on the various servers; It is more scalable.

 Disadvantages of n-tier architectures :

 It puts more load on the network, due to a greater amount of network traffic.
 It is much more difficult to program and test software than in two-tier architecture
because more devices have to communicate to complete a user's transaction.

[ edit ] Advantages
 Centralization of control: access, resources and data integrity are controlled by the server
so that a defective or unauthorized client program cannot damage the system. This
centralization also makes it easier to update data or other resources (better than in P2P
networks).
 Scalability : The capacity of clients and servers can be increased separately. Any element
can be increased (or improved) at any time, or new nodes can be added to the network
(clients and/or servers).
 Easy maintenance: With functions and responsibilities distributed among several
independent computers, it is possible to replace, repair, update, or even move a server,
while your clients will not be affected by that change (or will be minimally affected). This
independence of changes is also known as encapsulation .
 There are sufficiently developed technologies designed for the C/S paradigm that ensure
transaction security , interface friendliness, and ease of use.

[ edit ] Disadvantages
 Traffic congestion has always been a problem in the C/S paradigm. When a large number
of clients send simultaneous requests to the same server, it may cause many problems for
it (the greater the number of clients, the more problems for the server). On the contrary,
in P2P networks, since each node in the network also acts as a server, the more nodes
there are, the better the bandwidth you have.
 The classic C/S paradigm does not have the robustness of a P2P network. When a server is
down , client requests cannot be satisfied. In most P2P networks, resources are generally
distributed across several nodes in the network. Although some leave or abandon the
download; others can still finish downloading by getting data from the rest of the nodes in
the network.
 The software and hardware of a server are generally very determining. Regular personal
computer hardware may not be able to serve a certain number of customers. Specific
software and hardware, especially on the server side, is usually needed to fulfill the job. Of
course, this will increase the cost.
 The client does not have the resources that may exist on the server. For example, if the
application is a Web application , we cannot write to the client's hard drive or print
directly to the printers without first opening the browser's print preview window.

[ edit ] Address
The management methods in client server environments can be described as follows:

 Machine process address: The address is divided as process@machine. Therefore 56@453


would indicate process 56 on computer 453.
 Name Server: Name servers have an index of all server names and addresses in the
relevant domain.
 Packet Location: Broadcast messages are sent to all computers in the distributed system to
determine the address of the destination computer.
 Merchant: A merchant is a system that indexes all the services available in a distributed
system. A computer that requires a particular service will check with the service it
negotiates to see if the address of a computer that provides that service exists.

[ edit ] Examples
Most Internet services are client-server type. The action of visiting a website requires a
client-server architecture, since the web server serves web pages to the browser (the client).
When reading this article on Wikipedia , the user's computer and web browser would be
considered a client; and the computers, databases , and applications that make up Wikipedia
would be considered the server . When the user's web browser requests a particular article
from Wikipedia, the Wikipedia server collects all the information to display in the
Wikipedia database, articulates it into a web page , and sends it back to the client's web
browser.

Another example could be the operation of an online game . If there are two game servers,
when a user downloads and installs it on their computer they become a client. If three
people play on a single computer, there would be two servers, one client and three users. If
each user installs the game on their own computer, there would be two servers, three clients
and three users.

[ edit ] Client-server cooperation


[ edit ] Multiple Server

For a process to be carried out in the best way, it is preferable to use different terminals
performing the same task, rather than centralizing resources and using more hardware /
software to perform the same task. By running multiple servers, processing is faster,
response time is decentralized, and reliability is increased.

[ edit ] Cooperation of parallel processes


The same process runs simultaneously ( redundant systems ).

[ edit ] Database cooperation

If certain existing information is required, why create it again, simply interact and take
advantage of the information already created.

[ edit ] See also


The functions performed by a DBMS are very important to maintain the integrity and
consistency of the information in a database (DB).

Most of the functions are transparent to users, whether they are end users or administrators,
which is why a DBMS provides abstraction towards its operators, meaning that in some
cases we are not aware of the functionalities that are carried out in the background.

These features include:

 Managing a data dictionary


 Data storage management
 Data transformation and presentation
 Security management
 Multiple user access control
 Backup and recovery management
 Data integrity management (transactions)
 Use of database access language
 Application programming interfaces
 Communication interfaces with databases

Overall, let's look at the following image


The Database Organizing System (DBMS)

The DBMS is a set of programs that are responsible for


managing the creation and all access to databases. It is
composed of a data definition language (DDL: Data
Definition Language), a data manipulation language (DML:
Data Manipulation Language) and a query language (SQL:
Structured Query Language).

Data definition language (DDL) is used to describe all the


information structures and programs that are used to build,
update, and enter the information contained in a database.

Data Manipulation Language (DML) is used to write


programs that create, update, and extract information from
databases.

The query language (SQL) is used by the user to extract


information from the database. The query language allows
the user to make data requests without having to write a
program, using instructions such as SELECT, PROJECT and
JOIN.

The conceptual sequence of operations that occur to access


certain information contained in a database is as follows:
1 The user requests certain information contained in the
database.
The DBMS intercepts this request and interprets it.
The DBMS performs the necessary operations to access
and/or update the requested information.
1 - DATABASE MANAGEMENT SYSTEMS (DBMS)

Tutorial created by Javier.


January 12, 2007
Online collaboration Work as a team online. Try TeamViewer for free today!
www.TeamViewer.com
Google Ads
1 2 3 4 5 6 | next >
""

A DBMS (Database Management System) is a computer-based system (software) that


manages a database, or a collection of databases or files. The person who manages a
D0BMS is known as the DBA (Database Administrator).

USES AND FUNCTIONS OF A DBMS

Database management systems are used to:

• Allow users to access and manipulate the database by providing methods to build data
processing systems for applications that require access to data.

• Provide administrators with the tools that allow them to perform maintenance and data
management tasks.

Some of the functions of a DBMS are:

• Definition of the database - how the information will be stored and organized.

• Database creation – storing data in a defined database.


• Data recovery - queries and reports.

• Updating data – changing the contents of the database.

• Programming of applications for software development.

• Control of the integrity of the database.

• Monitoring the behavior of the database.

You might also like