DBMS_module IV dup
DBMS_module IV dup
31/12/2024
Decomposition
Decomposition refers to breaking down of one
table into multiple tables.
103 Minu CA S3 80
Unit IV
31/12/2024
1. SQL
Normalization
The process of modifying a relation schema so that
it conform to certain rules is called normalization.
It is a technique for organizing the data in the
database.
Normalization is a systematic approach of
decomposing tables to eliminate data redundancy
and undesirable characteristics like Insertion,
Update and Deletion Anamolies.
It is a multi-step process that puts data into tabular
form by removing duplicated data from the relation
tables.
Normalization
Need of Normalisation
1. the main purpose is to eliminate reduntant(useless)
data.
2. Ensuring data dependencies make sense i.e data is
logically stored.
3. The normal forms are also used to ensure that
various types of anomalies and inconsistencies are
removed from the database.
Normalization-Normal Forms
A relation is said to be in a particular normal form if it
satisfies certain specified constraints.
Normalization rule are divided into following normal forms
• First Normal Form
• Second Normal Form
• Third Normal Form
• BCNF
• 4NF
1NF, 2NF, 3NF and BCNF are based on functional
dependencies among the attributes of a relation
4NF is proposed based on the concept of multi-valued
dependencies
First normal form
First Normal Form (1NF):
If a relation contains a composite or multi-valued attribute, it
violates the first normal form, or the relation is in first normal
form if it does not contain any composite or multi-valued
attribute. A relation is in first normal form if every attribute in
that relation is singled valued attribute.
A table is in 1 NF iff:
Regno Name
1001 Vishnu
1002 Hari
1001 Vishnu
1003 Remya
1003 Remya
Third Normal Form (3NF)
• A relation is in third normal form, if there is no
transitive dependency for non-prime
attributes as well as it is in second normal
form.
• A relation is in 3NF if at least one of the
following condition holds in every non-trivial
function dependency X –> Y:
• X is a super key.
• Y is a prime attribute (each element of Y is
part of some candidate key).
Transitive Dependency
• In a table we have some column that acts as
the primary key and other columns depends
on this column.
• But what if a column that is not the primary
key depends on another column that is also
not a primary key or part of it? Then we have
Transitive dependency in our table.
Example
EMP_ID EMP_COUNTRY
264 India
364 UK
EMP_DEPT table:
EMP_ID EMP_DEPT
D394 283
D394 300
D283 232
D283 549
Functional dependencies:
EMP_ID → EMP_COUNTRY
EMP_DEPT → {DEPT_TYPE, EMP_DEPT_NO}
Candidate keys:
For the first table: EMP_ID
For the second table: EMP_DEPT
For the third table: {EMP_ID, EMP_DEPT}
Now, this is in BCNF because left side part of
both the functional dependencies is a key.
Fourth normal form (4NF)
Slide 30- 37
Mobile Computing Architecture(2)
• It is distributed architecture where a number of computers,
generally referred to as Fixed Hosts and Base Stations are
interconnected through a high-speed wired network.
– Fixed hosts are general purpose computers configured to
manage mobile units. Performs the transaction and data
management functions.
– A base station is capable of connecting with a Mu and is
equipped with a wireless interface.
– It manages its own database with DBMS functionality. It also
locate the mobile units and manage the requirements of mobile
environments.
– Mobile Units are portable computers that move around a
geographical region.
– Base stations function as interface to the fixed network and the
Slide 30- 38
Mobile Units(MUs).
Mobile Computing Architecture
• Mobile units can move freely in a geographic
mobility domain, an area that is circumscribed by
wireless network coverage.
₋ To manage the mobility of units, entire mobility
domain is divided into one or more smaller
domains, called cells, each of which is
supported by at least one base station.
₋ The mobile unit attached to a fixed network, try
to be like a traditional client-server architecture.
₋ But Wireless communications, make use of
another architecture called MANET (mobile ad-
hoc network).
Slide 30- 39
Mobile Computing Architecture
In a MANET, co-located mobile units do not need to
communicate via a fixed network, but instead, form
their own using cost-effective technologies such as
Bluetooth.
MANET applications can be considered as peer-to-
peer, meaning that a mobile unit is simultaneously act
as a client and a server.
In a MANET, mobile units are responsible for routing
their own data.
Concurrency control
Concurrency Control is the management
procedure that is required for controlling
concurrent execution of the operations that
take place on a database.
Concurrent Execution in DBMS
ACID Property
Atomicity
Consistency
Isolation
Durability
concurrently.
31/12/2024
Transaction Properties
DURABILITY