The document provides an overview of relational database management system (RDBMS) concepts. It discusses what a database is, different database types like hierarchical, network, relational and object relational. It also explains the relational model proposed by Dr. E.F. Codd, how it uses tables, rows and columns. Key concepts covered include relationships, constraints, keys, normalization and transactions. Entity relationship modeling and diagramming are demonstrated through an example involving producers, depots, collection agents and procurement records.
These slides cover the following concepts:
~ RDBMS vs DBMS
~ RDBMS structure
~ RDBMS basics for beginners
~ RELATIONAL DATABASE MANAGEMENT SYSTEM
~ DATA, SCHEMA, AND DATABASE
~ WHAT IS RDBMS?
~ FEATURES OF RDBMS
~ RELATIONSHIPS IN DATABASE
~ RULES OF RDBMS
~ ELEMENTS OF RDBMS
~ SQL COMMANDS
~ SQL CONSTRAINTS
~ COMMON SQL CONSTRAINTS
~ DATA DEFINITION LANGUAGE SCRIPT (DDL)
~ DATA MANIPULATION LANGUAGE SCRIPT (DML)
~ DATA CONTROL LANGUAGE SCRIPT (DCL)
~ PRIMARY KEY, FOREIGN KEY
~ EXAMPLE OF PRIMARY AND FOREIGN KEY
~ DBMS VS RDBMS
~ RDBMS NORMALIZATION
~ BENEFITS OF NORMALIZING
~ SQL JOINS
~ INNER JOIN
~ LEFT OUTER JOIN
~ RIGHT OUTER JOIN
~ FULL OUTER JOIN
~ CROSS JOIN
~ SELF JOIN
These slides cover the following concepts:
~ RDBMS vs DBMS
~ RDBMS structure
~ RDBMS basics for beginners
~ RELATIONAL DATABASE MANAGEMENT SYSTEM
~ DATA, SCHEMA, AND DATABASE
~ WHAT IS RDBMS?
~ FEATURES OF RDBMS
~ RELATIONSHIPS IN DATABASE
~ RULES OF RDBMS
~ ELEMENTS OF RDBMS
~ SQL COMMANDS
~ SQL CONSTRAINTS
~ COMMON SQL CONSTRAINTS
~ DATA DEFINITION LANGUAGE SCRIPT (DDL)
~ DATA MANIPULATION LANGUAGE SCRIPT (DML)
~ DATA CONTROL LANGUAGE SCRIPT (DCL)
~ PRIMARY KEY, FOREIGN KEY
~ EXAMPLE OF PRIMARY AND FOREIGN KEY
~ DBMS VS RDBMS
~ RDBMS NORMALIZATION
~ BENEFITS OF NORMALIZING
~ SQL JOINS
~ INNER JOIN
~ LEFT OUTER JOIN
~ RIGHT OUTER JOIN
~ FULL OUTER JOIN
~ CROSS JOIN
~ SELF JOIN
A data dictionary is a “virtual database” containing metadata (data about data). Data dictionary holds information about the database and the data that it stores.
Introduction to Relational algebra in DBMS - The relational algebra is explained with all the operations. Some of the examples from the textbook is also solved and explained.
An introduction to database architecture, design and development, its relation to Object Oriented Analysis & Design in software, Illustration with examples to database normalization and finally, a basic SQL guide and best practices
A data dictionary is a “virtual database” containing metadata (data about data). Data dictionary holds information about the database and the data that it stores.
Introduction to Relational algebra in DBMS - The relational algebra is explained with all the operations. Some of the examples from the textbook is also solved and explained.
An introduction to database architecture, design and development, its relation to Object Oriented Analysis & Design in software, Illustration with examples to database normalization and finally, a basic SQL guide and best practices
Application development with Oracle NoSQL Database 3.0Anuj Sahni
Oracle announced Oracle NoSQL Database 3.0 on April 2, 2014. This release offers increased security, simplified data modeling, secondary indices, and multi-datacenter performance enhancement.
For audio/video presentation visit: http://bit.ly/1qLEZW9
This will tell about the three of the Protocols(Lock-Based Protocols, Timestamp-Based Protocols, Validation-Based Protocols) of Concurrency Control used in the database management system.
ESOFT Metro Campus - Diploma in Software Engineering - (Module IV) Database Concepts
(Template - Virtusa Corporate)
Contents:
Introduction to Databases
Data
Information
Database
Database System
Database Applications
Evolution of Databases
Traditional Files Based Systems
Limitations in Traditional Files
The Database Approach
Advantages of Database Approach
Disadvantages of Database Approach
Database Management Systems
DBMS Functions
Database Architecture
ANSI-SPARC 3 Level Architecture
The Relational Data Model
What is a Relation?
Primary Key
Cardinality and Degree
Relationships
Foreign Key
Data Integrity
Data Dictionary
Database Design
Requirements Collection and analysis
Conceptual Design
Logical Design
Physical Design
Entity Relationship Model
A mini-world example
Entities
Relationships
ERD Notations
Cardinality
Optional Participation
Entities and Relationships
Attributes
Entity Relationship Diagram
Entities
ERD Showing Weak Entities
Super Type / Sub Type Relationships
Mapping ERD to Relational
Map Regular Entities
Map Weak Entities
Map Binary Relationships
Map Associated Entities
Map Unary Relationships
Map Ternary Relationships
Map Supertype/Subtype Relationships
Normalization
Advantages of Normalization
Disadvantages of Normalization
Normal Forms
Functional Dependency
Purchase Order Relation in 0NF
Purchase Order Relation in 1NF
Purchase Order Relations in 2NF
Purchase Order Relations in 3NF
Normalized Relations
BCNF – Boyce Codd Normal Form
Structured Query Language
What We Can Do with SQL ?
SQL Commands
SQL CREATE DATABASE
SQL CREATE TABLE
SQL DROP
SQL Constraints
SQL NOT NULL
SQL PRIMARY KEY
SQL CHECK
SQL FOREIGN KEY
SQL ALTER TABLE
SQL INSERT INTO
SQL INSERT INTO SELECT
SQL SELECT
SQL SELECT DISTINCT
SQL WHERE
SQL AND & OR
SQL ORDER BY
SQL UPDATE
SQL DELETE
SQL LIKE
SQL IN
SQL BETWEEN
SQL INNER JOIN
SQL LEFT JOIN
SQL RIGHT JOIN
SQL UNION
SQL AS
SQL Aggregate Functions
SQL Scalar functions
SQL GROUP BY
SQL HAVING
Database Administration
SQL Database Administration
RDBMS - Relational Database Management System It is database management system based on relational model , which is used to manage relational database. Relational model is organization of data in tables which are interrelated. Relational Database It is organized collection of tables. Data is stored in tables. Tables are related to each other using one or more fields.
Sysadmins are often responsible for various identity stores in a company: directories, applications with built-in account databases, etc...
Ldap Synchronization Connector offers a solution to link these repositories and ensure nobody\'s going to get fired because you forgot to disable an account.
LSC is an open source project under the BSD license - http://lsc-project.org/
Sysadmins are often responsible for various identity stores in a company: directories, applications with built-in account databases, etc...
Ldap Synchronization Connector offers a solution to link these repositories and ensure nobody\’s going to get fired because you forgot to disable an account.
LSC is an open source project under the BSD license - http://lsc-project.org/
Adjusting primitives for graph : SHORT REPORT / NOTESSubhajit Sahu
Graph algorithms, like PageRank Compressed Sparse Row (CSR) is an adjacency-list based graph representation that is
Multiply with different modes (map)
1. Performance of sequential execution based vs OpenMP based vector multiply.
2. Comparing various launch configs for CUDA based vector multiply.
Sum with different storage types (reduce)
1. Performance of vector element sum using float vs bfloat16 as the storage type.
Sum with different modes (reduce)
1. Performance of sequential execution based vs OpenMP based vector element sum.
2. Performance of memcpy vs in-place based CUDA based vector element sum.
3. Comparing various launch configs for CUDA based vector element sum (memcpy).
4. Comparing various launch configs for CUDA based vector element sum (in-place).
Sum with in-place strategies of CUDA mode (reduce)
1. Comparing various launch configs for CUDA based vector element sum (in-place).
Opendatabay - Open Data Marketplace.pptxOpendatabay
Opendatabay.com unlocks the power of data for everyone. Open Data Marketplace fosters a collaborative hub for data enthusiasts to explore, share, and contribute to a vast collection of datasets.
First ever open hub for data enthusiasts to collaborate and innovate. A platform to explore, share, and contribute to a vast collection of datasets. Through robust quality control and innovative technologies like blockchain verification, opendatabay ensures the authenticity and reliability of datasets, empowering users to make data-driven decisions with confidence. Leverage cutting-edge AI technologies to enhance the data exploration, analysis, and discovery experience.
From intelligent search and recommendations to automated data productisation and quotation, Opendatabay AI-driven features streamline the data workflow. Finding the data you need shouldn't be a complex. Opendatabay simplifies the data acquisition process with an intuitive interface and robust search tools. Effortlessly explore, discover, and access the data you need, allowing you to focus on extracting valuable insights. Opendatabay breaks new ground with a dedicated, AI-generated, synthetic datasets.
Leverage these privacy-preserving datasets for training and testing AI models without compromising sensitive information. Opendatabay prioritizes transparency by providing detailed metadata, provenance information, and usage guidelines for each dataset, ensuring users have a comprehensive understanding of the data they're working with. By leveraging a powerful combination of distributed ledger technology and rigorous third-party audits Opendatabay ensures the authenticity and reliability of every dataset. Security is at the core of Opendatabay. Marketplace implements stringent security measures, including encryption, access controls, and regular vulnerability assessments, to safeguard your data and protect your privacy.
Techniques to optimize the pagerank algorithm usually fall in two categories. One is to try reducing the work per iteration, and the other is to try reducing the number of iterations. These goals are often at odds with one another. Skipping computation on vertices which have already converged has the potential to save iteration time. Skipping in-identical vertices, with the same in-links, helps reduce duplicate computations and thus could help reduce iteration time. Road networks often have chains which can be short-circuited before pagerank computation to improve performance. Final ranks of chain nodes can be easily calculated. This could reduce both the iteration time, and the number of iterations. If a graph has no dangling nodes, pagerank of each strongly connected component can be computed in topological order. This could help reduce the iteration time, no. of iterations, and also enable multi-iteration concurrency in pagerank computation. The combination of all of the above methods is the STICD algorithm. [sticd] For dynamic graphs, unchanged components whose ranks are unaffected can be skipped altogether.
2. NIC Wayanad 2
We Discuss…
What is a database
RDBMS Concepts
Relational Model
Entity – Relationship Model
Relationships
Constraints
Keys
Normalization
Transaction Control
3. NIC Wayanad 3
What is a database ?
A database is an organized collection
of information
To manage databases, you need
database management systems
(DBMS)
4. NIC Wayanad 4
DBMS
A collection of programs that
enables you to store, modify, and
extract information from a database.
A computer program designed for
the purpose of managing database
5. NIC Wayanad 5
Type of databases
Four main types of databases
Hierarchical
Network
Relational
Object Relational
6. NIC Wayanad 6
Relational Database Concept
Dr. E.F.Codd proposed the relational
model for database system in 1970.
It is the basis for the relational
database management system
(RDBMS)
7. NIC Wayanad 7
Relational Database Model
Uses tables to organize data
Each table corresponds to an entity
Each row represents the instance of
that entity
Tables can be related each other
• Relation=Table
• Tuple=Row
• Attribute=Column
8. NIC Wayanad 8
RDBMS
Fundamental Features
ACID
Referential Integrity
Transactions
Unicode
other objects are supported
Data Domain
Cursor
Trigger
Function
Procedure
Database Capabilites
Union
Inner joins
Outer joins
Inner selects
Merge
Blobs
9. NIC Wayanad 9
Databases in marketRDBMS Maintainer Software license
4th Dimension 4D s.a.s Proprietary
Adabas Software AG ?
Adaptive Server
Enterprise Sybase Proprietary
Apache Derby Apache Apache License
DB2 IBM Proprietary
DBISAM Elevate Software Proprietary
ElevateDB Elevate Software Proprietary
Firebird Firebird project IPL and IDPL
Informix IBM Proprietary
HSQLDB HSQL Development Group BSD
H2 H2 Software Freeware
Ingres Ingres Corp. GPL and proprietary
InterBase CodeGear Proprietary
MaxDB MySQL AB, SAP AG GPL or proprietary
Microsoft SQL Server Microsoft Proprietary
MonetDB
The MonetDB Developer Team
MonetDB Public License
v1.1
MySQL MySQL AB GPL or proprietary
HP NonStop SQL Hewlett-Packard Proprietary
Oracle Oracle Corporation Proprietary
Oracle Rdb Oracle Corporation Proprietary
OpenEdge Progress Software Corporation Proprietary
OpenLink Virtuoso OpenLink Software GPL or proprietary
Pervasive PSQL Pervasive Software Proprietary
PostgreSQL
PostgreSQL Global Development
Group BSD
Pyrrho DBMS University of Paisley Proprietary
SmallSQL SmallSQL LGPL
SQL Anywhere Sybase Proprietary
SQLite D. Richard Hipp Public domain
Teradata Teradata Proprietary
Valentina Paradigma Software Proprietary
10. NIC Wayanad 10
Relational Model
Three key terms are used extensively in relational
models
Relation
• relation is a table with columns and rows
Attributes
• The named columns of the relation are
called attributes
Domains
• set of values the attributes are allowed to
take
11. NIC Wayanad 11
Relational Model
ProducerID ProducerName Place Sex Caste DateBirth
1 BALAKRISHNAN.P.K VATTOLI BAZAR M GEN
2 VASUDEVAN NAMBIAR BALUSSERY M GEN 01/07/1948
3 HARIDASAN.M KARIYATHANKAVU M GEN 11/05/1962
4 ASIYA.N.K VATTOLI BAZAR F OBC
5 VELU VATTOLI BAZAR M OBC 02/10/1947
6 KELUKUTTI NAIR. P VATTOLI BAZAR M GEN
7 ROHINI. V.K VATTOLI BAZAR F GEN 01/07/1933
8 SURESH BABU.K.R KARIYATHANKAVU M ST
9 KUTTINARAYANAN NAIR VATTOLI BAZAR M GEN 07/10/1971 Tuple
10 LAKSHMI.T.P VATTOLI BAZAR F GEN
11 ABUBAKKAR. M KAPPURAM M OBC 22/04/1959
12 RAJAN NAIR.O.K KARIYATHANKAVU M GEN 15/11/1956
13 PRABAKARAN NAIR.K.K VATTOLI BAZAR M GEN
14 BALAN.K.P VATTOLI BAZAR M SC 25/09/1967
Domain
•A relation has a unique name and represents particular entity
•Each row of a relation referred to as a tuple
•A Key is a part of tuple that uniquely distinguishes from other tuples
•relation is a set of tuples
12. NIC Wayanad 12
Data Modelling
Database Server
Model of system in
clients’s mind
ER Model of Client’s
model
Table model of ER
model
Tables on disk
13. Analysis StageAnalysis Stage
Identifies::
entitiesentities - things of significance- things of significance
relationshipsrelationships - associations between entities- associations between entities
functionsfunctions - processes in the business- processes in the business
businessbusiness rulesrules - restrictions or constraints- restrictions or constraints
Does NOT identify tables, views, files, screens,
reports, or other computer-specific items...
14. NIC Wayanad 14
Entity – Relationship Model
It facilitates communication between
the database designer and the end
user during the requirement
analysis.
To facilitate such communication the designer
needs adequate communication tools
15. NIC Wayanad 15
Basic Elements of ER Model
Entity
• An entity defines any person, place, thing
or concept
• Eg : (Producer, Taluk, Course)
Attribute
• Characteristics (properties) of an entity
• Eg: (ProducerName, MemberID, HouseName)
Relationship
• Logical linkage between two entities
17. NIC Wayanad 17
Let us model
A Depot is a place where Producers pours their
cow milk
A Producer is a person who belongs to a Depot
and regularly pours Milk to Society
A Collection Agent, who procures Milk from
Producers through Depot.
Procurement Register maintains by
Collection Agent with the details of Milk poured
by Producers
A Member is a Producer, who gets Membership
through board resolution.
18. NIC Wayanad 18
ER Model - Entities
The highlighted words becomes entity
Entities are represented by rectangular box
DepotDepot
ProducersProducers
MembersMembers
Collection AgentCollection Agent
Procurement RegisterProcurement Register
19. NIC Wayanad 19
ER Model - Attributes
Attributes are the properties of entities
Provides additional information about entity
Possible attributes for each entity
Depot : DepotID, Name, DateStart
Producers : Name, Address, DateofBirth, Sex, Caste and
MemberID etc
Collection Agent : Name, Address
Members: MemberID, Date of Admission, Share Value
Procurement Register: ProducerID, Date, Time, MilkQty,
Milk Value
20. NIC Wayanad 20
Relationships
A relationship is an association between
two or more entities
Each entity in a relationship plays a role
Examples:
if we are identifying relationships between
DEPOT and PRODUCER, then we might define
the “pours”, “Belongs to”
22. NIC Wayanad 22
ER Model - Relationships
Logical linkage between two entities
A relationship connects two or more entity sets
Relationships are represented by diamond shape
box
24. NIC Wayanad 24
Constraints….
are rules that describe what valid data
look like
ensure the logical and semantic
consistency
Rules used to ensure accuracy and
integrity of data
26. NIC Wayanad 26
PRIMARY KEY Constraints
primary key is a candidate key to
uniquely identify each row in a table
.
PCODE PANCH_NAME
01 KANIAMBETTA
02 KOTTATHARA
03 MEPPADI
04 MUTTIL
05 PADINJARETHARA
27. NIC Wayanad 27
PRIMARY KEY Constraints
Defining PRIMARY KEY
CREATE TABLE Depot (DepotID INT, DepotName
VARCHAR(20), CONSTRAINT dep_pk PRIMARY
KEY(DepotID))
Add a PRIMARY KEY to an existing table
ALTER TABLE Depot ADD CONSTRAINT pk_dep
PRIMARY KEY (DepotID)
28. NIC Wayanad 28
FOREIGN KEY Constraints
Foreign key: a field in a table that is a primary
key in another table
Foreign key creates a relationship between the
two tables
Enforces referential integrity
Maps to the PRIMARY KEY in parent table
DepotID Name
1 OFFICE
2 VADUVANA
3 ANDOOR
4 PAMBALA
5 KADALMADU
6 MUNNOORE
ProducerID ProducerName DepotID
1 JOSEPH V.V 1
2 VELIYAN.V 3
3 JOHN.P.J 2
4 POULOSE. M M 2
5 JOSEPH.E.S 2
6 ACHANKUNHU N G 1
7 VARKY.M.M 1
8 MATHAI.M.M 5
9 APPACHAN.P.V 5
10 ISSAC.M.M 1
11 RAJU.P.T 2
Parent Table
(FK)
(PK)
29. NIC Wayanad 29
FOREIGN KEY Constraints..
Defining a FOREIGN KEY
CREATE TABLE Depot(DepotID INT PRIMARY KEY,DepotName
VARCHAR(20) NOT NULL);
CREATE TABLE Producers(ProducerID INT,ProducerName
VARCHAR(50) NOT NULL,DepotID INT, CONSTRAINT
pk_Prod PRIMARY KEY(ProducerID),CONSTRAINT
fk_prod FOREIGN KEY(DepotID) REFERENCES
Depot(DepotID) );
Add a FOREIGN KEY to an existing table
ALTER TABLE Producers ADD CONSTRAINT fk_Prod
FOREIGN KEY (DepotID) REFERENCES Depot(DepotID)
30. NIC Wayanad 30
UNIQUE KEY Constraints
No duplicates allowed in referenced column
NULL values are permitted
ProducerID ProducerName DepotID MemberID
1 JOSEPH V.V 1
2 VELIYAN.V 3 245
3 JOHN.P.J 2
4 POULOSE. M M 2
5 JOSEPH.E.S 2
6 ACHANKUNHU N G 1 154
7 VARKY.M.M 1
8 MATHAI.M.M 5 453
9 APPACHAN.P.V 5
10 ISSAC.M.M 1 12
11 RAJU.P.T 2
CREATE TABLE Producers(ProducerID INT PRIMARY KEY,ProducerName
VARCHAR(50) NOT NULL,DepotID INT,MemberID INT UNIQUE,CONSTRAINT
fk_prd1 FOREIGN KEY(DepotID) REFERENCES Depot(DepotID))
31. NIC Wayanad 31
CHECK Constraints
ensure valid data when adding or updating an
entry in a table
ProducerID ProducerName Sex DateJoin DateBirth ShareValue
1 JOSEPH V.V M 01/04/2001 11/04/1965 10
2 VELIYAN.V M 15/06/2007 12/09/1954 10
3 JOHN.P.J M 19/04/2003 08/05/1946 10
4 POULOSE. M M M 24/03/1997 10/05/1964 10
5 ANNAMMA F 26/07/2004 17/08/1959 10
6 ACHANKUNHU N G M 04/09/1992 18/07/1961 10
7 VARKY.M.M M 08/07/1991 19/03/1942 20
8 MATHAI.M.M M 17/08/1987 22/05/1938 10
M or F
Date Join >
Date Birth
>0CHECK Constraints -->
CREATE TABLE Producers(ProducerID INT ……,CONSTRAINT
check_Sex CHECK(Sex=‘M’ OR ‘F’),CONSTRAINT chk_share
CHECK(ShareValue>0))
32. NIC Wayanad 32
NOT NULL Constraints
Ensures that a specified column cannot contain a
Null Value
CREATE TABLE Depot(DepotID INT PRIMARY
KEY,DepotName VARCHAR(20) NOT NULL);
DepotID Name
1 OFFICE
2 VADUVANA
3 ANDOOR
4 PAMBALA
5 KADALMADU
6 MUNNOORE
DepotID Name
1 OFFICE
2 VADUVANA
3 ANDOOR
4 PAMBALA
5
6 MUNNOORE
Violation against NOT NULL
33. NIC Wayanad 33
Surrogate key
A surrogate key in a database is a unique identifier
surrogate key is not derived from application data
A surrogate key may be used as the primary key
some possible candidates for generating surrogates:
Globally Unique Identifiers (GUIDs)
Object Identifiers (OIDs)
Sybase or SQL Server identity column
Oracle SEQUENCE
PostgreSQL serial
MySQL AUTO_INCREMENT
MS Access AUTONUMBER
34. NIC Wayanad 34
Relationships
The following relationships can be
included in an E-R Model:
One-to-one
One-to-many
Many-to-many
35. NIC Wayanad 35
One-to-one Relationship
Each occurrence (row) of data in one entity is related to
only one occurrence of data in the other entity
Example: Each Producer has just one MemberID and each
MemberID is assigned to just one Producer
ProducerID ProducerName DepotID MemberID
1 JOSEPH V.V 1 5
2 VELIYAN.V 3 26
3 JOHN.P.J 2
4 POULOSE. M M 2 125
5 JOSEPH.E.S 2 110
6 ACHANKUNHU N G 1 12
7 VARKY.M.M 1 35
8 MATHAI.M.M 5
9 APPACHAN.P.V 5
10 ISSAC.M.M 1
11 RAJU.P.T 2 2
MemberID DateAdmit ShareValue
2 12/04/1987 10.00
5 12/04/1987 10.00
12 25/07/1988 10.00
26 25/09/1988 20.00
35 12/08/1997 10.00
110 02/12/2000 10.00
125 16/08/1998 10.00
PRODUCERS
MEMBERS
36. NIC Wayanad 36
One-to-many Relationship
Each occurrence of data in one entity can be
represented by many occurrences of the data in
the other entity
Example: each Depot carries many producers
PRODUCERS
DEPOT
DepotID Name
1 OFFICE
2 VADUVANA
3 ANDOOR
4 PAMBALA
5 KADALMADU
6 MUNNOORE
ProducerID ProducerName DepotID
1 JOSEPH V.V 1
2 VELIYAN.V 3
3 JOHN.P.J 2
4 POULOSE. M M 2
5 JOSEPH.E.S 2
6 ACHANKUNHU N G 1
7 VARKY.M.M 1
8 MATHAI.M.M 5
9 APPACHAN.P.V 5
10 ISSAC.M.M 1
11 RAJU.P.T 2
37. NIC Wayanad 37
Many-to-many Relationship
Data can have multiple occurrences in
both entities
In a proper design, this can’t be included
in the physical database
40. NIC Wayanad 40
Normalization
..is a process you can use to split out
non-relational tables into relational tables.
..is a technique for designing relational
database tables to minimize duplication of
information
.. is to safeguard the database against
data anomalies
41. NIC Wayanad 41
Bad Design
Update anomaly
Employee 519 is shown as having different addresses on
different records.
42. NIC Wayanad 42
Bad Design
Insertion anomaly
Until the new faculty member is assigned to teach at least
one course, his details cannot be recorded.
43. NIC Wayanad 43
Bad Design
Deletion anomaly
All information about Dr. Giddens is lost when he
temporarily ceases to be assigned to any courses.
44. NIC Wayanad 44
First Normal Form (1NF)
Remove repeating columns by creating new table moving the
columns into the new table, and linking back to the old table in a
on-to-many relationship.
ProducerID ProducerName Address Day1Qty Day1Value Day2Qty Day2Value Day3Qty Day3Value
1 JOSEPH V.V KALPETTA 1.2 15.25 1.9 22.5
2 VELIYAN.V MEPPADI 2.4 36.3 2.9 39.5 3.5 49.5
3 JOHN.P.J KALPETTA 5.4 68.5
4 POULOSE. M M BATHERY 6.4 79.8 7.1 89.9 6.5 78.5
5 JOSEPH.E.S PULPALLY . 2.9 34.35
PRODUCERS_PROCUREMENT
•To Eliminate repeating groups
45. NIC Wayanad 45
First Normal Form (1NF)
ProducerID ProducerName Address Day1Qty Day1Value Day2Qty Day2Value Day3Qty Day3Value
1 JOSEPH V.V KALPETTA 1.2 15.25 1.9 22.5
2 VELIYAN.V MEPPADI 2.4 36.3 2.9 39.5 3.5 49.5
3 JOHN.P.J KALPETTA 5.4 68.5
4 POULOSE. MM BATHERY 6.4 79.8 7.1 89.9 6.5 78.5
5 JOSEPH.E.S PULPALLY . 2.9 34.35
Before
After
ProducerID ProducerName Address
1 JOSEPH V.V KALPETTA
2 VELIYAN.V MEPPADI
3 JOHN.P.J KALPETTA
4 POULOSE. M M BATHERY
5 JOSEPH.E.S PULPALLY
ProducerID Day Qty Value
1 1 1.2 15.25
1 3 1.9 22.5
2 1 2.4 36.3
2 2 2.9 39.5
2 3 3.5 49.5
3 3 5.4 68.5
4 1 6.4 79.8
4 2 7.1 89.9
4 3 6.5 78.5
5 2 2.9 34.35
PRODUCERS
PROCUREMENT
PRODUCERS_PROCUREMENT
46. NIC Wayanad 46
Second Normal Form (2NF)
Move repeating fields into a new table that contains a primary key
and relate it back to the old table using a foreign key
PRODUCERS
•The table must be in 1NF
•Creates many-to-one relationship,
separating static from dynamic information
ProducerID ProducerName Place
1 JOSEPH V.V KALPETTA
2 VELIYAN.V MEPPADI
3 JOHN.P.J KALPETA
4 POULOSE. M M BATHERY
5 JOSEPH.E.S PULPALLY
47. NIC Wayanad 47
Second Normal Form (2NF)
ProducerID Day Qty Value
1 1 1.2 15.25
1 3 1.9 22.5
2 1 2.4 36.3
2 2 2.9 39.5
2 3 3.5 49.5
3 3 5.4 68.5
4 1 6.4 79.8
4 2 7.1 89.9
4 3 6.5 78.5
5 2 2.9 34.35
PlaceID Place
1 MEPPADI
2 VYTHIRI
3 BATHERY
4 KALPETTA
5 PULPALLY
ProducerID ProducerName Placeid
1 JOSEPH V.V 4
2 VELIYAN.V 1
3 JOHN.P.J 4
4 POULOSE. M M 3
5 JOSEPH.E.S 5
ProducerID ProducerNamePlace
1 JOSEPH V.V KALPETTA
2 VELIYAN.V MEPPADI
3 JOHN.P.J KALPETTA
4 POULOSE. M MBATHERY
5 JOSEPH.E.S PULPALLY
Before
After
ProducerID Day Qty Value
1 1 1.2 15.25
1 3 1.9 22.5
2 1 2.4 36.3
2 2 2.9 39.5
2 3 3.5 49.5
3 3 5.4 68.5
4 1 6.4 79.8
4 2 7.1 89.9
4 3 6.5 78.5
5 2 2.9 34.35
48. NIC Wayanad 48
Third Normal form (3NF)
PRODUCERS
DEPOT
DepotID Name
1 OFFICE
2 VADUVANA
3 ANDOOR
4 PAMBALA
5 KADALMADU
6 MUNNOORE
ProducerID ProducerName DepotID
1 JOSEPH V.V 1
2 VELIYAN.V 3
3 JOHN.P.J 2
4 POULOSE. M M 2
5 JOSEPH.E.S 2
6 ACHANKUNHU N G 1
7 VARKY.M.M 1
8 MATHAI.M.M 5
9 APPACHAN.P.V 5
10 ISSAC.M.M 1
11 RAJU.P.T 2
Before
After
ProducerIDProducerName
1 JOSEPH V.V
2 VELIYAN.V
3 JOHN.P.J
4 POULOSE. M M
5 JOSEPH.E.S
6 ACHANKUNHU N G
DepotID Name
1 OFFICE
2 VADUVANA
3 ANDOOR
4 PAMBALA
5 KADALMADU
6 MUNNOORE
DEPOTPRODUCERS
ProducerID DepotID
1 2
2 3
3 1
4 1
5 4
6 1
7 2
PROD_DEPOT
49. NIC Wayanad 49
Why Denormalization.,,,
Higher degrees on normalization….
involve more tables
need for a larger number of joins
can reduce performance
50. NIC Wayanad 50
Database transaction
is a unit of interaction with a DBMS
is a series of database operations which either
all occur, or all do not occur (Atomic)
are also called Logical Units of Work.
a database system will guarantee the
properties of ACID for each transaction.
51. NIC Wayanad 51
ACID
Atomicity:
Either all the tasks in a transaction
must be done, or none of them.
The transaction must be completed, or
else it must be undone (rolled back).
Consistency:
Every transaction must preserve the
integrity constraints — the declared
consistency rules — of the database.
52. NIC Wayanad 52
ACID
Isolation:
Two simultaneous transactions cannot
interfere with one another.
Intermediate results within a
transaction are not visible to other
transactions.
Durability:
Completed transactions cannot be
aborted later or their results discarded.
53. NIC Wayanad 53
Operating system support
RDBMS
Windows
Mac OS
X
Linux BSD UNIX
4th Dimension Yes Yes No No No
Adabas Yes No Yes No Yes
Adaptive Server
Enterprise Yes Yes Yes Yes Yes
Apache Derby 2
Yes Yes Yes Yes Yes
DB2 Yes No Yes No Yes
Firebird Yes Yes Yes Yes Yes
HSQLDB 2
Yes Yes Yes Yes Yes
H2 2
Yes Yes Yes Yes Yes
Informix Yes Yes Yes Yes Yes
Ingres Yes No Yes Yes Yes
InterBase
Yes No Yes No
Yes
(Solaris)
MaxDB Yes No Yes No Yes
Microsoft SQL Server Yes No No No No
MonetDB Yes Yes Yes No Yes
MySQL Yes Yes Yes Yes Yes
Oracle Yes Yes Yes No Yes
OpenEdge Yes No Yes No Yes
OpenLink Virtuoso Yes Yes Yes Yes Yes
PostgreSQL Yes Yes Yes Yes Yes
Pyrrho DBMS
Yes
(.NET) No
Yes
(Mono) No No
SmallSQL 2
Yes Yes Yes Yes Yes
SQL Anywhere Yes Yes Yes No Yes
SQLite Yes Yes Yes Yes Yes
Teradata Yes No Yes No Yes
Valentina Yes Yes Yes No No
54. NIC Wayanad 54
To Be Discussed
SQL in detail…
Security
User Accounts
Backup / replication
Data warehousing
Data mining