Professional Documents
Culture Documents
com
Requirement of DBMS in Brief – DM (database Management) has been evolved form a Comp
uter ‘program’ to a ‘Control component’ of a modern cyber environment. Now knowledge of t
he database management has become an essential part of the computer science because in an
y of the org, for effective decision making reliable and accurate data is essential. In this concept
we can also say that DM is centralized control of information and also prevent unauthorized acc
ess to database, fraudulent, and privacy of the data also.
Information – information is the processed data in any process of organize data or classify data
Or we can say knowledge derived form the process of a data is known as information.
1. A database represents some aspects of the real world some times called mini world or
universe of discourse (UD).
2. A database is a coherent collection of data with some inherent(in built) meaning. A rand
om assertion of data cannot be referred as a database.
3. A database us designed, built and populated with data for a specific purpose. It has an i
ntended group of users and some rigid applications in which the users are interested.
In other words a simple concept for a database is, a database has some source from which data
is derived, some degree of intersection with events and an audience currently interested in the
contents of the database.
2. Bank accounts.
- http://www.docx-to-doc-converter.com
3. Library etc.
Attributes:- Piece of information describing a particular entity. These are mainly attributes abo
ut the entity. Individual attributes helps in distinguish one entity from another.
For example :-
Entity Attributes
Personnel Name, Age, Sex, Location
Academic Name, Roll no, Course, Dept. name
Hierarchy of Database
Bit 0, 1
Ans:-
− Speed:- The machine can retrieve and change data faster than human being.
− Less Drudgery – Much of sheer tedium(boredom) of maintain files by hand can be elimi
nated and Mechanical tasks can also done better by machines.
File
Record
3) Data items :- Data item of field is a set of characters, used to gather for representing a p
articular data item. In above example name, roll number is known as data item.
4) Filed name :- The name of each data item is known as the field name for example :- E
mployee code, Basic, HRA etc.
5) File :- File is a collection of records. There are three types of files known as :-
“A database is a combination of hardware and software that can used to setup, monitor,
manage the updation and retrieval of the database that has been stored in it.
3. The data stored can be sorted or indexed at the user’s discretion and direction.
4. Various reports can be produced form the system. These may be standardized reports
or may be specifically generated according to the user’s definition.
5. Mathematical functions can be performed with the data stored in the database and desir
ed output can access by manipulating these data.
2. Sharing data :- it is one of the main advantage of the DBMS. By it many user can share the sam
e data for their own purposes.
3. Data integrity :- Centralized control over the data also provides data integrity means that data is
consistent and accurate.
- http://www.docx-to-doc-converter.com
4. Data Security :- Organizations has a great concern over their security of their data, because it m
ay harm their strategies. So DBMS provides a high level of security to the data. The DBA who h
a the ultimate responsibility for the data in the DBMS can ensure by DBMS that proper access pr
ocedures will be followed to access data, including proper authentication schemes for the access
of the data such as password authentication and additional check before authentication the sensit
ive data. Different level of security can be implemented for various types of data and information.
5. Conflict resolution :- Since database is under the regular control of DBA, he or she can r
esolve conflicting requirements of various users for the various types the data. In essen
ce DBA choose the best file structure and access method to get the optimal performance
for the response critical applications, while permitting less critical application to continue
to choose the database, though with a relatively a slow response.
Logical data independence is more difficult to achieve than physical data independence. Since a
pplications are heavily dependent on the logical structure of the data they access.
2. While centralization reduce duplication, the lack of duplication requires that the database
be adequately backed up so that in the case of failure, the data can be recovered. Back
up and recovering operations and fairly complex in a DBMS environment and this is exa
cerbated(make worse) in a concurrent multiuser database system. Furthermore, A data
base system requires a certain amount of controlled redundancies(overflow) and duplica
tion to enable access to the related data items.
3. Centralization also means that the data is accessible from a single source namely datab
ase. This also increase the possibility of security breaches and disruption of the operatio
n of the organization because of downtimes and failures.
• Data Manipulations :-The DBMSmust beableto handle requests from the user to
retrieve, update or delete existing data in the database or add new data to the da
tabase. In other words DBMS must include a data manipulation language(DML)
processor component.
• Data Security and integrity :- The DBMS must monitor user requests and rejec
t any attempt to violate the security and integrity rules defined by the DBA.
• Data recovery and concurrency :-The DBMS or else some other related softwa
re component, usually called the transaction manager, must enforce certain co
ncurrency and recovery controls.
• Data Dictionary :-The DBMS must provide a data dictionary function. The data
dictionary can be regarded as a database in its own right (but a system database
rather than a user database). The dictionary contains data about the data “som
etimes called metadata” – that is definition of the other objects in the system, ra
ther just “raw data”. In particular all the various schemes and mapping (conceptu
al and external etc) will physically be stored, in both source and object form, in th
e dictionary. A comprehensive dictionary will also include cross reference inform
ation, showing for instance, which program use which piece of the database, whi
ch user require which reports, which terminal is connected to the which system, a
nd so on. The dictionary might even, in fact probably should, be integrated into t
he database it defines, and thus include its own definition. It should certainly be
possible to query the dictionary just like any other database, so that, for example,
it is possible to tell which programs or users are likey to be effected by the some
proposed change to the system.
• Performance :-The DBMS should perform all the functions identified above as ef
ficiently as possible.
After above discussion we can summarize the main function of the database is to provide user i
nterface to the database system. The user interface can be defined as a boundary below whic
h every thing is invisible to the user.
a) DBMS is a collection of interrelated files and a set of programs that allow several users t
o access and modify these files. One purpose of a database system is to provide an abs
tract(virtual cant touch) view of data to the user. That is, system hides some of the detail
s from the user such as how the data is maintained and enters? However, in order for th
e system to be useable data must be retrieved efficiently. The concern for efficiently l
- http://www.docx-to-doc-converter.com
eads to the design of complex data structures for the representation of the data in the da
tabase. However database systems are generally used by non-computer professionals,
this complexity must be hidden form the database system users. This is done by defini
ng the level of abstraction which the database may be viewed. There are logical views o
r external conceptual view or internal or physical view of the data.
a. External view :-This is the highest level of abstraction that have seen by the use
r. This level of abstraction describes only the part of entire database.
b. Conceptual database :- This is the next high level of abstraction which is the su
m of the total user’s views. This level describes that what data is actually stored i
n the database. This level contains information about entire database in terms of
a small number of relatively simple structures.
- http://www.docx-to-doc-converter.com
c. Internal view :- This is the lowest level of abstraction at which one describes ho
w the data is physically stored. The interrelationship at any three levels of abstra
ction is illustrated below.
Conceptual Level
Conceptual view
Architecture of DBMS
Already we have discuss three levels of abstraction at which the database can be
viewed. A DBMS is said to follow these three levels of abstraction as shown in th
e figure above.
n instant of time. Since each view of a database is defined by the scheme, there
exist several schemes in the database and these schemes are partitioned followi
ng three levels of data abstraction of views. At the lower level we have a physic
al scheme where at the middle level we have a conceptual scheme and at the
upper level we have some subsystems.
i). External level of subschemas. The external level is at the highest level
of database abstraction where only those portions of the database of concern to
a user or application program are included. Any number of users views(some of
which may be identical) may exist for a given global or conceptual view. Each ex
ternal view is described by means of a scheme called an external scheme or sub
schema. The external schema consist of the definition of logical records and the
relationship in the external view. The external schema also consist of the metho
d of deriving the objective in the external view from the object in the conceptual vi
ew. The objects include entitles, attributers and relationships.
iii). Internal Level or physical level. We find this view at the lowest lev
el of abstraction, closet to the physical storage method used. It indicates how dat
a will be stored and describes the data structures and access methods to be use
d by the database. The internal view is expressed by the internal schema, which
contains the definition of the stored record, the method of representing the data fi
eld , and the access aids used.
Data Independence
Above discussion on three level of abstraction and mapping between them provid
e two distinct levels of data indecencies.
(2) Physical data indolence :- It indicates that physical storage structure or devi
ces used for storing the data could be changed without necessitating a change in
the conceptual view or any of the external views. The change would be observe
d by the mapping between conceptual and internal levels.
Logical data independence is achieved by providing the external level or user vie
w of the database. The application program or users see the database. The app
lication programs or users see the database as described by their respective exte
rnal views. The DBMS provide mapping from view to conceptual view. The view
at the conceptual level of the database is the sum total of the community views (c
urrent and anticipated(advance views)). There can be many external views of th
e database and only one conceptual view of the database. The users are only i
nterested in that portion of the databasethat is described by their external view. I
t is an abstraction of the physically store data and the user manipulate this abstra
ction.
For example :- following figures show the external views of the user from the publ
ic relations and payroll departments. Each of these external views is represented
in a high level language declaration in accordance with the normal rules of the la
nguages. Below figurerepresents the conceptual level definition, using a similar
faculty for data definition.
(a) (b)
External schemes of (a) user in Public relation department (b) user in payroll department
- http://www.docx-to-doc-converter.com
type EMPLOYEE.record;
EMPLOYEE.Afaffie: string;
EMPLOYEE.Sac.Sec- No: interger primary key;
EMPLOYEE. Department: string;
EMPLOYEE. Address: string;
EMPLOYEE. Skill: string;
EMPLOYEE. Annual Salary: string;
end
Physical data independence is achieved by the presence of the internal level of the database an
d the mapping the transformation from the conceptual level of the database to the internal level
of database.
Conceptual level to internal level mapping, therefore, provides a means to go from the conceptu
al view to the internal view and thence to store data in the database. Another aspect of data ind
ependence allow different interpretations of the same data. The storage of the is in bits and ma
y change from EBCDIC to ASCII coding.so to imperil units of measure, or the data may be com
pressed to save storage on the physical device without effecting the application program.
DDL compiler :- The DDL compiler converts the data definition statements into a set of tables.
The tables contain information concerning the database and are in the form that can be used by
other components of the DBMS.
File Manager :- Filer manager manage the allocation of space on disk storage and the data stru
cture used to represent information stored on disk. The file manager can be implemented using
an interface to the existing file subsystem provided by the OS of the host compiler or it can inclu
de a like subsystem written especially for DBMS.
Database manager:-
Database typically requires a large amount of storage space. Corporate databases are usually
measured in terms of gigabytes of data. Since the main memory of the computer is not sufficien
t to store the database so it is stored on disks. Data is moved between main memory and disk s
torage as needed. Since movement of data to and from disk is slow relative to the speed of con
trol processing unit of computer, it is imperative(authoritative) that data system structure data s
o as to minimize need to move data between disk and main memory. A database manager is a
program module, which provide the interface between the low level data stored in the database
and the implication program and queries submitted to the system. It is responsible for interactin
g with file system. Important responsibilities of the database manger is as follow.
• Interaction with the file manager :-The raw data is stored on the disk using file system,
which is usually provided by a conventional OS. The database manager translates the v
arious DML statements into low level file system commands. Thus the database manag
er is responsible for the actual retrieving, storing and updating of data in database.
• Integrity enforcement: - The data values stored in the database must satisfy certain typ
es of consistency constraints. For example: - Balance in a bank account never fall belo
w a limit. In this way these constraints must be explicitly specified by the DBA. By it DB
A can check whether updates to the database.
• Security enforcement: - Every user need to access a special type of data, so DBA ca
n restrict some special type of data for accessing by any user. For example in the server
- http://www.docx-to-doc-converter.com
of a company may contain information about marketing, finance and other knowledge for
the upper level managers. But a DBA can impose some restrictions on data ensuring th
at it should not be accessed by the wrong department.
• Backup and recovery: - A computer like any other mechanical or electrical device is s
ubject to failure. So there is a number of reasons of such failure including disk crash and
power failure etc. in these cases information contained by the database lost. So it is the
responsibility of the DBA to detect such failures and restore the database to a state prior
to the occurrence of the failure. This is usually accomplished by6 backup and recovery
procedures.
• Concurrency Control: - When several users update the data concurrently then consis
tency of the data may not be preserved. So it is necessary for the system to control the i
nteraction among the concurrent users and it is also the responsibility of the DBA.
Query processor.
The database users retrieve data by formulating a query in the data manipulation language prov
ided by the database. The query processor is used to interpret the query by the online users a
nd convert it into efficient series of operation in a form capable of being sent to the database ma
nager for execution. The query processor uses the data dictionary to find the structure of the r
elevant portion of the database and uses this information in modifying the query and preparing a
n optimal plan to access the database.
Database Administrator
One of the main reasons for having DBMS is to have control of the both data and programs acc
essing data. The person having such a control over the system is called DBAs. The DBA admi
nister the three levels of database and, in consultation with the user community, sets up the def
inition of the global view or conceptual level of the database.
Functions of a DBA
− Schema definition - The creation of original database schema is accomplished by writi
ng a set of definitions, which are translated by the DDL compiler to set a labels that are
permanently stored in the data dictionary.
− Storage structure and access methods definition: - The storage structure and acces
s methods are accomplished by writing a set of definitions which are later by the data st
orage and definition language compilers.
− Schema physical org and modification :- For either the modification of the data sche
ma or for the description of the physical data storage structure, a set of definitions are wr
itten which are used by wither the DDL compiler or by the data storage and definition lan
guage compiler to generate the appropriate modifications in the internal system tables.
− Granting for authorization for data access:- The granting of the access to various use
rs of the database at the various times.
− Integrity constraints specification:- These constraints are kept in a special system str
ucture that is consulted by the database manager when one of the valuable tool that DB
A uses to carry out data administrator in data dictionary.
Data Dictionary
It is seen that when a program become much large then names that are used in the program an
d purpose for which they are used become more and more difficult. Offcourse it is possible for
a programmer to keep all names in mind that he/she has coined, but is it essential that all time t
- http://www.docx-to-doc-converter.com
he programmer will modify the program. So to keep this problem away we have to maintain a ki
nd of inventory or catalogue or database or dictionary of these names used in the program to he
lp all programmers to find needs names and their purposes from the dictionary.
“ A directory tells us definition of things and where to find these definitions. Here we can
say that a dictionary contains information(or data) about the datat. data about the data
Types of DBMS
Data Model – It is a collection of concepts which are used to describe the structure of a databas
e and provides. Whereas structure of database means data types, constraints and relationships
that hold the data. The various data models can be divided into three different categories.
3. Physical Models
Object based logical models - They are used to describe data at the logical and view le
vels. They provide fairly flexible structuring capabilities and allow data constraints to be specifie
d explicitly. They are mainly of four types: -
1. The ER model: - The ER data model is based on a perception of a real worker that con
sist of a collection of basic objects, called entities, and relationships among these objects. The
overall logical structure of a database can be expressed graphically by an ER diagram.
- Ellipses - Attributes
- Lines – Which link attributes to entity sets and entity sets to relationships.
Suppose we have two entities like customer and account, then these two entities can be
modeled as follow.
Deposit
Customer Account
A Sample ER Diagram
- http://www.docx-to-doc-converter.com
ER model is grew up from the exercise of using commercially using DBMS to model application
databases. Earlier DBMS was based on hierarchical and network approach. ER is a generaliza
tion of these models. It is basically useful to design of logical database models. This analysis is
used to organize a relation, normalizing relation and final obtaining a relational database model.
The ER model uses three features to describe data: -
For example :- a vendor who supplies items and items supplied by him is entities, The vendor a
nd items are related to each other, the act of supplying define a relationship between them. Fo
r example an vendor set of entities can be described by following items:-
(order_no, Date)
Hierarchical model
In these type of data models data is organized in the form of child parent relationship forming a t
ree structure. The origin of data tree is initialized from root. The data located at different levels
among particular branch is called nod. Nodes having child nodes is called tree nodes. This dat
a model is supports one to many relationship.
− The bank has three types of accounts saving, current and fixed deposit.
Advantages:-
− Simplicity - It is very easy to arrange data in the hierarchical data model. The design
process is subsequently very simple.
− Security. – These database systems can support various degree of security constraint u
nlike slat file system.
- http://www.docx-to-doc-converter.com
− Efficiency – for 1:M type relationships these types of databases are very efficient.
− Complexity of programming
− Poor portability
Network Model
Network model is developed to eliminate the problems faced by the hierarchical model of datab
ase.
Marks Rank
A network database is consist of collection of records connected to one another through links.
A relationship in this context is known as set. A link can be viewed as a restricted binary form o
f relationship. The major difference between these two database models is that in the hierarch
ical database models each child record can have only one parent record where as in network m
odel there can be more than one parent records. It facilitates the implementation of N:M relation
ship which occurs is more often that of 1:M relationship.
Vicky 21 9
500 2
- http://www.docx-to-doc-converter.com
Hindu 45 8
400 0
Advantages -
− Simplicity – Since most of the data relationships are of type N:M type, so it is easy to de
sign.
− Better relationship handling – N:M can accommodate most of the complex actual relat
ionships.
− Flexibility in data access – Data items can be navigated in more than one providing m
ore flexibility.
− Standards – Universal database standards are developed in these type of databases.
Disadvantage of the Network model
− System complexity - The implementation of these type of data base is not easy all tim
e.
− Structural dependence - since access depends upon the navigational paths of the exis
t in the data base, so programs are dependent upon the structure of the database, when
ever the structure has been changed the program wil also change.
Relational model
Dr CF Codd first of all introduced the relational model of database in 1970. This model is ev
aluated from the theoretical considerations based on relational calculus. So at that time its i
mplementation is not considered practical. This model allows the data to represent in simpl
e rows and columns. A table in the parlance of relational database is referred to as a relatio
n. Each data field is considered as column and each record is considered as a row of a t
able also called tuple. In relational database data is arranged in files called data files.
− A database file may contain one or more tables.
− A table may contain rows and columns.
− A row may contain record and column a field.
− A record may contain information regarding a simple person or a thing.
− A field record data regarding a particular aspect of that person or that thing.
Attributes
Tuples
- http://www.docx-to-doc-converter.com
Balance
45000
452000
45000
120000
Balance table
Account Numbe
r
64654
52435
354354
34343
Through seemingly independent, these tables do have a relationship between their common fiel
ds. Account number – relates one (or more) record of one table one or more record of the other
table.
Account Numbe
r
Balance
Customer name
Customer Street
Customer City
Account Numbe
r
*
Customer name
Customer Street
Customer City
Account Numbe
r
Account Number
1
Balance
- http://www.docx-to-doc-converter.com
Thus combining two tables customer and balance one can easily get the customer account as s
hown below.
Relational database systems are mostly used to manage these type of Relational models a num
ber of type of RDBMs software systems are available in the market.
Advantage
− Simplicity to design and use - Relational database data and structural independence t
here fore it is easy to design and use.
− Advance query capabilities - Querying a relational database is very simple and highly
efficient, and very powerful.
Disadvantage
Advantages –
− When an ODBMS is used, the you use ur data is the way u store it. The first benefit ca
n be found in development . When you use ODBMS u need to write less codes that o
f when ur using RDBMS. The reason is simple when you write a code in java or C++ yo
u do not have need to translate it into a database sub language such as SQL, ODBC or
JDBC. You write in the programming language. Any data Structure what you can imagi
ne in Java or C++ can be easily stored in the ODBMS.
− When you are working with a complex ODBMS you can give a performance of ten to tho
usand times faster than RDBMS. It is also because of no translation is needed.
- http://www.docx-to-doc-converter.com
As the name implies this supports both object oriented and relational concepts.
3. All rows of a table are distinct. Means no two rows are identical in any column.
5. The columns of a table are assigned distinct names and ordering of threes column is im
material.
6. If a table has N column it is said to degree N. This is sometimes referred as the carmina
tive of the table.
From few tables it is possible by setting up relations, create views which provide the necessary i
nformation to the users of the same database.
2. Flexibility – Different tables from which the information has to be linked can be easily m
anipulated by operators such as project and joining the tables give information in the wa
y the user desire.
4. Security – security controls and authorization can also be implemented easily by movin
- http://www.docx-to-doc-converter.com
g sensitive attributes in a given table into a separate relation with its own authorization c
ontrols.
Disadvantage of RDBMS
A major constraint in the RDBMS is machine performance. If the number of tables with
in the relational database is more then RDBMS will be voluminous then the performance
in responding to queries is definitely degraded. An operation for example like “unbound
or joining of tables” depends on the physical storage.
1. Each column contain value about the same attribute, and each table value must
be simple (A single value).
2. Each column has a distinct name and order of the column is immaterial.
3. Each row is distinct and one row cannot copy another row for selected key attribu
tes.
Property 1 – it is a column homogeneous means each column has the same kind of item
s.
Property 2 – Each item is a simple number or a character string. Mean each table shoul
d be in INF(First normal form).
Property 5 – The column of a table is assigned distinct names and ordering these colum
ns are immaterial.
S# P# SCITY
10 1 Bangalore
10 2 Bangalore
11 1 Bangalore
11 2 Bangalore
The relational model is an abstract theory of data that is based non certain aspects o
f mathematics (principally set theory and predicate logic). The relational model is concer
ned with three aspects data structure, data integrity, and data manipulation.
1. Structural aspects – Structure means design view of the database like data type an
d its size.
2. Integrity aspects - Those table which satisfy certain integrity constraints such as do
main constraint, entity integrity and referential integrity, operational constraints.
3. Manipulation aspects – The operations available for the user to manipulating those
tables into database .
E.F Codd had defined 12 rules that should be essential for any DBMS to be a RDBMS. These 1
2 rules are guidelines on which all the RDBMS like ORACLE, INGERS, SYBASE, INFORMIX ar
e based.
After publishing the rules Codd stated that there is not any database which fully satisfies all the r
ules. Nevertheless rules represent the relational ideal and remain a goal or the database desig
ners.
Rule 2 Guaranteed Rules - Each and every datum (atomic value) in a relational database is g
uaranteed to be logically accessible by resorting to a combination of table name, primary key val
ue, and column name:
3. Systematic Treatment of Null Values. Null values (distinct from the empty character string o
r a string of blank characters and distinct from zero or any other number) are supported in fully r
elational DBMS for representing missing information and inapplicable information in a systemati
- http://www.docx-to-doc-converter.com
4. Dynamic On-line Catalog Boned on the Relational Model. The database description is re
presented at the logical level in the same way as ordinary data, so that authorized users can ap
ply the same relational language to its interrogation as they apply to the regular data:
5. Comprehensive Data Sub language Rule. A relational system may support several languag
es and various modes of terminal use (for example the fill-in-the-blanks mode). However, then-
must be at least one language whose statements are expressible per sonic well-defined syntax,
as character strings and whose ability to support all the following is comprehensive: data definiti
on, view definition, data manipulation (interactive and by program), integrity constraints- mid tra
nsaction boundaries:
• A database supports a clearly defined language to define the database, view the definition, ma
nipulate the data, and restrict some data values to maintain integrity.
6. View Updating Rule. All views that are theoretically updatable are also updatable by the sys
tem:
• Data should be able to he changed through any view available to the user.
7. High-level Insert, Update, and Delete. The capacity of handling a base relation or a derived
relation as a single operand applies not only to the retrieval of data but also to the insertion, up
date, and deletion of data.
• All records in n file must be able to be added, deleted, or updated with singular comma
nds
8. Physical Data Independence. Application programs and terminal activities remain logically u
nimpaired whenever any changes are made in either storage representations or access method
s:
• Changes in how data are stored or retrieved should not affect how a user accesses (lie
dala.
9. Logical Data independence Application programs mid terminal activities remain logically un
impaired whenever information preserving changes of any kind that theoretically permit un impai
rment are made to the base tables
• A user's view of data slnmld be unaffected hy its actual furm in files. JO. Integrity indep
endence.. Integrity constraints specific to a particular relational database must bo defina
ble in a relational data sublanguage and stumble in the catalog, not in the application pro
grams.
independence implies that users should not have to be aware of whether a database is distribut
ed.
• A database design should allow for distribution of data over several computer sites.
12. Non subversion Rule. If a relational system has a low-level (single-record-at-a-time) langu
age, that low level cannot be Used to subvert or bypass the integrity rules and constraints expr
essed in the higher level relational language (multiple-records-at-a-time).
There is one more rule called Rule Zero which states that "For any system that is claimed
to be a relational database management system, that system must be able to manage dat
a entirely through capabilities."
Cartesian product - Suppose we have two sets D1 and D2 with D1 = (1,3) and D2= (2,4,8).
We could form the Cartesian product of these two sets as follow D1 X D2
D1 X D2 = {(1,2), (1,4),(1,8),(3,2),(3,4),(3,8)}
Database relations - Applying these concepts on database let A1, A2, A3….. An are attributes
with domains D1, D2 and Dn. A rational schema such a R is in such a set of attributes with their
corresponding domains. A relational r is a set of r tuples (A1 :D1, A2:D2, An :Dn).
Degree and cardinality - The number of columns in the table is called degree of the relation.
A relation with only one column is called unary relation. And with three columns is called terna
ry relations. And the number of rows in the table is called cardinality .
Representing relational database structure. A relational database can consist of any numbe
r of relations. We can represent the name of relation followed by the attribute names in the pare
nt thesis. For example a simple database might contain relations for STUDENT, CLASS, FACU
LTY and ENROLMENT.
1. Insert
- http://www.docx-to-doc-converter.com
2. Delete
3. Modify
Insert operation
1. Domain Constraints
2. Key constraints
3. Entity integrity
4. Referential integrity
Delete Operation - Delete operation can violate only referential integrity. For example, consid
er the following table in EMP relation ENO is a primary key and DNO is a foreign key.
Update operation - Update is a attribute that is neither a primary nor a foreign key. Causes no
problem only confirm the only thing that whether the new value is of same data type and same d
omain. Modifying the primary key is similar to delete one tuple and insert another.
The tables can be designed arbitrarily, but such tables are suffer from a number of difficulties w
hen database operations are performed on them. Which indicate the bad database design. A
good database design does not have such problems. The design which provide a better space
efficiency and process efficiency is taken as good design. In other words we can say that a
database should occupy the minimum space. If there is a theoretical design of a database whic
h can only be considered as good database.
2. Reducing the redundant values in tuple - Grouping attributes into relational schema
- http://www.docx-to-doc-converter.com
3. Reducing the null values in the tuple- In some designs we may group many attribute
s into a “fat” relations. If all the attributes are not apply to all tuples we end up with man
y nulls in those tuples. This can waste the space at the storage level and can also creat
e problems with understanding the meaning of the attributes.
Normalization - It is a technique which help in determining that which is the most appropriate g
rouping of data items into records, segments and tuples. This is necessary as data items arran
ged in tables which indicate the structure, relationship integrity in the relational databases.
Normal forms – The normalization process takes a series of tests to certify “whether” it satisfy t
he certain normal forms. First Codd proposed three normal forms which called first, second and
third normal forms. A strong definition of 3 NF (normal Forms) is cannel BCNF (Boyce codd nor
mal form). All these normal forms are based on the functional dependencies among the attrib
utes of the relational database Later 4NF and 5NF is also proposed.
First normal form (1NF) A relation schema is said to be 1NF when there is only one value is a
ssociated a\with each attribute and value is not a set of values or a list of values.
Second normal form(2NF) - A relation is said to be 2NF if and only if there is a 1NF and ever
y non key attributes are irreducibly depends on the primary key.
Third Normal form - A relation is in 3NF if and only if it is in 2NF and every on key attribute is
noon transitively dependent on the primary key.
Boyce Codd normal form – A relation is said to be in BCNF when if only determinants are can
didate keys.
Design the logical and physical structure of one or more databases to account the information n
eeds of the users in an organization for a defined set of applications.
2. Provide a natural and easy way to understanding the structuring of the information.
3. Support performance requirements and any performance objective response time, proc
essing time, and storage space.
The goal of the database design is is very hard to accomplish and if any attempt to achieve nat
uralness and understandable made it may effect the performance of the database.
- http://www.docx-to-doc-converter.com
3. Choice of a DBMS
Requirement and analysis phase – the following activates are involved in this process.
1. The major application area and user groups that will use the database on whose work wi
ll be effected layout are identified.
3. The current operating environment and planned use of information is studied. This inclu
des analysis of type of transactions and their frequencies as well as of the flow of inform
ation within the system.
4. Written response to sets of questions are some times collected from the potential databa
se users and user groups. The questions involve the user properties and the importance
the palce on various applications.
Conceptual database design - The goal of this phase is to produce conceptual scheme for th
e database which will be independent of any specific database.
1. We often use a high level data model such as ER and EER model during this phase.
Choice of DBMS - The choice a DBMS is governed by a number of factors. There are some te
chnical some economical and some are political of the organization. Technical factors are conc
erned with the stability of the DBMS for task at hand. The organizational and economic factors
are involved :-
• Maintenance cost
• Personal cost
• Training cost
• Operating cost
Data model mapping (logical database design): - In this phase we map or transform the con
ceptual schema from the high level data modal used in phase 2.
1. System independent mapping – In this the mapping dose not consider any specific
cases that apply to the DBMS implementation of the data modal.
2. Different DBMS implement a data modal by using specific modeling features and con
straints.
The result of this phase will be DDL statements that specify the conceptual and external view of
the DBMS.
Physical database design - In this phase we design specifications for the database in terms of
physical storage , record placement and indexes. The following criteria are often used to guide t
he choice of physical database design options: -
1. Response time: - This is the elapsed time between submitting a request for database tr
ansaction and getting a response from the system.
2. Space utilization: -This is the amount of storage space used by the database files and t
- http://www.docx-to-doc-converter.com
3. Transaction throughput: - That is the average number of transactions that can be proc
essed in a minute. It is the critical parameter of transition system such as those used by
airline reservation and banking.
4. Database system implementation and tuning: - In this phase the database programs
are implemented, tested and eventually deployed for service.
RDBMS Terminology
Attributes: - A kind of information that describes one aspect of a data object. For example “ag
e” is an person’s attribute, and “salary” is an attribute of the employee. Attribute is also called c
olumn.
Relation: - A data object is defined by a set of attributes. For example employee is a relation wit
h various attributes that define employee data object. Relation is also called table.
Tuple: - An instance of data object with specific values for all attributes of the relation. It is also
called a “row” or a “record”.
Table: - This is the structure defined to store data under it. It is also called ENTITY.
Fields: - It is also called attributes in RDBMS terminology. In other words it is called as colum
n in a table.
• Simple maintenance of data when updation deletion and insertion of data is take
place.
Join: - When rows of one table is joined with rows of other table by common val-+ues in the corr
esponding columns. This us done by using JOIN concept. So joins helps in fetching data by on
e or more tables that can be related to each other by some meaning.
Referential Integrity: - This is created in tables by giving reference to another table. In this con
cept foreign key is figure out. The table in which a combination of columns is defines as child t
able. When a relation is made between a table with foreign key and a table with primary key is
known as referential key. The tale which have the primary key or a reference key is known as
parent table.
Foreign key: - It is defined as a column or a set of columns in a child table to declare the refere
ntial integrity.
Data Integrity: - It refers to accuracy of data. Which is very essential for proper utility and mai
ntenance of a database. It is achieved by implementing some constraints and rules on the data
base. By do so one can place restriction to check while data is updated or inserted new data by
someone. Concept of index: - It is similar to the concept of pointers in a language. Because
there is a lot of data in a database if someone ask for a particular data it ahs to be check throug
hout the whole database which is very time consuming process, so To have sufficient usage of
database while doing this search process indexing is used in columns.
Users
Objects: -
Privilege: - There is nothing but a number of actions permitted by a particular user on the data
base.
Concurrency of data access can be taken care by the technology of locking in database. When
multiple users are accessing the same table and updating or inserting new data, locking is the c
oncept by which other users are prohibited by using the same database table which will be alter
ed.
Deadlock:- Transaction is a unit of work done in a database. So when a database have a num
ber of transaction then it is possible that it will have 2 or 3 transaction in the wait state. Example
:- suppose we are going to update two tables by two transactions in a database. We know that
when we update the table it is locked. In the similar way when these both tables were locked by
the user transactions and wait for each other to release it make a state of deadlock in a databas
e system.
Domain integrity constraints: - These constraints set a range, and any violation of the rage wi
ll prevent the user to manipulate the database tables. There is basically two types of database i
ntegrity :-
• Check constraints
By default the database tables can contain the null value but by applying this constraint we can
ensure that not any cell of table will contain null value. Second value “check” is defined as a par
ticular check on values which can force users to show whether data in the table is in the given r
ange or not.
• Unique Constraints – it means that each value in the table is unique and does not
match with each other. It restricts duplication of records in the table.
• Primary Key Constraints - It is similar to the unique key constraint but it also av
oid duplication as well as null values.
Referential integrity constraints - It ensures that relation of two tables in a database is havin
g the similar values.
In relationship table containing the foreign key is called child table and table containing the refer
ential key is called parent table. These are of following types: -
Reference Description
Restrict Disable the updation and deletion of specify data
Set to Null When specified data is updated or deleted all the concerned data is set to zero
or null
Set to default When specified data is updated or deleted all the concerned data is set to defau
lt
Cascade When specified data is updated all associated data is updated and when specifie
d row is deleted all associated rows will be deleted
No Action Disable the updating and deletion of specified data. This is the default operation
in most of the database.
Implementation of constraints
We know that by default all columns in a table allow null values. This does not mean that the co
lumn should compulsory be null.