You are on page 1of 7

DATABASE MANAGEMENT SYSTEM W/LAB REVIEWER AJSD

MODULE 1 Data management (reservoir) is a discipline that


focuses on the proper generation, storage, and retrieval
A database system simplifies managing the data and of data.
extracting useful information quickly.
• it should not surprise you that data
▪ A database system is an integrated collection of management is a core activity for any business,
related files and the details of the interpretation government agency, service organization.
of the data.
DATA = RAW BASE = STORAGE
▪ A Database Management System is a software
system or program that allows access to data A database is a shared, integrated computer structure
contained in a database. that stores a collection of
▪ The objective of the DBMS is to provide a
convenient and effective method of defining, 1. End-user data—that is, raw facts of interest to the
storing, and retrieving the information stored in end-user.
the database. 2. Metadata, or data about data, integrates and
manages the end-user data.

DATA - Data refers to raw facts that describe a particular Databases are organized by fields (used to define and
phenomenon. store data), records (are logically connected set of one
or more fields that describes a person, place, or thing),
- Collection of records and files (are a collection of related records).
DATUM – the correct singular form of data- Latin for a - DATABASE: R-table (Relation)
given fact
1. Fields – column
DATA – it is the backbone of the information
2. Records – raw
- Processed data
3. Files – collection of raw
INFORMATION - the data with a particular meaning in a
particular context. COMPONENTS OF A DATABASE

CONTEXT gives the data its meaning, and that data can Physical Database
turn into information depending on the context. Data Items Distinct phase of information
Information Relationships Correspondence between various
data such indeterminate relationship
- the result of processing raw data to reveal its Constraints Predictates the define correct
meaning. database
- Data that has a particular meaning in a Schema Organizations of data relationships
particular context.

Data are the foundation of information, which is the Types of Databases (classifications)
bedrock of knowledge, the body of information, and
A. Users
facts about a specific subject. Knowledge implies
1. Single-user database (Desktop database) -
familiarity, awareness, and understanding of
Supports only one user at a time.
information in an environment.
2. Multi-user database (Workgroup database) -
A key characteristic of knowledge is that “new” Supports multiple users at the same time
knowledge can be derived from “old” knowledge. (usually fewer than 50)
DATABASE MANAGEMENT SYSTEM W/LAB REVIEWER AJSD

3. Enterprise database - used by the entire 3. Semistructured data - data that have
organization and supports many users (more already been processed to some extent.
than 50, usually hundreds)
DATABASE DESIGN:
across many departments.
B. Data Location - refers to the activities that focus on the design
1. Centralized database - supports data of the database structure that will be used to
located at a single site. store and manage end-user data.
2. Distributed database - supports data - Data is a valuable asset
distributed across several different sites.
3. Cloud database - A database is created and A database management system (DBMS)
maintained using cloud data services, such - Program or group of programs that work in
as Microsoft Azure or Amazon’s AWS. conjunction with the operating system to
create, process, store, retrieve, control, and
C. Classification by the Type of Stored Data manage the data.
1. General-purpose databases - contain a wide - It acts as an interface between the application
variety of data used in multiple disciplines program and the data stored in the database.
2. Discipline-specific databases - contain data
focused on specific subject areas. The data in 1. Define, create and organize a database: establishes
this type of database are used mainly for the logical relationships among different data elements
academic or research purposes within a small in a database and defines schemas and subschemas
set of disciplines. using the DDL.

D. Classification by Data Usage 2. Input data: It performs the function of entering the
data into the database through an input device (like a
1. Operational database (Online Transaction data screen or voice-activated system) with the help of
Processing) - support a company’s day-to- the user.
day operations.
2. Analytical database - storing historical data 3. Process data: It performs the function of
and business metrics used exclusively for manipulating and processing the data stored in the
tactical or strategic decision-making. database using the DML.
2.1. Data warehouse is a specialized 4. Maintain data integrity and security: It allows limited
database that stores data in a format access to the authorized database to maintain data
optimized for decision support. integrity and security.
2.2. Online Analytical Processing (OLAP) is
a set of tools that work together to provide 5. Query database: It provides information to the
an advanced data analysis environment for decision-makers that they need to make important
retrieving, processing, and modeling data decisions. This information is provided by querying the
from the data warehouse (later evolved database using SQL.
into its discipline: business intelligence).
COMPONENTS OF A DBMS
E. Classifications by Data Structure
1. Data Definition Language (DDL) - allows the users to
1. Unstructured data exist in their original define the database specify the data types, data
(raw) state—that is, in the format, they structures, and constraints on the data to be stored in
were collected. the database.
2. Structured data are the result of formatting
2. Data Manipulation Language (DML) and Query
unstructured data to facilitate storage, use,
Language - allows users to insert, update, delete and
and the generation of information.
DATABASE MANAGEMENT SYSTEM W/LAB REVIEWER AJSD

retrieve data from the database. SQL provides a general 1. Record Based Data Models. These models represent
query facility. data by using the record structures.

3. Software for Controlled Access of Database - a. Hierarchical Data Model organizes records in a tree
provides the facility of controlled access of the database structure. - Record and Parent -Child Relationship
by the users, concurrency control to allow shared access
b. Network Data Model permits a child record to have
of the database, and a recovery control system to
more than one parent. —Records and Sets. The record
restore the database in case of hardware or software
contains detailed information regarding the data, which
failure.
are classified into record types.

➢ directed graphs are used instead of tree


Module 2 structure in which a node can have more than
parent.
Data model – a relatively simple representation of more ➢ Standardize as the CODASYL BTC model
complex real-world data structures, usually graphical.
c. Relational model presents data in the form of tables
- data model within the database environment which is used interchangeably with the word Relation.
represents data structures; characteristics,
➢ Each table consists of rows, also known as
relations, constraints, transformations, etc.
tuples
Model - an abstraction of a more complex real-world ➢ Column known as attributes.
object or event.
Relational Data Model – data is represented in the form
- Its primary function is to help you understand of tables which is interchangeably with the relation of
the complexities of the real -world rows (tuples) and columns (attributes)
environment

Data Modeling - It is a blue-print – an iterative


2. Object -Based Data Models (conceptual models) it
progressive process.
defines concepts, including entries, attributes, and
State and Transitions or STD = data relationships between them.

Data Models Basic Building Blocks ➢ It describes data at the logical and user view
levels.
(1)Entity represents a particular type of object a. Entity-relationship (E-R) Model uses entity-
(distinguishable) in the real world. relationship (E-R) diagrams
➢ It could be physical objects or abstractions b. Object -Oriented model is a logical data model
that captures the semantics of objects
(2) Attribute is a characteristic of an entity. Attributes supported in object-oriented programming
are the equivalent of fields in file systems. (OOP.)
(3) Relationship describes an association among c. Semantic Data Model – organizes the represent
entities. knowledge but not data.
d. Functional Data Model – describes the
(4) Constraint is a restriction placed on the data. They computation within a system.
help to ensure data integrity. Constraints are normally -transforming values-functions, mappings,
expressed in the form of rules. constraints, and functional dependencies.

3. Physical Data Models - describe the details of how


the data is stored. Only specialized or professional users
TYPES OF DATA MODELS
can use these models.
DATABASE MANAGEMENT SYSTEM W/LAB REVIEWER AJSD

These data models can be divided into two types: 5. Derived Attributes – attribute that can be
derived from another known attribute
a. Unifying Model
6. Stored Attributes – attribute that cannot be
b. Frame Memory Model derived by other known attributes

NULL Value: stands for nothing. If the value of that


attribute has null value, it is not known or the value is
not applicable.

Module 3 ➢ Null is equal to 0. It can also be blank (-)

> The E-R model is mainly used for conceptual data Relationship Sets
modeling.
a) Relationship: an association among several
> The E-R model is mainly used for communication entities. It connects diff. entities through a
between database designers and end-users during the meaningful relationship.
analysis phase of database development. b) Relationship Set: set of the same type.
b.2) Descriptive Attributes: Attributes of any
> E-R model is a representation of the structure and relationship set.
constraints of a database that is independent of the
DBMS and its associated data model that will be used to Degree of Relationship Sets
implement the database.
- The total number of entity sets in a relationship
Enterprise – any kind of organization. Ex. Colleges, set.
schools, banks, etc. 1. Binary Relationship Set: only two entity sets
involved
Entity – an “object” or “thing” on the real world. An 2. Ternary Relationship Set: three entity sets
object may be any person or place, event, etc. Ex. involved
Students of colleges and schools, loans in banks,
employee in any company Role: The function of any entity in the relationship set

Attributes are the characteristics of any entity Recursive Relationship Set: When the same entity sets
participate in the same relationship set more than once
Value is the information or data stores in attributes of with different roles each time
any entity
Mapping Cardinalities (Cardinality Ratios)
Entity sets – all entities having the same attributes that
make an entity set. - It specifies the number of entities of an entity
set that are associated with entities of another
Domain / Value Set – set of all values or information abt entity set through a relationship set.
any attributes.
1. One to One (1:1): An entity in X is associated with at
Types of Attributes most one entity in Y, and an entity in Y is associated with
1. Simple Attributes – those which cannot be at most one entity in X.
divided into subparts. 2. One to Many (1:N): An entity in X is associated with
2. Composite Attributes – those which can be any number of entities in Y. An entity in Y is associated
divided into subparts. with at most one entity in X.
3. Single Valued Attribute – attribute having
only a single value for a particular entity. 3. Many to One (N:1): An entity in X is associated with
4. Multi-Valued Attributes – attribute with more at most one entity in Y. An entity in Y is associated with
than one possible value for a particular entity. any number of entities in X.
DATABASE MANAGEMENT SYSTEM W/LAB REVIEWER AJSD

4. Many to many (M:N): An entity in X is associated with


any number (zero or 1 more) of entities in Y and vice
versa.

TYPES OF KEYS

- A key is an attribute or set of attributes used to


identify data in entity sets.
- The attributes which are used as key are known
as key attributes.
- The rest of all are known as Non-key attributes.

1. Super Key: set of collections of one or more


than attributes that can identify data uniquely.
Any entity set has more than one super key.
2. Candidate Key: (minimal key)
3. Primary Key: used to denote Candidate Key. An
4. Alternate Keys: All the candidate keys other
attribute that identifies data uniquely.
than the Primary Key.
-Any entity can have more than one Candidate
5. Secondary Key; An attribute or set of attributes
key but only one Primary Key.
that don't identify data uniquely but identifies a
group of data
6. Foreign Key: An attribute or set of attributes
that don't identify data uniquely but identifies a
group of data

MODULE 4
E-R diagrams represent the logical structure of a
database.

➢ An ERD the relationships of entity sets stored in


a database.
➢ An entity set is a collection of similar entities.

ADVANTAGES OF E-R MODEL

1. Straightforward relation representation: The


database model's relation representation using
the E-R diagram is relatively more
straightforward than other models.
2. Mapping with relational model: It can be easily
mapped onto the relational model. The E-R
diagrams used in the E-R model can easily be
transformed into relational tables. The entities
and attributes of the E-R model can easily be
DATABASE MANAGEMENT SYSTEM W/LAB REVIEWER AJSD

transformed into relations (tables) and columns Superclass Entity Type (Supertype): a generic entity
(fields) in a relational model. type that includes one or more distinct subclasses
3. Communication tool: It is straightforward to required to be represented in a data model.
understand with a minimum required training.
- It means members belonging to the subclass are
Therefore, the database designer can use the
the same as the entity in the superclass. A
model to communicate the design to the end-
superclass and a subclass is a one-to-one (1:1)
user.
relationship. In some cases, a superclass can
4. Design tool: E-R model can also be used as a
have overlapping subclasses.
design plan by the database developer to
implement a data model in specific database Subclass Entity Type (Subtype): A subclass entity
management software. type is a more specialized entity type that has a
5. Easy conversion to other models: E-R diagrams distinct role in the organization.
can be easily converted to a network or
hierarchical data model. - a member of the superclass.
6. Graphical representation: E-R model provides a - may be further divided, it acts as a superclass
graphical and diagrammatical representation of for its subclasses.
various entities, their attributes, and Specialization includes subgrouping entities within an
relationships between entities. entity set having some distinct nature than other
7. Easy to modify: Modifications to the E-R entities. Specialization is a process by which any
diagram at a later stage is relatively easier than existing entity set is divided into smaller entity sets
in other models. according to the distinct or different of entities.

Generalization – when two or more entity sets can be


Limitation of E-R Model: E-R model cannot express combined into a single entity set by determining
relationships between relationships. In other words, the similarities (common features) between the entities.
E-R model cannot express the relationship set between - it is an abstract view of any Enterprise.
relationship sets.
3. Specialization and generalization lead to attribute
Types of Entity Sets inheritance between higher-level entity sets and lower-
1. Strong Entity Sets: Entity sets having any key level entity sets. Inheritance is when a lower-level entity
attributes are known as Strong Entity sets. set inherits (or takes) some properties of its higher-level
2. Weak Entity Sets: Entity sets having no key entity set.
attributes are known as Weak Entity sets. 4. Aggregation is an abstraction process in which a
relationship set is considered a higher-level entity set.

MODULE 5 TYPES Of CONTRAINTS:

EER model is the enhanced version of the E-R model, 1. Participation Constraints: tell the participation of
which includes all the basic concepts of the E-R model entity set in relationship sets.
with the capability to support additional semantic There are two types of participation.
concepts of complex applications.
• Partial participation: If only some entities from
the E-R model can be divided into more specialized entity set E participates in relationships in set R.
sub-models or can join some sub-models to make a • Total participation: If every entity from entity
generalized E-R model. set E is participated with at least one relation in
relationship set R.
DATABASE MANAGEMENT SYSTEM W/LAB REVIEWER AJSD

2. Disjoint Constraints: describe the relationship


between members of different subclasses.

3. Categorization is a modeling process of a single


subclass having a relationship with more than distinct
superclasses.

• The subclass having more than one superclass is


known as a category, and the process of
defining a category is known as categorization.

Reduction of an E-R Diagram and EER Diagram into


Tables E-R diagrams have to be reduced in tables to
represent the database in tabular form. For each entity
set, make a different table and for each relationship, set
make a different table.

1. Reduction of strong Entity Sets into Tables

2. Reduction of Composite Attributes

3. Reduction of Multi-valued Attributes

4. Reduction of Weak Entity Sets

5. Reduction of Relational Sets

• Redundant Tables
• Combination of Tables

6. Reduction of Generalization

7. Reduction of Aggregation

You might also like