You are on page 1of 13

DATABASE MANAGEMENT

SYSTEMS

Lecture 2
Feasibility Study

Feasibility is a process that identifies , describes and evaluates proposed system and
selects the best system for the job. During the study, the problem definition is solved and
all aspects of problem to be included in the system are determined. Size of project, cost
and benefits are also estimated with greater accuracy. The result of feasibility study is
simply a report which is a formal document detailing the nature and scope of the proposed
solution.g the nature and scope of the proposed solution.
Class Diagram

Class diagram describes the attributes and operations of a class and also the constraints
imposed on the system. The class diagrams are widely used in the modeling of object
oriented systems because they are the only UML ( Unified Modeling Language )
diagrams, which can be mapped directly with object-oriented languages.

3
Data type

A database data type refers to the format of data storage that can hold a distinct type or
range of values. When computer programs store data in variables, each variable must be
designated a distinct data type.

Some common data types are as follows:


integers, characters, strings, floating point numbers and arrays.

More specific data types are as follows: varchar (variable character) formats, dates and
timestamps, Boolean values.
Common Database Data Types
• Integer – is a whole number that can have a positive, negative or zero value. It cannot be a fraction nor can have decimal places. It is
commonly used in programming especially for increasing values. Addition, subtraction and multiplication of two integers results to an
integer. But division of two integers may result to an integer or a decimal. The resulting decimal can be rounded off or truncated to produce
an integer.

• Character – refers to any number, letter, space or symbol that can be entered in a computer. Each character occupies one byte of space.

• String – is used to represent text. It is composed of a set of characters that can have spaces and numbers. Strings are enclosed in
quotation marks to identify the data as string and not a variable name nor a number.

• Floating Point Number – is a number that contains decimals. Numbers that contain fractions are also considered as floating point numbers.

• Array – contains a group of elements which can be of the same data type like an integer or string. It is used to organise data for easier
sorting and searching of related set of values.

• Varchar – as the name implies is variable character as the memory storage has variable length. Each character occupies one byte of space
plus 2 bytes for length information.Note: Use Character for data entries with fixed length, like phone number. Use Varchar for data entries
with variable length, like address.
Boolean – is used for creating true or false statements. To compare values the following
operators are being used: AND, OR, XOR, and NOT.
Events

Database Events. Database events enable an application or the DBMS Server to notify
other applications that a specific event has occurred. An event is any occurrence that your
application program is designed to handle.
Data Redundancy

Data redundancy is a condition created within a database or data storage technology in


which the same piece of data is held in two separate places. This can mean two different
fields within a single database, or two different spots in multiple software environments or
platforms.
Normalization

Normalization is a process of organizing the data in database to avoid data redundancy, insertion
anomaly, update anomaly & deletion anomaly.

Anomalies in DBMS

There are three types of anomalies that occur when the database is not normalized. These are –
Insertion, Update and Deletion anomaly.
Let’s take an example to understand this.

Example: Suppose a manufacturing company stores the employee details in a table


named employee that has four attributes: emp_id for storing employee’s id, emp_name for
storing employee’s name, emp_address for storing employee’s address and emp_dept for
storing the department details in which the employee works. At some point of time the table
looks like this:
The above table is not normalized. We will see the problems that we face when a table is not normalized.

Update anomaly: In the above table we have two rows for employee Rick as he belongs to two departments
of the company. If we want to update the address of Rick then we have to update the same in two rows or the
data will become inconsistent. If somehow, the correct address gets updated in one department but not in
other then as per the database, Rick would be having two different addresses, which is not correct and would
lead to inconsistent data.

Insert anomaly: Suppose a new employee joins the company, who is under training and currently not
assigned to any department then we would not be able to insert the data into the table if emp_dept field
doesn’t allow nulls.

Delete anomaly: Suppose, if at a point of time the company closes the department D890 then deleting the
rows that are having emp_dept as D890 would also delete the information of employee Maggie since she is
assigned only to this department.
Normalization

The most commonly used normal forms:


• First normal form(1NF)
• Second normal form(2NF)
• Third normal form(3NF)
• Boyce & Codd normal form (BCNF)

You might also like