database_computer_12
database_computer_12
Data is known facts and figures about a person, place event or thing
which can be recorded in computer in the form of number, text,
picture, audio, video etc. For example, ‘101’, ‘Dinesh”, ‘XII’ etc. are some
example of data. Data is the raw facts to generate information and
data itself only is not very meaningful. It is processed to produce
meaning and useful information.
Information:
When data are processed using a database program or software, they
are converted to the meaningful result, called information. In other
words, the output of data processing is called information. It is an
organized collection of related data which gives a complete sense.
Disadvantages of DBMS
Expensive:
Database software is very expensive for large computer system. It also
requires overhead costs for maintaining and integrity functions.
Changing Technology:
It is fast changing technology.
Needs Technical Training:
It is complex to understand and implement. So, proper training is required
for staff to work properly in the database system.
Backup is Needed:
It needs to explicit backup. This adds costs as new storage space are needed
to hold the data.
There are different forms of database management system, each
characterized by the way where data are defined and structured, called
database model. It is organizing principles of records in secondary
storage.
Hierarchical Database Model:
It is one of the oldest database model. This model arranges the files
used in the database in a top-down structure which is similar to an
upside-down
Network Database Model:
The network database model looks similar to the hierarchical
model but it is more flexible to access the data. Unlike the
hierarchical model, each child can be linked with more than one
parents. So, the records can be accessed from more than parents
which are linked. This model is more flexible and has
multidimensional connections.
Relational Database Model:
In relational database model, data is organized into tables which
contain multiple rows and columns. These tables are called relations.
A row in a table represents a relationship among a set of values. Since
a table is a collection of such relationships, it is generally referred to
the mathematical term relation, from which the relational database
model derives its name. It is also known as RDBMS.
Entity:
An entity is a ‘thing’ or ‘object’ in the real world that is different from other
objects. An entity has a set of properties and the values for some set of properties
may uniquely identity an entity. For example, if student is an entity, is identified
by registration number. It is represented by rectangle.
Attribute:
Attributes are properties processed by an entity or relationship. Attributes are
also called elements or fields. Attributes are represented by ellipse. For example
stu_name, stu_roll are attributes of the entity student.
Relationship:
A relationship is an association among several entities and represents
meaningful dependencies between them. It is represented by diamond. For
example the association between teachers and students is teaching. There are
three types of relationship.
One-to-many relationship:
If one instance of one entity is related with many instance of other entity, then it
is called the One-to-many relationship. For example the relationship between
the ‘College’ entity and ‘Student’ entity as one college has many students.
Many-to-many relationship:
If the many instance of the one entity are related with many instances of
another entity then it is called Many-to-many relationship. For example, the
relationship between the ‘Teacher’ entity and ‘Student’ considered as many to
many relationship.
Concept of Normalization
Data normalization is a process of database in a normal form to avoid undesirable things
such as repetition of information, inability to represent information etc. It improves
performance by reducing data redundancy to a large extent. There are several normal
forms. Among them the most used three normal forms are as follows:
- First Normal Form (1NF)
A relation or table is said to be in 1NF if it’s all attributes are atomic. That is, there should
not be any repeating groups of an attribute. The purpose of 1NF is to eliminate repeating
groups of attributes in any entity. In other words, if any characteristics is repeated again
and again in the same table/row, then such attributes are removed either into separate
table or decomposed into different rows.
Second Normal Form(2NF):
A relation is to be in second normal form if it is in first normal form and each
attribute is functionally dependent on the entire primary key. The purpose of
second normal form is to eliminate partial key dependencies. In other words,
each attribute in the table must depend on the whole key, not just the part of it.
Third Normal Form (3NF):
A relation is said to be in third normal form if it is in second normal form and
it does not contain any transitive dependency on the primary key. All
attributes that are not dependent upon the primary key must be eliminated.
SQL (Structured Query Language)
SQL stands for Structured Query Language. It is an international standard database query
language for accessing and managing data in the database. In order to provide various
facilities to different types of users, a DBMS provides one or more specialized
programming languages called database languages. However, a language called SQL has
recently been taken as the standard database language. Query language allows users to
retrieve data from the database without having detailed information about the structure
of the records and without being concerned about the DBMS process.
SQL statements
DDL:
DDL stands for Data Definition Language and DDL statements are used to create, modify
and drop database and database objects like table, user-defined data types, index, views
etc. CREATE, ALTER and DROP are the DDL statements. CREATE is used to make new
database objects. ALTER is used to modify the existing database objects and DROP is used
to remove the unnecessary database objects from the database.
DCL:
DCL stands for Data Control Language and DCL statements are used to change the
permission associated with a database user or role. DCL contains the commands that allow
system and data privileges to be passed to various users. The DCL commands normally
available to database administrator . The DCL statements are GRANT, DENY and
REVOKE.
DML:
DML stands for Data Manipulation Language and DML statements are used to work with
data in database. The DML statements are SELECT, INSERT, UPDATE and DELETE. The
DML statements are used to retrieve required data from database, modify existing data
and delete unnecessary data from the database.
Centralized Vs Distributed Database
Centralized Database:
Centralized database system works in a client-server system. The centralized
database has one central computer, called database server, to store all the data
and files and it provides services to all the clients in the networks. Only the
central computer or database server is responsible for processing the data. It is
simple type which works on a client-server basis. It is located on a particular
central location and peripherals are connected with it to storing and retrieving
data as requirement. It is only suitable for small organization and small-scale
operation. The database is centralized, so there is no chance of data
modification. Hence, security is not so crucial part here. The maintenance of
database is easier because of data or records are centrally stored.
Distributed Database:
Distributed database is a complex type of database system. It is a
collection of multiple logically interrelated databases which are
distributed in many geographical locations. Data communication is
difficult because they should communicate through different system
to different platform. It has the problem of security, increased the
problem of control of database and need more computer resources. It
can manage people with functional knowledge. This mode of
processing is more expensive with limited security, control and
protection of data.
Centralized Database System Distributed Database System
Centralized Database System is simple Distributed Database System is complex
type. type.
They are located on particular location. They are located in many geographical
locations.
It consists only one server. It contains server in several locations.
It is only suitable for small organization It is suitable for large organization.
and small-scale operation.
There is less chance of data lost. More chances of data hacking, theft and
lost.
Maintenance is easy and security is high. Maintenance is not easy and security is
low as compared to centralized database
system.
Failure of server makes the whole system Failure of one server does not make
down. whole system down.
Low cost High cost.
Advantages of Centralized Database System
➢Since all data is stored at a single location only thus it is easier to access and
co-ordinate data.
➢The centralized database has very minimal data redundancy since all data is
stored at a single place.
➢It is cheaper in comparison to all other database available.
Disadvantages
➢The data traffic in case of centralized database is more.
➢If any kind of system failure occurs at centralized system then entire data will
be destroyed.
Advantages of Distributed Database System
➢This database can be easily expanded as data is already spread across
different physical locations.
➢The distributed database can easily be accessed from different networks.
➢This database is more secure in comparison to centralized database.
Disadvantages
➢This database is very costly and it is difficult to maintain because of its
complexity.
➢In this database, it is difficult to provide a uniform view to users since it is
spread across different physical locations.
Decentralized Database:
It is a database that is installed on systems that are geographically located at different
locations but not linked through a data communication network. This means that it
is a group of independent database instances which have no logical connections
between them. The user can access a specific network in a specific area of database
locally.