Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Characteristics of a Database system

 Self-describing nature of a database system


 Insulation between programs and data, and data abstraction
 Support of multiple views of the data
 Sharing of data and multiuser transaction processing.

In File system storing and retrieving of DBMS is efficient to use since there are
data cannot be done efficiently. wide varieties of sophisticated
techniques to store and retrieve the
data.

Protecting a file under file system is very DBMS has a good protection
difficult. mechanism.

DBA
A person who has such central control over both data and programs is called a
database administrator (DBA). Functions are,
 Granting of authorization for data access:
 Routine maintenance:
Advantage of dbms
 Controlled Redundancy
 Restricting Unauthorized Access
 Providing Backup & Recovery
 Multiple user interfaces
Data independence
Data independence is the capacity to change the schema at one level of a
database without changing the schema at the next higher level.
Logical and physical data independences
DDL:
Ex: Create, alter, drop, rename.

DML:
Ex: Insert, delete, select, update.

DCL:
Ex: Grant, revoke.

Entity set
 The collection of all entities of a particular entity type in the database at
any point of time is called an entity set.
Attributes
Attributes are properties used to describe an entity.

Relationships Set
A relationships set is a set of relationships of the same type.

Degree of Relationships Type


The degree of a relationship type is the number of participating entity types.
Binary and ternary relationship

Weak Entity Types


An entity that does not have a key attribute is called weak entity type.

Foreign key

Foreign key are the columns of a table that points to the primary key of another
table.
Alternate key

It is a key associated with one or more columns whose values uniquely identify
every row in the table, but not a primary key.

Candidate key

Candidate key is a column in a table that can uniquely identify any database
record without referring to any other data.

Aggregate Functions
Aggregate functions are functions that take a collection of values as input and return
a single value. SQL offers five built-in aggregate functions:
 Average: avg
 Minimum: min
 Maximum: max
 Total: sum
 Count: count

Views
• A view is a “virtual” table that is derived from other tables.
• A view does not exist physically.

Integrity constraints
Integrity constraints are a set of rules.It is used to maintain the quality of information.

Embedded SQL

Embedded SQL is a method of combining the computing power of a programming


language and the database manipulation capabilities of SQL.
Functional dependency
A functional dependency is a constraint between two sets of attributes from the
database.
IR1 (reflexive rule): If X ⊇ Y, then X→Y.
IR2 (augmentation rule): {X→Y} |= XZ→YZ.
IR3 (transitive rule): {X→Y, Y→Z} |= X→Z.
IR4 (decomposition, or projective, rule): {X→YZ} |= X→Y.
IR5 (union, or additive, rule): {X→Y, X→Z} |= X→YZ.
IR6 (pseudotransitive rule): {X→Y,WY→Z} |= WX→Z.

Normalization

Normalization is a process of organizing the data in database to avoid data


redundancy, insertion anomaly, update anomaly & deletion anomaly.

Normalization splits a large table into smaller tables and define relationship
between them to increase the clarity in organizing data.

First Normal Form


A table is said to be in First Normal Form, if it should follow the following rules:

 It should only have single(atomic) valued attributes/columns.


 All the columns in a table should have unique names.

Second normal form


For a table to be in the Second Normal Form, A table is said to be in 2NF if it holds
the following conditions,

 It should be in the first normal form.


 And, it should not have Partial Dependency.
Third normal form
A table design is said to be in 3NF if both the following conditions hold:

 Table must be in 2NF


 Transitive functional dependency of non-prime attribute on any super key should be
removed.

BCNF

A 3NF table which does not have multiple overlapping candidate key is said to be in
BCNF. A table said to be in BCNF if it satisfies the fallow conditions,

 R must be in 3rd normal form.


 For each functional dependency(xy), x should be super key.

Transaction

A transaction is a logical unit of a program and it may contain several group of


tasks.
Acid properties
 Atomicity
 Consistency
 Durability
 Isolation

Transaction states are- Active state, Partially committed state, Committed state,
Failed state, Aborted state, Terminated state.

Deadlock
A deadlock is an unwanted situation in which two or more transactions are
waiting indefinitely for one another to give up locks.
Recovery failures
Logical error
System error

You might also like