8/3/2019 DB Lecture 1
1/7
Course Diploma in Business Information and Communication Technology
(DBICT I)
Ante: CIT 056
Subject: Theories and application of database management
Lecture : Data and Information
Facilitator Mr.Shadrack Madila.(BE.CSE)
Moshi
University
College of
Co-
operative
and
Business
Studies.
1
Theories and Applications of database Management
8/3/2019 DB Lecture 1
2/7
DATA
Data are collection of facts, or data refer to any type of information such as numbers,alphabets (A,B,C etc) or symbols such as comma (,), period (: ), it also refer to a name,
address ,words sentence as well as paragraph.
DATABASE
Is a collection of related data, typical describing the activities of one or more related
organizations. For example a university database might contain information about the
following
Entity- such as students, faculty, courses and classrooms.
Relationships-between entities such as students enrollment in courses, facultyteaching courses and the use of rooms for courses.
DATABASE MANAGEMENT SYSTEM (DBMS)
Is software designed to assist in maintaining and utilizing large collections of data, and
the need for such systems, as well as well their use.
DATA INTEGRITY
Refers to the correctness and consistency of stored data. It can be considered another
form of database protection. While it is related to security, it has broader implications;
Security involves protecting the data from unauthorized operations while integrity is
concerned with the quality of the data itself. Integrity is usually expressed in terms ofconstraints which are consistency rules that the database is not permitted to violate.
Types of integrity constraints
Data integrity is normally enforced in a database systemby a series of integrityconstraints or rules. Three types of integrity constraints are an inherent part of the
relational data model: entity integrity, referential integrity and domain integrity.
Entity integrityconcerns the concept of a primary key. Entity integrity is an integrity rulewhich states that every table must have a primary key and that the column or columns
chosen to be the primary key should be unique and not null.
Referential integrityconcerns the concept of a foreign key. The referential integrity rulestates that any foreign key value can only be in one of two states. The usual state of
affairs is that the foreign key value refers to a primary key value of some table in the
database. Occasionally, and this will depend on the rules of the business, a foreign keyvalue can be null. In this case we are explicitly saying that either there is no relationship
between the objects represented in the database or that this relationship is unknown.
Domain integrityspecifies that all columns in relational database must be declared upon adefined domain. The primary unit of data in the relational data model is the data item.
1
Theories and Applications of database Management
http://system/http://integrity/http://key/http://integrity/http://key/http://system/http://integrity/http://integrity/http://key/http://key/http://integrity/http://integrity/http://key/http://key/http://system/8/3/2019 DB Lecture 1
3/7
Such data items are said to be non-decomposable or atomic. A domain is a set of values
of the same type. Domains are therefore pools of values from which actual values
appearing in the columns of a table are drawn.
CHARACTERISTICS OF GOOD INFORMATION
Good information is the kind that is useful (benefited). If someone inputs useless data
into a computer he/she will get useless information out of it.
Characteristics or properties of good information are:
1)Relevance- a report should give information relevant to the purpose meant for.
Irrelevant information is not useful or lead to wrong decisions, information should relate
to once information need.
2) Completeness- all needed information should be provided. In adequate informationmay not be very useful in a decision.
3)Accuracy- Information should be correct so as to make an informed decision. Correct
information is error free.
4) Understandable- Information will be useless if it cannot be understood, eg it must be
in a known language and readable.
5)Reliable- One who receives information eg. Managers must have confidence in it. In
addition, reliable information should be timely and up to date.
6)Passed to the right person- Correct information passed to the wrong decision makerwill not be relevant information to the owner. Information flows from bottom up
(subordinate to superior) or top down or below, people of equivalent rank.
7.Concise- most people are interested to read and comprehend a limited amount/volume
of information either they lack the time or find it is hard to read enormous volumes of
data. Reporting to the management for example must be in summary form. Just give therequired information.
8. Timing- quality information is required before the relevant decision is made. Otherwise
it will be of little or no value. Where information is to be provided on demand, requestsmust indicate when the information will be required so information must be timely i.e
provided when needed.
9. Value- benefits obtained from the information ought to be greater than the cost of
attaining it. Thus it may call for a cost cost/benefit analysis e.g information needs for
decisions to increase sales or reduce costs.
1
Theories and Applications of database Management
8/3/2019 DB Lecture 1
4/7
THE HIERACHY OF DATA
Data Item
A data item is the smallest unit of information stored in computer file. It is a single
element used to represent a fact such as an student's name, item price, etc. In a student
database, the student number 170 is a data item. MIMI the name is a data item.
Field
Data items are physically arranged as fields in a computer file. Their length may be fixedor variable. Since all students have 10 digit student numbers, a 10-digit field is required
to store the particular data. Hence, it is a fixed field. In contrast, since student's names
vary considerably from one another, a variable amount of space must be available to store
this element. This can be called as variable field.
Record
A record is a collection of related data items or fields. Each record normally corresponds
to a specific unit of information. Students name, registration number and programregistered. This is the data used to produce the students register report. The first record
contains all the data concerning the first student. The second record contains all the dataconcerning the second. Each subsequent record contains all the data for a given student. It
can be seen how each related item is grouped together to form a record.
File
The collection of records is called a file. A file contains all the related records for an
application. Therefore, the student database for example contains all records required to
produce the students register report. Files are stored on some medium, such as floppydisk, magnetic tape or magnetic disk.
Table
All data held in a database is stored within a table. Usually many smalltables are created
rather than one large table. This helps the efficiency of thedatabase when searching for
information. Data can be entered, edited or deleted,directly in table, so no further objectsneed to be used to manipulate the data. When a table is opened, all the data held in the
table can be viewed on one large screen using scroll bars.
Database
Is a system for storing structured information, which is organized and storedin a way that
allows its quick and efficient retrieval.
OR
Is simply an organized collection of information, such as a telephone directory, address
book, etc.OR
The collection of related files is called a database. A database contains all the related files
for a particular application.
1
Theories and Applications of database Management
8/3/2019 DB Lecture 1
5/7
MANUAL DATA PROCESSING (FILE DATA PROCESSING)
Before the advent of database systems, computer readable data was usually kept in files
stored on magnetic tape or disk. In a typical file processing system, each department hasits own set of applications and its own files, designed specifically for those applications.
The department itself, working with the data processing staff, sets policies or standards
for the format and maintenance of its files.
ADVANTAGES OF DATABASE
Compared with the traditional file processing approach, the database system approach hasseveral advantages.
1. Sharing of data
Unlike files which are owned by the departments whose applications they serve, thedatabase belong to the entire organization. The DBA manages the data, but it does not
belong to any individual or department. Many user can be authorized to access the
same piece of information.
2. Control of Redundancy
In database systems data are integrated so that several copies of of the same data arestored. Some limited redundancy are permitted to keep logical connections among
data items or to improve performance, but the system is usually aware of which items
are stored twice.
3. Data consistency
One effect of eliminating or controlling redundancy is that the data is consistent. If a
data item appears only once, any update to its value needs to performed only once, andall users have immediate access to the new value. If the system has some controlled
redundancy when it receive an update to an item that appears more than once it can
often do cascading update, automatically updating every occurrence of that item,keeping the database consistency.
4. Improve data standards
The DBA who is responsible for designing and maintaining the database to serve the
needs of all users, must define and enforce organization wide standards for
representation of data in the database this includes such concerns as the format of all
data items, conventions on data names, documentation standards, frequency of updateupdate procedures, and permitted usage of the database.
5. Better data security
Data security is the protection of database from unauthorized access. All authorized
Access to the database is through the DBMS, which can require that users go through
Security procedures or use additional passwords to gain access to the data.
6. Improved data integrity
some database management systems allow the DBA to define integrity constraints, or
consistency rules that the data base must obey. These constraints may apply to items
1
Theories and Applications of database Management
8/3/2019 DB Lecture 1
6/7
within a record (intra record constraints), or to the relationship between records (inter
record constraints) or may be general constraints. For example, in a course records
there may be a rule that the number of students enrolled in a course may never exceedthe maximum enrollment.
7. Faster development of new applicationsA well designed database provides an accurate model of the operations of the
organization. When a new application is proposed, it is likely that the data required is
already stored in the database. Development time is reduced because no file creationphase is needed for the new application.
8. Better data accessibility
Most database management systems allow on-line access users. They provide querylanguages that permit users to ask one of a kind questions and obtain the required
information at interactive terminals, rather than by waiting for a programmer.
9. Economy of scaleWhen all of the organizations data requirements are satisfied by one database instead
of many separate files, the size of the combined operation provides severaladvantages. The portion of the budget that would ordinarily be allocated to various
departments for their data design, storage and maintenance costs can be pooled,
possibly resulting in a lower cost.
10. More control over concurrency
In a file system if, two users are permitted to access data simultaneously, it is
possible that they will interfere with each other. For example, if both attempt toperform updates, one update may be lost, because one may overwrite the value
recorded by the other. Most database management systems to control concurrency so
that transactions are not lost or performed incorrectly.
11. Better backup and recovery procedures
1
Theories and Applications of database Management
8/3/2019 DB Lecture 1
7/7
DISADVANTAGE OF DATABASE SYSTEM
1. HIGH COST OF DBMS
Because a complete database management system is a very large and
sophisticated piece of software, it is expensive to purchase or lease.
2. HIGHER HARDWARE COSTS
Additional memory and processing power may be required to run the DBMS, resulting
in the need to upgrade hardware.
3. HIGHER PROGRAMING COSTS
Because a DBMS is a complex tool with many features, the organizations
programmers need a high knowledge of the system to use it to the best advantage .
4. HIGHER CONVERSION COST
When an organization converts to a database system, data has to be removed from
from files and loaded into the database. Because of different formats used in files, thismay be a difficult and time consuming process.
5. INCREASED VULNERABILITY
Whenever resources are centralized, there is an increased security risk. The integration
of files also make a failure more serious. Since all applications depend on the database
system, the failure of any component can bring operations to a standstill.
6. MORE DIFFICULT RECOVERY
The recovery process after a system failure is more complicated because the systemmust determine which transactions were completed and which were in progress at the
time of failure. The transactions involving several database changes that where in
progress at the time of failure may have update some value and not others.
1
Theories and Applications of database Management