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

DBMS Reviewer

The document provides an overview of database management systems and data modeling. It discusses key concepts such as data, information, databases, database management systems, data models including the entity-relationship model. The entity-relationship model represents data using entities, attributes, relationships and keys. It is useful for designing and mapping databases. The document also covers data definition languages, data manipulation languages, and other components and functions of database management systems.

Uploaded by

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

DBMS Reviewer

The document provides an overview of database management systems and data modeling. It discusses key concepts such as data, information, databases, database management systems, data models including the entity-relationship model. The entity-relationship model represents data using entities, attributes, relationships and keys. It is useful for designing and mapping databases. The document also covers data definition languages, data manipulation languages, and other components and functions of database management systems.

Uploaded by

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

DATABASE MANAGEMENT SYSTEM

MODULE 1

Data refers to raw facts that describe a particular phenomenon.


- Use for decision making
- From the latin term, Datum

Information is the data with a particular meaning in a particular context.


- “Processed data”
- In the form of text, images, voice, etc.
- The foundation is the DATA which is the way of knowledge.

Data management is a discipline that focuses on the proper generation, storage, and retrieval
of data.
- Query is used on retrieving data.
- GIGO ( garbage in, garbage out).

CORE ACTIVITIES OF DATA MANAGEMENT

A database is a shared, integrated computer structure that stores a collection of the following:

1. End-user data — that is, raw facts of interest to the end-user.


2. Metadata, or data about data, integrates and manages the end-user data.

Databases are organized by:


- FIELDS refers as columns
- RECORDS refers as values <actual data>
- FILES refers as collection of related records

COMPONENTS OF DATABASE

1. Data item is defined as a distinct piece of information.


2. Relationships represent a correspondence between various data elements.
3. Constraints are the predicates that define correct database states.
4. Schema describes the organization of data and relationships within the database.

TYPES OF DATABASES

1. USERS - single user, multi-user, and enterprise.


2. LOCATION - centralized, distributed, and cloud.
3. STORE DATA - general purpose, discipline specific.
4. DATA USAGE - operational (OLTP) and analytical (data warehouse and OLAP <traces a
behavior)
5. DATA STRUCTURE - unstructured, structured, and semi-structured.
Database design refers to the activities that focus on the design of the database structure that
will be used to store and manage end-user data.

A database management system (DBMS) is a program or group of programs that work in


conjunction with the operating system to create, process, store, retrieve, control, and manage
the data.

Primary functions:
1. Define, create and organize a database
2. Input data
3. Process dat
4. Maintain data integrity and security
5. Query database

COMPONENTS OF DBMS

1. Data Definition Language (DDL). It allows the users to define the database, specify the data
types, data structures, and constraints on the data to be stored in the database.
2. Data Manipulation Language (DML) and Query Language. allows users to insert, update,
delete and retrieve data from the database.
3. Software for Controlled Access of Database.

MODULE 2 - DATA MODELS

Data modeling is the first step in the database design journey, serving as a bridge between
real-world objects and the computer database.
- is an iterative, progressive process. <pwedeng maulit>

Data Models - collection of concepts, is to understand the meaning of the data.


- A model is an abstract representation of a more complex real-world object or even.
- To describe the structure of the database.
- Represents data structures and their characteristics, relations, constraints,
transformations, and other constructs to support a specific problem domain.

DATA MODELS BASIC BUILDING BLOCKS

1. ENTITY - entity represents a particular type of object in the real world, which means an
entity is “distinguishable” in the real world.
- Implemented as TABLE in database
- Examples are PHYSICAL OBJECTS <customer> & ABSTRACTIONS <routes>

2. ATTRIBUTE - is a characteristic of an entity.


- Single atomic of information
- Example, Customer has <first name> and <last name>.

3. RELATIONSHIP - describes an association among entities.


- Examples - (a) 1:1 <employees manages store> (b) 1:N <painter paint paintings>
(c) N:N <student takes class>

4. CONSTRAINTS - is a restriction placed on the data.


- It secures the integrity of the data
- Normally express in the form of rules

TYPES OF DATA MODELS

1. RECORD BASED DATA MODELS to represent the data using Record Structure
(conceptual view).

Hierarchical Data Model organizes records in a tree structure, i.e., a hierarchy of parent
and child records relationships.
Network Data Model - records and sets. directed graphs are used instead of a tree
structure in which a node can have more than one parent.
Relational model presents data in the form of tables which is used interchangeably with
the word Relation.

2. OBJECT-BASED DATA MODELS are also known as conceptual models used to define
concepts, including entries, attributes, and relationships between them.

Entity-relationship (E-R) Model is shown diagrammatically using entity-relationship


(E-R) diagrams
Object-Oriented model is a logical data model that captures the semantics of objects
(OOP).
Semantic Data Models developed to organize and represent knowledge but not data.
Functional Data Model describes the computation within a system.

3. PHYSICAL DATA MODELS provide the concepts that describe the details of how the
data is stored.
- a. Unifying Model <to analyze data from multiple resources>
- b. Frame Memory Model <virtual view of secondary storage>

MODULE 3 - ENTITY RELATIONSHIP MODEL

- Introduced by Chen, 1976


- Under the conceptual model — entities, relationships, and attributes.
- <is to communicate with database designer to the end user>
BASIC CONCEPTS

Enterprise refers to any kind of organization. <e.g schools, banks, etc>


Entity refers to an "object" or "thing" in the real world. An object may be any person, place,
event, etc.
Attributes are the characteristics of any entity.
Value is the information or data stored in attributes of any entity.
Entity Sets refer to all entities having the same attributes that make an entity set.
Domain or value set is the set of all values or information about any attribute.

TYPES OF ATTRIBUTES

1. Simple Attributes are those which cannot be divided into subparts. <e.g. Age and
student no.>
2. Composite Attributes are those which can be divided into subparts. <name (FI, MI &
LN)>
3. Single Valued Attribute: An attribute having only a single value for a particular entity.
<e.g. age>
4. Multi-Valued Attributes: An attribute with more than one possible value for a particular
entity. <e.g. Contact #>
5. Derived Attributes: An attribute that can be derived from other known attributes. <e.g.
Age - System Date - DOB>
6. Stored Attributes: An attribute that cannot be derived by other known attributes. <DOB
of any employee. NULL Value: Null stands for nothing. An attribute has a null value if
either the value of that attribute is not known or the value is not applicable.>

RELATIONSHIP SETS

1. Relationship: A relationship is an association among several entities.


2. Relationship Set: A relationship set is a set of relationships of the same type.
2.1 Descriptive Attributes: Attributes of any relationship set

DEGREES OF RELATIONSHIP SETS

1. Binary Relationship Set: A relationship set in which only two entity sets are involved.
2. Ternary Relationship Set: A relationship set in which three entity sets are involved.

ROLE AND RECURSIVE RELATIONSHIP SET

Role: The function of any entity in the relationship set is called that entity's role. <e.g., an
employee plays the worker's role in his department>
Recursive Relationship Set: When the same entity sets participate in the same relationship
set more than once with different roles each time. <e.g., A student who attends weekend
classes in college may also be a lecturer in that college.>
MAPPING CONSTRAINTS
MAPPING CARDINALITIES (CARDINALITY RATIOS)

1. One to One (1 : 1) :
2. One to Many (1 : N)
3. Many to One (N : 1)
4. Many to Many (M : N)

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 keys are known as key attributes. The rest of all are known
as Non-key attributes.

1. Super Key: A super key is a set of collections of one or more than one attributes that
can identify data uniquely. (Example: a. (ID, Name, Salary, Reg. No.)vb. (ID, Name,
Reg. No.) c. (ID) etc.)
2. Candidate Key: The minimal super key. (Example: ID and Reg. No.)
3. Primary Key: An attribute that identifies data uniquely. (Example: An entity sets an
Employee, either Reg. No. is the primary key, or ID is the primary key.)
4. Alternate Keys: All the candidate keys other than the Primary Key. (Example: An entity
set Employee, either Reg. No. is the primary key, or ID is the primary key.)
5. Secondary Key: An attribute or set of attributes that don't identify data uniquely but
identifies a group of data. (Example: Name, Salary, and Department No.)
6. Foreign Key: A foreign key is an attribute in any entity set, which is also a Primary Key
in any other entity set. (Example: Dept_ID: This is an attribute in an entity set Employee
and a primary key in an entity set Department. Thus, it is a foreign key for employees.)
MODULE 4 - ENTITY RELATIONSHIP DIAGRAM

- represent the logical structure of a database. An ERD (SmartDraw, 2021) shows the
relationships of entity sets stored in a database.
Advantages of E-R Model
The major advantages of the E-R model are as follows:

1. Straightforward 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.
3. Communication tool: It is straightforward to understand with a minimum required training.
4. Design tool: E-R model can also be used as a design plan by the database developer to
implement a data model in specific database management software.
5. Easy conversion to other models: E-R diagrams can be easily converted to a network or
hierarchical data model.
6. Graphical representation: E-R model provides a graphical and diagrammatic representation
of various entities, their attributes, and relationships between Entities.
7. Easy to modify: Modifications to the E-R diagram at a later stage is relatively easier than in
other models.

Limitation of E-R Model


Limitation of E-R Model: E-R model cannot express relationships between relationships. In other
words, the E-R model cannot express the relationship set between relationship sets.
TYPES OF ENTITY SETS

1. Strong Entity Sets - Entity sets having any key attributes are known as Strong Entity
sets.
2. Weak Entity Sets - Entity sets having no key attributes are known as Weak Entity sets.

MODULE 5 - ENHANCED ENTITY RELATIONSHIP (EER) MODEL

SUPERCLASS AND SUBCLASS ENTITY TYPES


- The most important new modeling construct introduced by EER.
- also known as supertype and subtype entities.
- can be divided into more specialized sub-models or can join some sub-models to make a
generalized E-R model.

Superclass Entity Type (Supertype): is a generic entity type that includes one or more distinct
subclasses required to be represented in a data model.
Subclass Entity Type (Subtype): is a more specialized entity type that has a distinct role in the
organization.

Example: PERSON entity (superclass entity type) - EMPLOYEE and CUSTOMER (subclass
entity type)

a. Specialization is a process by which any existing entity set is divided into smaller entity
sets according to the distinct or different nature of entities.
b. Generalization is when two or more entity sets can be combined into a single entity set
by determining similarities between the entities. If an abstract view of information is
needed, then go towards generalization.
- Specialization and generalization lead to attribute inheritance,
c. Aggregation is an abstraction process in which a relationship set is considered a
higher-level entity set.

Specialization and Generalization Constraints are applied to capture important business


rules of the relationships in an enterprise.

1. Participation Constraints tell the participation of entities set in relationship sets.


a. Partial participation: If only some entities from entity set E participates in
relationships in set R.
b. Total participation: If every entity from entity set E is participating with at least
one relation in relationship set R.

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.

You might also like