0% found this document useful (0 votes)
3 views48 pages

Database Systems - Chap

The document provides an overview of database systems, including definitions of databases, data, and information, as well as the structure of fields, records, and files. It discusses Database Management Systems (DBMS), their advantages and disadvantages, and various data models such as relational, object-oriented, and NoSQL. Additionally, it covers database architecture, schemas, and the different types of database languages including DDL, DML, DCL, and TCL.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views48 pages

Database Systems - Chap

The document provides an overview of database systems, including definitions of databases, data, and information, as well as the structure of fields, records, and files. It discusses Database Management Systems (DBMS), their advantages and disadvantages, and various data models such as relational, object-oriented, and NoSQL. Additionally, it covers database architecture, schemas, and the different types of database languages including DDL, DML, DCL, and TCL.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

DATABASE

SYSTEMS
CHAP. 1: Overview
1
Database
•Integrated collection of stored operational
data used by the application systems of a
particular enterprise.
•Example:
• Mass storage-weather records
• Telephone records
• Electoral rolls

2
Data
•Representations of raw facts, concepts, or
instructions in a formalized manner suitable for
communication, interpretation, or processing by
humans or by automatic means.
•Any representation such as characters or analog
quantities to which meaning is or might be
assigned.
3
Information
•Meaning that a human
assigns to data by means of
the known conventions used
in their representation.
4
Data & Information

5
Field, Records, Files
• Field (Columns)
• Group of characters with specific meaning, headings corresponding
to the attributes of the object.
• Record (Row)
• Logically connected fields that describe a person, place, or thing,
one set of attributes (or one tuple) corresponding to one instance of
the entity that a table schema describes.
• File
• Collection of related records

6
DBMS
•Database Management System
(DBMS)
• Collection of programs that enables users to create
and maintain the database.

7
Advantages of DBMS
• Controlling redundancy
• Providing storage structure for efficient
query processing.
• Restricting unauthorized users.
• Providing concurrency.
• Providing backup and recovery.
• Enforcing integrity constraints.
8
Disadvantages of DBMS
• Centralization:That is use of the same program
at a time by many user sometimes lead to loss of
some data.
• High cost of software.
• Technical experties are required
• Power dependency
• Reporting features like charts of a spreadsheet
like Excel may not be available in RDBMS.
9
Data model
•Set of concepts that can be used to
describe the structure of a database:
the data types, relationships,
constraints, semantics and
operational behaviour.
•It is a tool for data abstraction.
10
Data model operations
•Operations for specifying database
retrievals and updates by referring
to the concepts of the data model.
•Operations on the data model may
include basic operations and user-
defined operations.
11
Categories of data models
•Conceptual:
•Describes WHAT the system contains.
•Logical:
•Describes how the system will be
implemented, regardless of the DBMS
• Physical:
•Describes HOW the system will be
implemented using a specific DBMS.
12
Categories of data models

13
Database Models
•Theoretical foundation of a database and
fundamentally determines in which manner
data can be stored, organized, and
manipulated in a database system.
•It thereby defines the infrastructure offered
by a particular database system.

14
Database Models
• Flat
• Hierarchical
• Network
• Relational
• Object-Oriented
• Object-Relational
• NoSQL
• XML
15
Flat Database Model
•Aka table model, consists of a single,
two-dimensional array of data elements,
where all members of a given column are
assumed to be similar values, and all
members of a row are assumed to be
related to one another.
16
Flat Database Model

17
Hierarchical Database Model
•Data in a tree structure .
•Hierarchy of parent and child data
segments, this structure implies that a
record can have repeating information,
generally in the child data segments, data in
a series of records, which have a set of field
values attached to it
18
Hierarchical Database Model

19
Network Database Model
• Organizes data using two fundamental
constructs, called records and sets.
• Records contain fields
• Sets define one-to-many relationships between
records: one owner, many members.
• A record may be an owner in any number of sets,
and a member in any number of sets.
20
Network Database Model

21
Relational Database Model
•Allows the definition of data structures,
storage and retrieval operations and
integrity constraints.
•Data and relations between them are
organized in tables.
•Table is a collection of records and each
record in a table contains the same fields.
22
Relational Database Model

23
Object-Oriented Database Model
•Based on object-oriented
programming, associating methods
with objects that can benefit from
class hierarchies.
•Thus, “objects” are levels of
abstraction that include attributes and
behavior.
24
Object- Relational Database Model
•Combination of a Object oriented database
model and a Relational database model.
•Supports objects, classes, inheritance etc.
just like Object Oriented models and has
support for data types, tabular structures
etc. like Relational data model.

25
NoSQL Database Model
•Model that is not reinforced by a
relational database management
system (RDBMS).
•Model isn't explicit about how the
data relates – how it all connects
together.
26
XML Database Model
•Described in terms of sequences and items,
atomic values, and nodes.
•The XPath data model is based on the notion of
a sequence.
•The value of an XPath expression is always a
sequence.
•A sequence is an ordered collection of zero or
more items.
27
Database Schema
•Structure that represents the logical
storage of the data in a database.
•It represents the organization of data
and provides information about the
relationships between the tables in a
given database.
28
Schema Diagram
•Diagrammatic display of (some
aspects of) a database schema.

29
Schema Diagram

30
Database Architecture
•Set of specifications, rules, and processes
that dictate how data is stored in a
database and how data is accessed by
components of a system.
•It includes data types, relationships, and
naming conventions.
31
Database Architecture (Cont.)
•Describes the organization of all database
objects and how they work together.
•It affects integrity, reliability, scalability, and
performance.
•Involves anything that defines the nature of
the data, the structure of the data, or how the
data flows.
32
Three Schemas Architecture
•External schema (many schemas
may exist)
•Conceptual schema (only one per
database)
•Internal schema (only one per
database)
33
External Schema
- Describes a subset of the database that a
particular user group is interested in,
according to the format user wants, and
hides the rest
- May contain virtual data that is derived
from the files, but is not explicitly stored
34
Conceptual Schema
- Hides the details of physical
storage structures and concentrates
on describing entities, data types,
relationships, operations, and
constraints.
35
Internal Schema
- Describes the physical storage
structure of the DB - uses a low-
level (physical) data model to
describe the complete details of
data storage and access paths
36
Three Schemas Architecture(Cont.)
• The DBMS is responsible for mapping between
the three types of schema (i.e. how they actually
correspond with each other).
• Each external schema is related to the
conceptual schema (external/conceptual
mapping).
• A conceptual/internal mapping relates the
conceptual schema to the internal schema.
37
Three Schemas Architecture(Cont.)

38
Three Schemas Architecture(Cont.)

39
Database languages
•Data Definition Language (DDL)
•Data Manipulation Language (DML)
•Data control language (DCL)
•Transaction control language (TCL)

40
DDL
• Creates the framework of the database by specifying
the database schema, which is the structure that
represents the organization of data.
• Its common uses include the creation and alteration of
tables, files, indexes and columns within the database.
• This language also allows users to rename or drop the
existing database or its components.
41
DDL
• CREATE: Creates a new database or object, such as a
table, index or column
• ALTER: Changes the structure of the database or
object
• DROP: Deletes the database or existing objects
• RENAME: Renames the database or existing objects

42
DML
• Provides operations that handle user requests,
offering a way to access and manipulate the
data that users store within a database.
• Common functions include inserting, updating
and retrieving data from the database.

43
DML
❑ INSERT: Adds new data to the existing database
table
❑ UPDATE: Changes or updates values in the table
❑ DELETE: Removes records or rows from the table
❑ SELECT: Retrieves data from the table or multiple
tables

44
DCL
•Controls access to the data that users store
within a database.
•Controls the rights and permissions of the
database system.
•Allows users to grant or revoke privileges to
the database.
45
DCL
• GRANT: Gives a user access to the
database
• REVOKE: Removes a user's access
to the database
46
TCL
• Manages the transactions within a database.
• Transactions group a set of related tasks into
a single, executable task.
• All the tasks must succeed in order for the
transaction to work.
47
TCL
• COMMIT: Carries out a transaction
• ROLLBACK: Restores a transaction if any tasks fail
to execute
• SAVEPOINT: Sets a point in a transaction to save
• SET TRANSACTION: Places a name on a transaction.

48

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy