0% found this document useful (0 votes)
11 views25 pages

Lec 23-24 Database Management Systems

Uploaded by

rumanasif3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views25 pages

Lec 23-24 Database Management Systems

Uploaded by

rumanasif3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

CS09106 IICT

Lecture
(Data Management & Relational DBMS)

1
Today’s Goals
(Data Management & RDBMS)
• Today we will become familiar with the issues and
problems related to data-intensive computing
• We will find out about flat-files, the simplest
databases
• We will discuss relational databases and
implement a simple relational database

2
Data Management
• Keeping track of a few dozen data items is straight
forward

• However, dealing with situations that involve


significant number of data items, requires more
attention to the data handling process

• Dealing with millions - even billions - of inter-


related data items requires even more careful
thought
3
AmazingBooks.com (1)
• Consider the situation of a large, online bookstore

• They have an inventory of millions of books, with


new titles constantly arriving, and old ones being
phased out on a regular basis

• The price for a book is not a static feature; it varies


every once in a while

4
AmazingBooks.com(2)
• Thousands of books are shipped each day, changing
the inventory constantly

• Some are returned, again changing the inventory


situation constantly

• The cost of each shipped order depends on:


– Prices of individual books
– Size of the order
– Location of the customer
– Mode of shipment
5
AmazingBooks.com(3)
• For each order, the customer’s particulars – name,
address, phone number, credit card number – are
required

• Generally, that data is not deleted after the


completion of the transaction; instead, it is kept for
future reference

6
AmazingBooks.com(4)
• All the transaction activity and the inventory
changes result in:
– Thousands of data items changing every day
– Thousands of additional data items being added
everyday

• Keeping track & taking care (i.e. management) of


all that constantly changing and expanding data is
not a trivial task and requires disciplined attention
and actions for ensuring the smooth & profitable
operation of the bookstore
7
Issues in Data Management
• Data entry

• Data updates

• Data integrity

• Data security

• Data accessibility
8
Data Entry
• New titles are added every day
• New customers are being added every day

• Some of the above may require manual entry of


new data into the computer systems
• That new data needs to be added accurately
• That can be achieved, for one, by user-interfaces
that prevent the input of invalid data
9
Data Updates (1)
• Old titles are deleted on a regular basis
• Inventory changes every instant
• Book prices change
• Shipping costs change
• Customers’ personal data change
• Various discount schemes are always commencing
and concluding

10
Data Updates (2)
• All those actions require updates to existing data

• Those changes need to be entered accurately

• That can also be achieved by user-interfaces that


prevent the input of invalid data

11
Data Security (1)
• All the data that AmazingBooks has in its computer
systems is quite critical to its operation

• The security of the customers’ personal data is of


utmost importance. Hackers are always looking for
that type of data, especially for credit card numbers

• Enough leaks of that type, and customers will stop


doing business with AmazingBooks

12
Data Security (2)
• This problem can be managed by using appropriate
security mechanisms that provide access to
authorized persons/computers only

• Security can also be improved through:


– Encryption
– Private or virtual-private networks
– Firewalls
– Intrusion detectors
– Virus detectors
13
Data Integrity
• Integrity refers to maintaining the correctness and
consistency of the data
– Correctness: Free from errors
– Consistency: No conflict among related data items

• Integrity can be compromised in many ways:


– Typing errors
– Transmission errors
– Hardware malfunctions
– Program bugs
– Viruses
– Fire, flood, etc.
14
Data Accessibility (1)
• If the transaction and inventory data is placed in a
disorganized fashion on a hard disk, it becomes very
difficult to later search for a stored data item

• What is required is that:


– Data be stored in an organized manner
– Additional info about the data be stored
so that the data access times are minimized

15
We can write our own SW that can take
care of all the issues that we just
discussed

OR

We can save ourselves lots of time, cost,


and effort by buying ourselves a
Database Management System (DBMS)
that takes care of most, if not all, of the
issues 16
DBMS (1)
• DBMSes are popularly, but incorrectly, also known
as ‘Databases’

• A DBMS is the SW system that operates a database,


and is not the database itself

• Some people even consider the database to be a


component of the DBMS, and not an entity outside
the DBMS

17
DBMS (2)
• A DBMS takes care of the storage, retrieval, and
management of large data sets on a database
• It provides SW tools needed to organize &
manipulate that data in a flexible manner
• It includes facilities for:
– Adding, deleting, and modifying data
– Making queries about the stored data
– Producing reports summarizing the required contents

18
Database (1)
• A collection of data organized in such a fashion that
the computer can quickly search for a desired data
item

• All data items in it are generally related to each


other and share a single domain

19
Database (2)
• They allow for easy manipulation of the data

• They are designed for easy modification &


reorganization of the information they contain

• They generally consist of a collection of interrelated


computer files

20
What can be stored in a database?
• In the old days, databases were limited to numbers,
Booleans, and text

• These days, anything goes

• As long as it is digital data, it can be stored:


– Numbers, Booleans, text
– Sounds
– Images
– Video
21
Flat-File
Database

Record

Field

Record
Delimiter 22
Some Terminology (1)
• Primary Key is a field that uniquely identifies each
record stored in a table

• Queries are used to view, change, and analyze data.


They can be used to:
– Combine data from different tables, efficiently
– Extract the exact data that is desired

• Forms can be used for entering, editing, or viewing


data, one record at a time
23
Some Terminology (2)
• Reports are an effective, user-friendly way of
presenting data. All DBMSes provide tools for
producing custom reports.

• Data normalization is the process of efficiently


organizing data in a database. There are two goals
of the normalization process:
– Eliminate redundant data
– Storing only related data in a table

24
Data Mining
• The process of analyzing large databases to identify
patterns

• Example: Mining the sales records from a


AmazBooks could identify interesting shopping
patterns like “53% of customers who bought book
A also bought book B”. This pattern can be put to
good use!

• Data mining often utilizes intelligent systems’


techniques
25

You might also like