DBMS Module1-5
DBMS Module1-5
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.
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.
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
> 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
TYPES OF KEYS
MODULE 4
E-R diagrams represent the logical structure of a
database.
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.
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
• Redundant Tables
• Combination of Tables
6. Reduction of Generalization
7. Reduction of Aggregation