Managing Data Resources
Managing Data Resources
Database
Lecture 5
Data and Information
Data – A collection of raw facts and figures. Data is
an encoded representation of information.
2
File Organization Terms and Concepts
3
Northern University Bangladesh is a government approved
private university. It runs it’s operation under IBAT Trust. It
established in 2002.
Document
Northern University Bangladesh is a government approved
private university. It runs it’s operation under IBAT Trust. It
established in 2002.
Word Northern
Letter N
4
Example
Hierarchy Student Database
Course File Financial File
Database
Personal History File
Course File
NAME COURSE GRADE
Asad CIT 3303 A+
File Faisal CIT 3303 B
Titu CIT 3303 C
Bit 0
6
Byte
A group of 8 bits called a byte that represents a single
character, which can be a letter, a number or another
symbol.
7
Field
The next higher level of data is the field or data item.
A grouping of characters into a word, a group of
words or a complete number (such as a person’s
name or age) is called a field.
8
Record
Record is a group of interrelated fields, such as
student’s name, the course taken and the grade
comprises a record.
9
File
A group of related records of the same type is forms
a data file or table. Thus, an employee file contains the
records of the employees of a firm.
10
Primary key
Every record in a file should contain at least one field that
uniquely identifies that record so that the record can be
retrieved, update or sorted.
Primary key is one or more fields (columns) whose
values uniquely identify each record in a table.
A primary key cannot allow Null values and must always
have a unique index.
Emp_id Emp_name DOJ
1001 Jon 20-Jun-2009
1002 William 12-Jul-2009
1003 William 20-Jul-2009
11
Past System for Managing Information
The information is stored in permanent system files. A
number of application programs are written to
manipulate the files.
General
Personnel
Ledger
File File
Production
Payroll
Planning
File File
Invoicing Inventory
File File
Order
Despatch
Entry
File File
12
File Organisation
Sequential Files
records are stored in a fixed sequence
records can only be read in that sequence, starting from the first
record
records can only be added at the end of the file (append)
sequential files are not efficient
Indexed Files
Use an index to access records in a random fashion.
Records can be sorted according to an attribute or preference.
(e.g Alphabetically, Ascending, Descending, etc.)
Indexed files are efficient, and faster to access.
13
Drawbacks of using file systems
1. Data Redundancy and Inconsistency
2. Program data dependence
3. Lack of flexibility
4. Poor Security
5. Lack of Data Sharing and Availability
14
Data Redundancy and Inconsistency
Data redundancy is the presence of duplicate data
in multiple data files so that the same data are
stored in more than one place or location.
15
Program data dependence
Program data dependence refers to the coupling of
data stored in file and the specific programs
required updating and maintaining those files such
that the changes in programs require changes to
the data.
16
Lack of Flexibility
A traditional file system can deliver routine scheduled
reports after extensive programming efforts, but it can
not deliver ad hoc reports.
17
Poor Security
Because there is little control or management of data,
access to and dissemination of information may be out
of control. Management may have no way of knowing
who is accessing or even making changes to the
organization’s data.
18
Lack of Data Sharing and Availability
The lack of control over access to data in this confused
environment does not make it easy for people to
obtain information. Because pieces of information in
different files and different parts of the organization
cannot be related to one another, it is virtually
impossible for information to be shared or accessed in
a timely manner. Information cannot flow freely across
different functional areas or different parts of the
organization. If users find different values of the same
piece of information in two different systems, they may
not want to use these systems because they cannot
trust the accuracy of their data.
19
The Database Approach to Data
Management
General
Personnel
Ledger
Production
Payroll
Planning
Invoicing Inventory
Order
Despatch
Entry
20
Database
A database is collection of data, or information that
is organized so that specific information can be easily
located and retrieved.
Examples:
Phone book
University grading system
Airline reservation system
21
Database Management Systems (DBMS)
A database management system is an integrated
collection of programs that are used to create and
manage information in a database.
22
Database Management System (Cont…)
Four basic functions performed by all DBMS are:
Create, modify, and delete data structures, e.g.
tables
Add, modify and delete data
Retrieve data selectively
Generate reports based on data
23
DBMS Languages
Data-Definition Language (DDL) : DDL concerned with
defining the structure of the database.
Data-Manipulation Language (DML): DML concerned
with querying and manipulating the data in the database. They
are basically two types:
24
Advantages of Database
Reduced data redundancy
Allow easy file updating
Reduced updating errors and increased consistency
Greater data integrity and independence from applications
programs
Improved data access to users through use of query languages
Improved data security
Reduced data entry, storage, and retrieval costs
Facilitated development of new applications program
Increase user productivity
Many people can access the same database at the same time.
25
Disadvantages of Database
Database systems are complex, difficult, and time-
consuming to design
significant hardware and software start-up costs
Damage to database affects virtually all applications
programs
Extensive conversion costs in moving form a file-
based system to a database system
Initial training required for all programmers and users
26
Database Objects
Four objects that are common in all database
are:
27
Data Models
Data model is a collection of conceptual tools for
describing data, data relationships.
Hierarchical model
Network model
Relational model
Object-oriented model
Entity-Relationship model
28
Hierarchical data model
The hierarchical data model organizes data in a tree structure.
There is a hierarchy of parent and child data segments.
Here a parent may have more than one child but a child always
has only one parent. To find a particular record, you have to
start at the top with a parent and trace the chart to the child.
The hierarchical DBMS is used to model one to many
relationships.
NUB
Faculty of Faculty of
Science Business
CSE CS MBA
BBA
29
Network Database Model
A network database is similar to hierarchical DBMS, but each
child record can have more than one parent record. Thus a
child record may be reached through more than one parent.
Network DBMS show data logically many to many
relationships.
This arrangement is more flexible than the hierarchical one.
University class scheduling system
CIT 1101 CIT 3303 MIS 4102
SMR BA ZH
30
Relational Database Model
The relational model uses a collection of tables to represent
both data and the relationships among those data.
In a relational database, relates or connects data in different
files through the use of a key field, or common data element.
Reduces data redundancy.
31
Object-Oriented Database Model
Many applications today and in the future will require
databases that can store and retrieve not only
structured numbers and characters but also drawing,
images, photographs, voice and full motion video.
Object oriented databases are well suited to handling
graphics based or multimedia applications.
32
Entity Relationship Model
Models an enterprise as a collection of entities and
relationships.
Entity: a “thing” or “object” in the enterprise that is
distinguishable from other objects. Described by a set of
attributes.
Relationship: an association among several entities.
teacherID name courseNo title
33
Any Question
?
34
Thanks to All
35