DBMS Session 1 & 2
DBMS Session 1 & 2
DBMS Session 1 & 2
System
Business processes executed by individuals and organisations require both present
and historical data. Therefore, data storage is essential for organisations and
individuals.
Social media
Every time we access social media, we interact, collaborate and share content with
other people. The owners of social media platforms store the data.
Why Data
storage ??? Supermarket
A supermarket stores different types of information about its products, such as
quantity, prices and type of product.
Every time we buy anything from the supermarket, quantities must be reduced and
the sales information must be stored.
Company
A company will need to hold details of its staff, customers, products, suppliers and
financial transactions.
If there are a small number of records to be kept, and these do not need to be
changed very often, a card index might be all that is required.
How to
maintain data? However, where there is a high volume of data, and a need to manipulate this
data on a regular basis, a computer-based solution will often be chosen.
This might sound like a simple solution, but there are a number of different
approaches that could be taken.
The term 'file-based approach' refers to the situation where data
is stored in one or more separate computer files defined and
managed by different application programs.
Traditional file-
based For example, the details of customers may be
stored in one file, orders in another, etc.
approach
The file-based approach use application programs that deal with
purchase orders, invoices, sales and marketing, suppliers,
customers, employees, and so on.
Different applications
will each have their
own copy of the files
•Data duplication: Each program stores its own separate files. If the same data is
to be accessed by different programs, then each program must store its own copy
of the same data.
Limitations •Data inconsistency: If the data is kept in different files, there could be problems
when an item of data needs updating, as it will need to be updated in all the
of File-based relevant files; if this is not done, the data will be inconsistent, and this could lead
to errors.
approach
•Difficult to implement data security: Data is stored in different files by
different application programs. This makes it difficult and expensive to
implement organisation-wide security procedures on the data.
Approach to solving the problem of each application having its own set of
files is to share files between different applications.
File incompatibility: When each department had its own version of a file for
processing, each department could ensure that the structure of the file suited its
specific application. If departments have to share files, the file structure that suits
one department might not suit another.
The shared file Difficult to control access: Some applications may require access to more data
approach than others; for instance, a credit control application will need access to customer
credit limit information, whereas a delivery note printing application will only need
access to customer name and address details.
Review question 3
What are the problems that remain with the shared file approach?
The database approach is an improvement on the shared
file solution as the use of a database management system
The database
(DBMS) provides facilities for querying, data security and
approach
integrity, and allows simultaneous access to data by a
number of different users.
What is
Database
???
Interface Example:
Modifying the file organization technique in the Database
between Changing the access method.
three-level
Modifying indexes.
To change the Location of Database from say C drive to D Drive.
architecture Logical data independence
The interface between the external schema and the conceptual schema.
Example:
To Add/Modify/Delete a new attribute
Merging two records into one
Data Model: A data model is a collection of conceptual tools for
describing data, data relationships, data semantics, and
consistency constraints.
Create
Database Course_ID
Course Table
Course_Name
Entity: An entity is a “thing” or “object” in the real world that is
distinguishable from all other objects. For example, each person in
an enterprise is an entity.
Attribute: Column or features of a table.
Simple and composite attributes: the attributes have been simple;
that is, they are not divided into subparts called "simple attributes".
Example- ID
Data Model The attribute can be divided into subparts called "composite
attributes".
Entity and Example- first-name
Attribute
Single-valued and multivalued attributes: Student ID have only
one value and Phone can be multiple.
Derived attribute: The value for this type of attribute can be
derived from the values of other related attributes or entities.
Example – Age from DOB
Primary key: It denotes the unique identity in any table.
A primary key is used to ensure data in the specific column is
unique. It is a column that cannot have NULL values.
Foreign key: A foreign key is a column or group of columns in a
relational database table that provides a link between data in two
tables.
Example: STUD_NO in STUDENT_COURSE is a foreign key to
STUD_NO in STUDENT relation.
Keys:
Relational
Model
The relational Model
represents the
database as a
collection of relations.
A relation is nothing
but a table of values
Retrieve data
from multiple
tables using a
query.
SQL, Oracle,
MS Access
ER Diagram stands for Entity Relationship Diagram, also known as
ERD is a diagram that displays the relationship of entity sets stored
in a database. In other words, ER diagrams help to explain the
logical structure of databases. ER diagrams are created based on
three basic concepts: entities, attributes and relationships.
Basic steps to
create a Create database using
database Normalization tables and their
relation
Database is ready to
use
A data warehouse is a central repository of information that can
be analysed to make more informed decisions.
Data flows into a data warehouse from transactional systems,
Data relational databases and other sources. Business analysts, data
engineers, data scientists, and decision makers access the data
Warehouse through different tools, SQL clients, and other analytics
applications.
A data warehouse may contain multiple databases.
Within each database, data is organized into tables and columns.
How does a Within each column, you can define a description of the data,
such as integer, data field, or string.
data Tables can be organized inside of schemas, which you can think of
warehouse as folders.
Data mining is
defined as a Process of data mining
process used to Business Understandings
extract usable data Data Understandings
from larger set of Data Preparation
any raw data. Modelling
Evaluation
Deployment
Web content mining refers to the process of extracting data from
web pages in order to search different patterns trends that gives
useful insight.
Web Mining Web mining refers to the process of extracting information from the
web document and services, hyperlinks, and server logs.
OLAP (online analytical processing) is a computing method that
enables users to easily and selectively extract and query data in
OLAP (online order to analyse it from different points of view.
analytical OLAP business intelligence queries which is used to trends
analysis, financial reporting, sales forecasting, budgeting and
processing) other planning purposes.
It handles historical data.
Queries
???
Thank You
Dr. Rajani Kumari