Академический Документы
Профессиональный Документы
Культура Документы
SUBMITTED BY:
SHUBHADIP BISWAS
ROLL NO.-FT-10-948
SEC-A
GROUP-4
PGDM 10-12
IILM-GSM
Data Integration
Since related data is stored in one single database, enforcing data
integrity is much easier. Moreover, the functions in the DBMS can
be used to enforce the integrity rules with minimum programming
in the application programs.
Data Sharing
Related data can be shared across programs since the data is
stored in a centralized manner. Even new applications can be
developed to operate against the same data.
Enforcement of Standards
Enforcing standards in the organization and structure of data files
is required and also easy in a Database System, since it is one
single set of programs which is always interacting with the data
files.
Application Development Ease
The application programmer need not build the functions for
handling issues like concurrent access, security, data integrity,
etc. The programmer only needs to implement the application
business rules.
This brings in application development ease. Adding additional
functional modules is also easier than in file-based systems.
Better Controls
Better controls can be achieved due to the centralized nature of
the system.
Data Independence
The architecture of the DBMS can be viewed as a 3-level system
comprising the following:
– The internal or the physical level where the data resides.
– The conceptual level which is the level of the DBMS functions
– The external level which is the level of the application programs
or the end user.
Data Independence is isolating an upper level from the changes
in the organization or structure of a lower level. For example, if
changes in the file organization of a data file do not demand for
changes in the functions in the DBMS or in the application
programs, data independence is achieved. Thus Data
Independence can be defined as immunity of applications to
change in physical representation and access technique. The
provision of data independence is a major objective for database
systems.
Reduced Maintenance
Maintenance is less and easy, again, due to the centralized nature
of the System The following figure shows the process of database
access in general. The DBMS views the database as a collection of
records. The File Manager of the underlying Operating System
views it as a set of pages and the Disk Manager views it as a
collection of physical locations on the disk.
When the DBMS makes a request for a specific record to the File
Manager, the latter maps the record to a page containing it and
requests the Disk Manager for the specific page. The Disk
Manager determines the physical location on the disk and
retrieves the required page.
Clustering
In this process if the page containing the requested record is
already in the memory, retrieval from the disk is not necessary.
In such a situation, time taken for the whole operation will be
less. Thus, if records which are frequently used together are
placed physically together, more records will be in the same
page. Hence the number of pages to be retrieved will be less
and this reduces the number of disk accesses which in turn gives
a better performance.
This method of storing logically related records, physically
together is called clustering.
If queries retrieving Customers with consecutive Cust_IDs
frequently occur in the application, clustering based on Cust_ID
will help improving the performance of these queries. This can be
explained as follows.
Assume that the Customer record size is 128 bytes and the
typical size of a page retrieved by the File Manager is 1 Kb (1024
bytes).
If there is no clustering, it can be assumed that the Customer
records are stored at random physical locations. In the worst-
case scenario, each record may be placed in a different page.
Hence a query to retrieve 100 records with consecutive Cust_Ids
(say, 10001 to 10100), will require 100 pages to be accessed
which in turn translates to 100 disk accesses.
But, if the records are clustered, a page can contain 8 records.
Hence the number of pages to be accessed for retrieving the 100
consecutive records will be ceil(100/8) = 13. i.e., only 13 disk
accesses will be required to obtain the query results. Thus, in the
given example, clustering improves the speed by a factor of 7.7
Indexing
Indexing is another common method for making retrievals faster.
Consider the example of CUSTOMER table used above. The
following query is based on Customer's city.
“Retrieve the records of all customers who reside in Delhi”
Here a sequential search on the CUSTOMER table has to be
carried out and all records with the value 'Delhi' in the Cust_City
field have to be retrieved. The time taken for this operation
depends on the number of pages to be accessed. If the records
are randomly stored, the page accesses depends on the volume
of data. If the records are stored physically together, the number
of pages depends on the size of each record also.
a sequential search on the CUSTOMER table has to be carried out
and all records with the value 'Delhi' in the Cust_City field have to
be retrieved. The time taken for this operation depends on the
number of pages to be accessed. If the records are randomly
stored, the page accesses depends on the volume of data. If the
records are stored physically together, the number of pages
depends on the size of each record also.
If such queries based on Cust_City field are very frequent in the
application, steps can be taken to improve the performance of
these queries. Creating an Index on Cust_City is one such
method. This results in the scenario as shown below.
A new index file is created. The number of records in the index
file is same as that of the data file. The index file has two fields in
each record. One field contains the value of the Cust_City field
and the second contains a pointer to the actual data record in the
CUSTOMER table. Whenever a query based on Cust_City field
occurs, a search is carried out on the Index file. Here, it is to be
noted that this search will be much faster than a sequential
search in the CUSTOMER table, if the records are stored
physically together. This is because of the much smaller size of
the index record due to which each page will be able to contain
more number of records.
When the records with value 'Delhi' in the Cust_City field in the
index file are located, the pointer in the second field of the
records can be followed to directly retrieve the corresponding
CUSTOMER records.
Economy of Scale
Since several users are sharing the database, any improvement
in the database will benefit several users, The term economy of
scale refers to the fact that the collective cost of several
combined operations may be less than the sum of the cost of
individual operations. This type of combination is possible using
database processing.
Efficient extraction of relevant Information
The primary goal of a computer system is to tune data (recorded
facts) into information (knowledge gained by processing these
facts). This is possible using database.
Sharing of Data
Authorized users can share the data. Several users can have
access to the same piece of data ( for example, faculty members
address) and use it for several purposes, when a faculty members
address is changed. The change is available to all users.
Balancing Conflicting Requirements
For the database approach to function properly there must be a
person or group in change of the database. This group is called
database Administration (DBA). By keeping the overall
requirements of the organization in mind, DBA can structure the
database to the benefit of the entire organization. Thus the
overall organization will benefit.
Environment of Standards
With the centralized control, DBA can ensure those standards for
data names etc. is followed uniformly throughout the
organization.
Controlled Redundancy
Since data, which was kept in several files, is now integrated into
a single database, we no longer have multiple copies of the same
data. There may be occasions when duplication of data will be
necessary. DBMS helps us to control redundancy rather than
eliminate it.
Consistency
Consistency follows from the control or elimination of
redundancy. If the address of a faculty appears only in one place,
it is not possible for a faculty to have one address in one place
and another address in another place.
Integrity
An Integrity constraint is a rule which data in the database should
follow. One integrity constraint may be that the department
number for a faculty must be that of a department which actually
exists. A database has integrity if data in the database satisfies
all integrity constraints, which have been established.
Security
Security is the prevention of access to the database by
unauthorized users. Since DBA has complete control over data it
can define authorization procedures to ensure that only legitimate
users can have access to the data.
DBA can also allow different users to have different types of
access to the same data . the payroll department should
be able to view and change the salary of a faculty and the
Insurance department should be able to view the salary of a
faculty but not change it whereas the person in charge of
handling academic activities of faculty may not be even able to
see the salary. One method by which DBA achieves this security
is through user views. If a data item is not included in the user
view for a use, then that user will not be able to have access to
that data.
Flexibility and Responsiveness
Since the data, which was previously kept in several files, is now
in the same database, responding to requests from different
areas is possible in a much easier and more flexible manner.
Suppose we want to find all faculty members who are in
department2, who are covered by insurance plan3 and who have
a salary below RM35000, we can write
SELECT facultyumber, Name
FROM FACULTY WHERE DeptNo = 2
AND PlanNo = 3 AND SALARY < 35000
Data Independence
Data independence occurs when the structure of the database
can change without requiring programs that access the database
to change. Data independence is achieved through the use of
external views. Each program accesses data through an external
view. The underlying structure of the database can change
without requiring a change in the external view. Of course, the
change to the database structure should be such that a required
field should not be removed from the database structure.
Database Services
Following are services which should be provided by any full scale
DBMS.
1. Data Storage, Retrieval and Update
A DBMS must furnish users with the ability to store, retrieve and
update data in the database.
2. A User Accessible Catalog.
A DBMS must furnish a catalog in which descriptions of data
items are stored which is accessible to users.
3. Transaction support
A DBMS must furnish a mechanism, which will ensure that either
all the updates corresponding to a given transaction are made, or
that none of them is made.
4. concurrency control services
A DBMS must furnish a mechanism to ensure that the database is
updated correctly when multiple users are updating the database
at the same time.
5. Recovery Services
A DBMS must furnish a mechanism for recovering the database if
the database is damaged in any way.
6. Authorization Services
A DBMS must furnish a mechanism to ensure that only authorized
users can have access to the database.
7. Support for data Communication
A DBMS must be able to integrate with communication software.
8. Integrity Services
A DBMS must furnish a mechanism to ensure that both the data
in the database and changes to the data follow certain rules.
9. Services to Promote Data Independence.
A DBMS must include facilities to support the independence of
programs from the actual structure of the database.
10. Utility Services
A DBMS should provide a set of utility services.
EXAMPLE:
Give the computer ID and manufacturer name of all computers,
which either have a 386SX processor or have been assigned, for
the use or both.
SELECT COMPUTER WHERE ProcType = „386SX‟ GIVING TEMP1
PROJECT TEMP1 OVER Compid, Mfgname GIVING TEMP2
JOIN COMPUTER, PC WHERE COMPUTER.Compid = PC.compid
GIVING TEMP3
SELECT TEMP3 WHERE LOCATION = „Home‟ GIVING TEMP4
PROJECT TEMP4 OVER Compid.MfgName GIVING TEMP5
UNION TEMP2 WITH TEMP5 GIVING ANSWER
Give the computer ID and the name of the manufacturer of all
computers which have 386SX processor and which have been
assigned for home use.
Change the last line to
INSERT TEMP2 WITH TEMP5 GIVING ANSWER
Give the computer id and manufacturer name of all computers,
which have a 386SX processor but have not been assigned for
home use.
Change the last line to
SUBTRACT TEMP5 FROM TEMP2 GIVING ANSWER
Product of two relations is the relation obtained by concatenating
every row of the first relation with every row of second relation.
E-R Modeling
Entity Relationship Modeling (ER modeling) is by far the most
common way to express the analytical result of an early stage in
the construction of a new database. E-R Diagrams are the way to
achieve this.
Entity relationship diagrams are a way to represent the structure
and layout of a database. It is used frequently to describe the
database schema. ER diagrams are very useful as they provide a
good conceptual view of any database, regardless of the
underlying hardware and software. An ERD is a model that
identifies the concepts or entities that exist in a system and the
relationships between those entities. An ERD is often used as a
way to visualize a relational database: each entity represents a
database table, and the relationship lines represent the keys in
one table that point to specific records in related tables. ERDs
may also be more abstract, not necessarily capturing every table
needed within a database, but serving to diagram the major
concepts and relationships. This ERD is of the latter type,
intended to present an abstract, theoretical view of the major
entities and relationships needed for management of electronic
resources. It may assist the database design process for an e-
resource management system, but does not identify every table
that would be necessary for an electronic resource management
database.
1.Banking:
For customer information, accounts loans and banking transactions.
2.Airlines:
For reservations and schedule information. Airlines were among the
first to use database in a geographically disturbed manner-terminals
situated around the world accessed the central database system
through phone lines and other data networks.
3.Universities:
For student information, course registrations and grades.
5.Telecommunications:
For keeping records of calls made, generating monthly bills,
maintaining balances on prepaid calling cards and storing
information about the communication networks.
6.Finance:
For storing information about holdings, sales and purchase of
financial instruments such as stocks and bonds.
7.Sales:
For customer, product and purchase information.
8.Manufacturing:
For management of supply chain and for tracking production of
items in factories, inventories of items in warehouses/stores and
orders for items.
9.Human Resources:
For information about employees, salaries, payroll taxes and
benefits and for generation of paychecks.
SPECIALLY FOR-------
ADMINISTRATIVE PURPOSE
CUSTOMER SERVICES
ADMINISTRATIVE PURPOSE::
EMPLOYEE(Emp_Id, Work_Location, Name, Address)
STORE(Store_ID, Region, Manager_ID, Square_Feet)
DEPARTMENT(Dep_ID, Manager_ID, Sales, Goal)
SCHEDULE(Dep_ID, Emp_ID, Date)
CUSTOMER SERVICES
Example----
How The ER conceptual schema diagram can be used for the COMPANY database in
fmcg sector for keeping track records of employees
Hospital industry: