Introduction to Relational database management system, A definition of an RDBMS is a DBMS in which data is stored in tables and the relationships among the data are also stored in tables. The data can be accessed or reassembled in many different ways without having to change the table forms.
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Relational data base management system (Unit 1)
1. RELATIONAL DATA BASE MANAGEMENT SYSTEM
Introduction
A definition of a RDBMS is: a DBMS in which data is stored in tables
and the relationships among the data are also stored in tables. The
data can be accessed or reassembled in many different ways without
having to change the table forms.
Historical usage of the term
The term "relational database" was invented by E. F. Codd at IBM in
1970; Codd introduced the term in his seminal paper "A Relational
Model of Data for Large Shared Data Banks". In this paper and later
papers he defined what he meant by relational. One well-known
definition of what constitutes a relational database system is
composed of Codd's 12 rules. However, many of the early
implementations of the relational model did not conform to all of
Codd's rules, so the term gradually came to describe a broader class of
database systems. At a minimum, these systems should:
• Present the data to the user as relations (a presentation in
tabular form, i.e. as a collection of tables with each table
consisting of a set of rows and columns);
• Provide relational operators to manipulate the data in tabular
form.
Data
• Data is raw fact or figures or entity.
• When activities in the organization takes place, the effect
of these activities need to be recorded which is known as
Data.
2. Information :
• Processed data is called information.
• The purpose of data processing is to generate the
information required for carrying out the business
activities.
In general data management consists of following tasks:
• Data capture: Which is the task associated with gathering
the data as and when they originate.
• Data classification: Captured data has to be classified
based on the nature and intended usage.
• Data storage: The segregated data has to be stored
properly.
• Data arranging: It is very important to arrange the data
properly
• Data retrieval: Data will be required frequently for further
processing, hence it is very important to create some
indexes so that data can be retrieved easily.
• Data maintenance: Maintenance is the task concerned
with keeping the data up-to-date.
• Data verification: Before storing the data it must be
verified for any error.
• Data coding: Data will be coded for easy reference.
• Data editing: Editing means re-arranging the data or
modifying the data for presentation.
• Data transcription: This is the activity where the data is
converted from one form into another.
• Data transmission: This is a function where data is
forwarded to the place where it would be used further.
3. Data Flow Diagrams
• The Data Flow Diagrams (DFDs) are used to illustrate the data
process activities of an organisation.
• The DFD indicate all the sequences including how data generated,
stored and processed.
An example of academic institute is represented in the Fig.
Data Flow Diagram for an academic institute
Database
• Database may be defined in simple terms as a collection of data.
4. • A database is a collection of related data.
• The database can be of any size and of varying complexity.
• A database may be generated and maintained manually or it may
be computerized.
Database Management System
• A Database Management System (DBMS) is a collection of
program that enables user to create and maintain a database.
• The DBMS is hence s general purpose software system that
facilitates the process of defining constructing and manipulating
database for various applications.
DBMS Characteristics
• To incorporate the requirements of the organization, system
should be designed for easy maintenance.
• Information systems should allow interactive access to data to
obtain new information without writing fresh programs.
• System should be designed to co-relate different data to meet new
requirements.
• Data should be stored with minimum redundancy to ensure
consistency in stored data across different applications.
• An independent central repository, which gives information and
meaning of available data, is required.
• Integrated database will help in understanding the inter-
relationships between data stored in different applications.
• The stored data should be made available for access by different
users simultaneously.
• Automatic recovery feature has to be provided to overcome the
problems with processing system failure.
5. Advantage of using a DBMS
• Controlling redundancy
• Restricting unauthorized access
• Providing persistent storage for program object and data
structures
• Permitting inference and actions by using rules
• Providing multiple user interface
• Presenting complex relationships among data
• Enforcing integrity constraints
• Providing backup and recovery
DBMS Utilities:
Data Base Management System provides many utilities, some of
which are listed below
• A data loading utility:
Which allows easy loading of data from the external format
without writing programs.
• A backup utility:
Which allows to make copies of the database periodically to help
in cases of crashes and disasters.
• Recovery utility:
Which allows to reconstruct the correct state of database from the
backup and history of transactions.
• Monitoring tools:
Which monitors the performance so that internal schema can be
changed and database access can be optimized.
• File organization:
Which allows to restructure the data from one type to another.
6. Data Models
The data model is used to represent real facts of the application.
An application may contain many facts however one has to focus only
on important facts ignoring the others.
Some of the salient features that model must may have are as listed;
• Data model mainly describes the data, which gets stored and
processed in a given situation.
• A data model may describe data at various levels and description
may be at logical/physical levels or from the point of user.
• A data model proposes a set of concepts for description of the
nature of data and inter-relationships between them along with
the syntax.
• A model should have as minimum concepts, which are close to real
world so that user can understand the model and verify.
• The model should provide primitives by which meaning of data can
be captured.
ER Model
• ER model is represents real world situations using concepts, which
are commonly used by people.
• It allows defining a representation of the real world at logical
level.
• ER model has no facilities to describe machine-related aspects.
• In ER model the logical structure of data is captured by indicating
7. the grouping of data into entities.
• The ER model also supports a top-down approach by which details
can be given in successive stages.
• Entity: An entity is something which is described in the database
by storing its data, it may be a concrete entity a conceptual entity.
• Entity set: An entity set is a collection of similar entities.
• Attribute: An attribute describes a property associated with
entities. Attribute will have a name and a value for each entity.
• Domain: A domain defines a set of permitted values for a
attribute
Relationship
• The relationship concept represents association among different
entities.
• In an application, entities interact with each other and these
interactions are captured through the concept of relationship.
Types of Relationship
• One to one relationship, where one entity in A may be associated
at most with one entity in B.
• One to many relationship, where one entity in A is associated with
zero or more entities in B and one entity in B can be associated
with at most one entity from A.
• Many to one relationship is the reverse of one to many as given
above.
• Many to many relationship, where an instance in A is associated
with many entities in B and vice-versa.
• Existence Dependence: To check the correctness of the data in the
database, there is constraint called existence dependence, which
indicates that entity has its own identity it cannot exist
independently.
SYMBOLS
8. • The ER model is represented using different symbols as shown
E-R Notation: Symbols
Example for ER Model
9. Database Design
Some guidelines to be followed while designing the database:
Data integrity:
• Data is accepted based on certain rules & there fore data is valid.
• Enforcing data integrity ensures that the data in the database is
valid and correct. Keys play an important role in maintaining data
integrity.
• The various types of keys that have been identified are the:
o Candidate key
o Primary key
o Alternate key
o Composite key
o Foreign key
10. Candidate key
• An attribute or set of attributes that uniquely identifies a row is
called a Candidate key.
• This attribute has values that are unique.
Vehicle
Primary Key
The Candidate key that you choose to identify each row uniquely
is called the Primary key.
Alternate Key
A Candidate key that is not chosen as a Primary key is an
Alternate key.
Composite Key
In certain tables, a single attribute cannot be used to identify
rows uniquely and a combination of two or more attributes is
used as a Primary key. Such keys are called Composite keys.
11. Purchase
Foreign Key
• When a primary key of one table appears as an attribute in another
table, it is called the Foreign key in the second table.
• A foreign key is used to relate two tables.
Weak entity:
• A weak entity does not have a distinguishing attribute of its own
and mostly are dependent entities, which are part of some another
entity.
• A weak entity will always be related to one or more strong entities.
• They can be also understood as multi-valued attributes.