Sie sind auf Seite 1von 10

DBMS

♦ A Database is a collection of related data. By data, we mean known facts that


can be recorded and that have implicit meaning.

♦ Properties:
♦ Represents some aspect of the real world.
♦ A logically coherent collection of data with some inherent meaning.
♦ Designed, built and populated with data for a specific purpose.

♦ A DBMS is a collection of programs that enables users to create and maintain


a database. It is a general purpose software system that facilitates the
processes of defining, constructing and manipulating databases for various
applications.
DBMS
♦ Advantages of DBMS:
♦ Controlling Redundancy
♦ Restricting Unauthorized access
♦ Providing persistent storage for program objects and data structures.
♦ Permitting inferencing and actions using rules.
♦ Providing Multiple user interfaces
♦ Representing Complex relationships among data
♦ Enforcing Integrity constraints
♦ Back up and recovery

♦ Overhead of DBMS:
♦ High Initial investment
♦ Security, concurrency control, recovery, Integrity functions
DBMS
♦ Data Model:
♦ A collection of concepts that can be used to describe the structure of a
database – provides the necessary means to achieve this abstraction.
♦ By structure of a database we mean the data types, relationships and
constraints that should hold on the data.

♦ Relationship:
♦ Interaction among the entities.

♦ Description of a database is called the database schema.


DBMS
♦ Specialization:
♦ Process of defining a set of subclasses of an entity type; this entity type is
called the superclass of the specialization.

♦ Generalization:
♦ Suppressing the differences among several entity types, identify their common
features and generalize them into a single superclass of which the original
entity types are special subclasses.

♦ Sub class and super class relationship:


♦ IS – A – SUBCLASS – OF
DBMS
♦ Aggregation:
♦ Abstraction concept for building composite objects from their component
objects.

♦ Relation between primitive and their aggregate object:


♦ IS – A – PART – OF
♦ Inverse (IS – A – COMPONENT – OF)

♦ Association:
♦ Associate objects from several independent classes.
DBMS
♦ Entity Integrity constraint:
♦ States that No primary key value can be null.

♦ RIC:
♦ Specified between two relations and is used to maintain the consistency
among tuples of the two relations.

♦ Foreign key of R1 that references Relation R2(Rules)


♦ The attributes in FK have the same domain(s) as the primary key attributes PK
of R2.
♦ A value of FK in a tuple t1 of the current state r1(R1) either occurs as a value
of PK for some tuple T2 in the current state r2(R2).
DBMS
♦ Set Operations:
♦ UNION, INTERSECTION and SET DIFFERENCE.

♦ Cartesian Product of two relations S and R will have nR * nS tuples.

♦ JOIN OPERATION:
♦ 1) Theta Join(Null do not appear in the result.
♦ 2) Equi join(=)
♦ 3) Natural Join(basically an equi join followed by removal of the superfluous
attributes)

♦ Division Operation:
♦ T1 π Y( R ) , T2π Y ((S * T1) - R), T T1-T2
DBMS
 Triggers:
 Active rule capability is provided by a database trigger – stored procedure that is
implicitly executed or fired when the table with which it is associated has an insert,
delete or update performed on it.

 Functional Dependency:
 Constraint between two sets of attributes from the database.
 Between two sets of attributes X and Y that are subsets of
R specifies a constraint on the possible tuples that can form a relation state r of R.

 Normalization of Data:
 Process of analyzing the given relation schemas based on their FDs and primary
keys to achieve the desirable properties of
 Minimizing redundancy.
 Minimizing the insertion, deletion and update anomalies
DBMS
♦ FIRST NORMAL FORM:
♦ States “The domain of an attribute must include only atomic(indivisible)
values and that the value of any attribute in a tuple must be a single value from
the domain of that attribute”.
♦ Disallows “relations within relations” and multivalued attributes.

♦ Second Normal Form:


♦ Based on the concept of full functional dependency.
♦ A functional dependency X  Y is a full functional dependency if removal of
any attribute A from X means that the dependency does not hold any more.

♦ Third Normal Form:


♦ Based on the concept of Transitive dependency.
DBMS
♦ Transitive Dependency, if there is a set of attributes Z that is neither a
candidate key nor a subset of any key of R and both X  Z and Z  Y hold.

♦ Codd’s Original defn., A relation schema R is in 3NF if it satisfies 2NF and no


nonprime attribute of R is transitively dependent on the primary key.

♦ Boyce – Codd Normal Form(BCNF):


♦ A relation schema is in BCNF if whenever a nontrivial functional dependency
X  A holds in R, then X is a superkey of R.

♦ Diff. Between BCNF and 3NF:


♦ Allows A to be prime, is absent from BCNF.

Das könnte Ihnen auch gefallen