The document discusses database management systems and database concepts. It defines what a database is and reasons for using databases. It covers different data models including the relational, object-oriented relational, and semi-structured models. It also discusses defining database schemas in SQL, various relational operations like selection and projection, and different types of joins. Finally, it covers topics related to database normalization including anomalies that can occur without normalization and the first normal form.
As part of the GSP’s capacity development and improvement programme, FAO/GSP have organised a one week training in Izmir, Turkey. The main goal of the training was to increase the capacity of Turkey on digital soil mapping, new approaches on data collection, data processing and modelling of soil organic carbon. This 5 day training is titled ‘’Training on Digital Soil Organic Carbon Mapping’’ was held in IARTC - International Agricultural Research and Education Center in Menemen, Izmir on 20-25 August, 2017.
For more classes visit
www.snaptutorial.com
1. (TCO 1) Most DBMS are referred to as _____________database management systems. (Points : 4)
elemental
linked
hierarchical
relational
2. (TCO 1) A relational DBMS provides protection of the _______________________ through security, control, and recovery facilities. (Points : 4)
user
network
system
database
3. (TCO 2) If a foreign key contains either matching values or nulls, the table(s) that make use of such a foreign key is/are said to exhibit __________ integrity. (Points : 4)
For more course tutorials visit
uophelp.com is now newtonhelp.com
www.newtonhelp.com
For what reason do commentators need to think about the internal controls of the affiliation? What are some key segments of inside control? Which are the most fundamental? In what way will the overseer need to modify the survey program if the inside controls are viewed as inadequate to help organization articulations?
Synthesized report on the comparison of lut and splitting method for decrypti...eSAT Journals
Abstract Any encryption or decryption method will have certain key based on which the encoding and decoding will be performed. This is done to avoid access of data by unauthorized personal. Without the decoding key, encoded data is junk. Similarly, Federal Information Processing Standard (FIPS) developed Advanced Encryption Standard, which was used for saving digital data especially in magnetic tape like debit cards and credit cards, so that it provides security for the details and also this can be used in security of PDA’s which need to work very efficiently with high speed encoding and decoding and also need to consume less area as possible. It can be built using purely hardware or purely software i.e. using programming language such as Verilog. Decryption and Encryption has main part, Mix Columns and Inverse Mix columns, on which the whole AES operation depends. Here synthesis is performed for the decryption unit of the AES, which can be performed in two methods i.e. Look-up Table and Splitting method. Comparison of two methods is done by synthesizing the program in Spartan -3E of Xilinx ISE 14.1 Suite. Keywords: Encryption, Decryption, FIPS, Mix Columns, Inverse Mix Columns.
What’s an insight? Find out how you can consume and combine external data with your Dynamics CRM data to drive new opportunities and importantly insights.
As part of the GSP’s capacity development and improvement programme, FAO/GSP have organised a one week training in Izmir, Turkey. The main goal of the training was to increase the capacity of Turkey on digital soil mapping, new approaches on data collection, data processing and modelling of soil organic carbon. This 5 day training is titled ‘’Training on Digital Soil Organic Carbon Mapping’’ was held in IARTC - International Agricultural Research and Education Center in Menemen, Izmir on 20-25 August, 2017.
For more classes visit
www.snaptutorial.com
1. (TCO 1) Most DBMS are referred to as _____________database management systems. (Points : 4)
elemental
linked
hierarchical
relational
2. (TCO 1) A relational DBMS provides protection of the _______________________ through security, control, and recovery facilities. (Points : 4)
user
network
system
database
3. (TCO 2) If a foreign key contains either matching values or nulls, the table(s) that make use of such a foreign key is/are said to exhibit __________ integrity. (Points : 4)
For more course tutorials visit
uophelp.com is now newtonhelp.com
www.newtonhelp.com
For what reason do commentators need to think about the internal controls of the affiliation? What are some key segments of inside control? Which are the most fundamental? In what way will the overseer need to modify the survey program if the inside controls are viewed as inadequate to help organization articulations?
Synthesized report on the comparison of lut and splitting method for decrypti...eSAT Journals
Abstract Any encryption or decryption method will have certain key based on which the encoding and decoding will be performed. This is done to avoid access of data by unauthorized personal. Without the decoding key, encoded data is junk. Similarly, Federal Information Processing Standard (FIPS) developed Advanced Encryption Standard, which was used for saving digital data especially in magnetic tape like debit cards and credit cards, so that it provides security for the details and also this can be used in security of PDA’s which need to work very efficiently with high speed encoding and decoding and also need to consume less area as possible. It can be built using purely hardware or purely software i.e. using programming language such as Verilog. Decryption and Encryption has main part, Mix Columns and Inverse Mix columns, on which the whole AES operation depends. Here synthesis is performed for the decryption unit of the AES, which can be performed in two methods i.e. Look-up Table and Splitting method. Comparison of two methods is done by synthesizing the program in Spartan -3E of Xilinx ISE 14.1 Suite. Keywords: Encryption, Decryption, FIPS, Mix Columns, Inverse Mix Columns.
What’s an insight? Find out how you can consume and combine external data with your Dynamics CRM data to drive new opportunities and importantly insights.
Showcasing the new Tablet Client, we look at the Dynamics NAV 2015 release as well as Microsoft’s development plans for the product. The session also includes real-world insight into how business solutions are moving to the cloud and comprise a seamless coupling of Dynamics NAV, Dynamics CRM and Office 365.
Dynamics Day 2016: getting real insight into your business with Power BIIntergen
JUCY’s Tristin King shares JUCY’s BI journey and the associated business benefits – from project to implementation, lessons learned and wins along the way…
What will your organisation’s future look like? Chris Auld takes a look at four emerging technology groups – Augmented Reality/Virtual Reality, prebuilt machine learning models, Blockchain technology and the Internet of Things – and shows how these are transforming the world of business.
Dynamics Day 2016: CRM Field Service and Project ServiceIntergen
Steven Foster and Microsoft’s Scott Smedley look at how Field Service and Dynamics Portals can change the way you serve your customers, ensuring you provide an intelligent and data-driven engagement that empowers employees and customers.
Dynamics Day 2016: Microsoft Dynamics 365 first lookIntergen
James Page and Steven Foster give the first Australasian public viewing of Microsoft’s new business platform as a service, Dynamics 365, and explore the foundations underpinning future Digital Transformation success.
The Top Skills That Can Get You Hired in 2017LinkedIn
We analyzed all the recruiting activity on LinkedIn this year and identified the Top Skills employers seek. Starting Oct 24, learn these skills and much more for free during the Week of Learning.
#AlwaysBeLearning https://learning.linkedin.com/week-of-learning
Find Top SQL Developers today. Toptal can match you with the best engineers to finish your project. Or, match you with the best companies that need your SQL skills today!
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
2. What is DB
Definition of Database
A collection of information organized to afford
efficient retrieval.
** not necessary to RDB **
3. Why do we need DB?
1. Sharing = support concurrent access by multiple
users(read and write)
2. Data Model Enforcement = make sure all apps see
clean and organized data.
3. Scale = work with dataset too large to fit in
memory
4. Flexibility = use data in new and unanticipated
5. Database Model
Kinds of Database model
1. Relational data model
2. Object oriented relational data model
3. Semi-structured data model
6. Relational data model
Excel like i.e. working with tables
Has operations
Union, intersection, difference, selection, projection,
products, join, renaming
Perso
n
ID
Last
Name
First
Name
Date
Of
Birth
Hom
e
addr
Street
Hom
e
addr
City
Hom
e
Addr
zip
Hom
e
Addr
state
Work
Addr
street
Work
Addr
City
Work
Addr
Zip
Work
Addr
State
1 Yama
da
taro 4/15 aaa bbb 111 CA eee fff 222 CA
7. Object Oriented Relational Data Model
Similar to Relational database
Added: object, classes, and inheritance directly
support DB-schema and query language
OBJ: Person
Last Name
First Name
Date of Birth
Home Address
Work Address
OBJ: Address
Street
City
Zip
State
Refer
8. Object Oriented Relational Data Model
OBJ: Person
Last Name
First Name
Date of Birth
Home Address
Work Address
OBJ: Address
Street
City
Zip
State
Refer
Instance :Home Address
aaa
bbb
111
CA
Instance: Person
yamada
taro
4/15
Home
Work
Instance: Work Address
ccc
ddd
222
CA
9. Semi Structured Data Model
Data are Represented by Graph or Tree
To implement use XML
Movies
title
Genre
dram
a
Lengt
h
281
Year
1939
title
Year
1977
Lengt
h
124
Genre
scifi
Gone with the wind Star Wars
10. XML representation
<Movies>
<movie title =Gone with the wind>
<year>1939</year>
<Length>281</length>
<genre>drama</genre>
</movie >
<movie title =star wars>
<year>1992</year>
<Length>124</length>
<genre>scifi</genre>
</movie >
</Movies>
11. Other Data Model
Hierarchical model
Can be used to taxonomy(分類学)
☆Has parent ID
as meta data
Pictorial Representation
Relational Representation
12. Other Data Model
Network model: differs from Relational model in
that data are represented by:
Collection of Recodes
Among data represented by link
Schema
Customer Account
14. DATATYPE-letters-
Character string
Char(n): fixed length of char are stored. If you
KNOW number of chars will be stored, then use this.
VARCHAR(N):upto n chars will be stored. If you
do NOT know number of chars will be stored then
use this.
Bit string
BIT(n): like char(n) fixed length of bit chars
BIT VARYING(n):like varchar(n) upto n bit chars
15. Data types-math-
BOOLEAN = {True , False}
INTEGER
SHORTINT: range is shorter then integer
FLOAT
DOUBLE
DECIMAL(n, d): customized real number;
NUMERIC(n, d): same as DECIMAL
16. Data type-time-
DATE: formed by 'yyyy-mm-dd’
TIME: formed by 'HH:mm:ss' or 'HH:mm:ss.d’
Where d is a fraction of sec
TIMESTAMP: formed by 'yyyy-mm-dd HH:mm:ss'
17. CreatingTables
Syntax in SQL:
In general
Create table_name(
Attribute1 data_type PRIMARY KEY
Attribute2 data_type DEFAULT value
Attribute3 data_type…….);
In Example
Create Movie(
title varchar(50) PRIMARY KEY
year int DEFAULT 0000
length int);
reserved word = blue
Set initial value to 0000
Set title to be unique
key
20. Union
Basic Rules of Union
# of columns and order of columns MUST be SAME
Data type of columns on involving tables in each
query MUST be SAME or compatible
Returned columns are usually from the first table
Title
varchar()
Year
Int
Length
Int
Title
varchar()
Year
Int
Length
Int
U
Title
varchar()
Year
Time
Length
Int
Title
varchar()
Year
Int
Length
Int
21. Syntax
In general
SELECT attribute1, attribute2
FROM Table1
UNION
SELECTattribute1, attribute2
FROM Table2
In example
SELECT prod_code, prod_name
FROM Product
UNION
SELECT prod_code,prod_name
FROM Parches
22. Example—table—
PUR_
#
PROD_CODE PROD_NAME COM_NAME PUR_QTY PUR_AMOUNT
2 PR001 TV SONY 15 450000
1 PR003 iPod PHILIPS 20 60000
3 PR007 laptop HP 6 240000
4 PR005 mobile NOKIA 100 300000
5 PR002 DVD player LG 10 30000
6 PR006 Sound system CREATIVE 8 40000
PROD_CODE PROD_NAME COM_NAME LIFE
PR001 TV SONY 7
PR002 DVD player LG 9
PR003 iPod PHILIPS 9
PR004 Sound system CREATIVE 8
PR005 mobile NOKIA 6
UNION
Products:
Purchase:
24. Union with different columns name
SELECT prod_code,prod_name,life
FROM product
WHERE life>6
UNION
SELECT prod_code,prod_name,pur_qty
FROM purchase
WHERE pur_qty<20
PROD_CODE PROD_NAME COM_NAME LIFE(int)
PUR_# PROD_CODE PROD_NAME COM_NAME PUR_QT
Y
(int)
PUR_AMOUNT
the two queries have been set
using two different criteria(life and
PUR_QTY) and different columns.
BUT NOTE both criteria have
INTEGER VALUE
25. Union with different columns name
PROD_CODE PROD_NAME LIFE
PR001 TV 7
PR001 TV 15
PR002 DVD player 9
PR002 DVD player 10
PR003 iPod 9
PR004 Sound system 8
PR006 Sound system 8
PR007 laptop 6
Orange values come from
PRODUCT.LIFE
Blue values come from
PURCHASE.PUR_QTR
BE CAREFUL
IN Most of cases,
This is unwelcomed
result
28. Selection
C is a condition (as in if-statement) that refers to
attributes of R2
R1 is all those tuples of R2 that satisfy C
SQL form
SELECT * FROM R2 WHERE C
29. Selection
Bar Beer Price
Joe’s Bud 2.50
Joe’s Miller 2.75
Sue’s Mud 2.50
Sue’s Miller 3.00
R2:
Bar Beer Price
Joe’s Bud 2.50
Joe’s Miller 2.75
R1:
C: BAR = Joe’s
30. Projection
R1 is constructed by looking at each tuples of R2
extracting the attributes on list L, in the order
specified and creating from those components a
tuples for R1
Eliminate Duplicated tuples if any
SQL form
SELECT L FROM R2
31. Projection
Bar Beer Price
Joe’s Bud 2.50
Joe’s Miller 2.75
Sue’s Bud 2.50
Sue’s Miller 3.00
R2:
Beer Price
Bud 2.50
Miller 2.75
Bud 2.50
Miller 3.00
Beer Price
Bud 2.50
Miller 2.75
Miller 3.00
Delete duplicate
33. CROSS PRODUCT
Consider ALL possible combinations of two or more
tables.
# of row inTable1
= x
# of row inTable2
= y
# of rows in Result tables
x * y
34.
35. Syntax
In general
SELECT T1.A1, T1.A2, T2.A1, T2.A2….
FROM T1
CROSS JOIN T2
In example
SELECT Eats.pizza, Eats.name, Person.age,
Person.gender, Person.name
FROM Eats
CROSS JOIN Person
Eats has 9 rows and Person has 20
results 9 * 20 = 180 rows
36. EQUI-JOIN
Equi join performs a join against equality or
matching column’s value of the associated tables
An equal sign(=) is used as comparison operator in
the WHERE clause to refer equality.
Select * from t1, t2 where t1.attr1 = t2.attr2
Also perform equi-join by using JOIN followed by
ON and then specifying names of the columns along
with their associated tables to check equality
37. EQUI-JOINID Attribute1
2 A2
5 A5
3 A3
1 -----
4 A4
ID Attribute2
5 B5
1 B1
3 -----
6 B6
2 B2
5 C4
T1: T2:
ID Attribute1 ID Attribute2
1 ----- 1 B1
2 A2 2 B2
3 A3 3 -----
5 A5 5 B5
5 A5 5 C4
SELECT *
FROM T1
JOIN T2
ON T1.ID = T2.ID
SELECT *
FROM T1 ,T2
WHERE T1.ID = T2.ID
NOTE
One of IDs is NOT
eliminated
ID 5 in T1 is matched
to two of ID 5 in T2.
So, ID 5 in T1 is
duplicated
38. Natural Join
Natural Join is a type of EQUI-JOIN
It is structured such a way that columns with same
name of associated table will appear only once
No duplicated columns name
Guidelines
The associated table have one or more pairs of
identically named columns
The columns MUST be the same data type
Do not use ON clause in a natural join
39. Natural-JOINID Attribute1
2 A2
5 A5
3 A3
1 -----
4 A4
ID Attribute2
5 B5
1 B1
3 -----
6 B6
2 B2
5 C4
T1: T2:
ID Attribute1 Attribute2
1 ----- B1
2 A2 B2
3 A3 -----
5 A5 B5
5 A5 C4
SELECT *
FROM T1 ,T2
WHERE T1.ID = T2.ID
NOTE
One of IDs IS
eliminated
SELECT *
FROM T1
NATURAL JOIN
T2;
40. Theta-Join
Theta join allows for arbitrary comparison relation
Such as {<=, =>, <,>,= , !=}
Relational Algebra Notation
where C = any Boolean-valued condition
Take R1 × R2 then apply Projection with condition
C
41. Theta Join
Bar Beer Price
Joe’s Bud 2.50
Joe’s Miller 2.75
Sue’s Mud 2.50
Sue’s Coors 3.00
Name ADDR
Joe’s Maple St
Sue’s River St
R1: R2:
Bar Beer Price Name ADDR
Joe’s Bud 2.50 Joe’s Maple St
Joe’s Miller 2.75 Joe’s Maple St
Sue’s Mud 2.50 Sue’s River St
Sue’s Coors 3.00 Sue’s River St
C:
R1.Bar = R2.Name
45. No normalization
Problems without normalization
Anomaly (矛盾/不調和) can happen:
Update anomaly
Insertion anomaly
Deletion anomaly
Solution normalization!
We need to data normalization to reduce anomalies
46. Update anomaly
Update anomaly is a data inconsistency that result
from data redundancy and a partial update.
47. Update anomaly
EmployeeID Name Department Student group
123 J. Longfellow Accounting Beta Alpha Psi
234 B. Rech Marketing Marketing Club
234 B. Rech Marketing Marketing Manage
Club
456 A.Bruchs CIS Technology Org
456 A.Bruchs CIS Beta Alpha Psi
What happen if you update like below?
UPDATE Employee
SET department = “ECON”
WHERE StudentGroup = “technology Org”
Table: employee
48. Update anomaly
EmployeeID Name Department Student group
123 J. Longfellow Accounting Beta Alpha Psi
234 B. Rech Marketing Marketing Club
234 B. Rech Marketing Marketing Manage
Club
456 A.Bruchs ECON Technology Org
456 A.Bruchs CIS Beta Alpha Psi
When A.Bruchs’s department has been updated,say CIS to ECON ,
Then 5th row’ s department has to be updated too.
Otherwise, data can not be consistent
Can not be the
same person
any more !!!
49. Another Update Anomaly
S_id S_name S_address Suj_opted
401 Adam Noida Bio
402 Alex Panipat Math
403 Stuart Jammu Math
404 Adam Noida Physic
Update student’s address
that appears >= 2
We need to check ALL
ROWS for the update.
If this is not updated,
Adam lives two
different place
inconsistency
51. Insertion Anomaly
This company hires Roy who has not decided student_group yet
Insert into Employee (EmployeeID, Name, Department, StudentGroup)
values(125, “Roy”, “Math”, ) ERROR
Need to have smaller table that only controls employees, not employees
AND their student group, department, etc.
EmployeeID Name Department Student group
123 J. Longfellow Accounting Beta Alpha Psi
234 B. Rech Marketing Marketing Club
234 B. Rech Marketing Marketing Manage
Club
456 A.Bruchs CIS Technology Org
456 A.Bruchs CIS Beta Alpha Psi
53. Deletion anomaly
EmployeeID Name Department Student group
123 J. Longfellow Accounting Beta Alpha Psi
234 B. Rech Marketing Marketing Club
234 B. Rech Marketing Marketing Manage
Club
456 A.Bruchs CIS Technology Org
456 A.Bruchs CIS Beta Alpha Psi
What happen if you execute:
delete from Employee
where StudentGroup = “Beta Alpha Psi”
54. Deletion Anomaly
J.Longfellow no longer exists (as data)!!!
EmployeeID Name Department Student group
123 J. Longfellow Accounting Beta Alpha Psi
234 B. Rech Marketing Marketing Club
234 B. Rech Marketing Marketing Manage
Club
456 A.Bruchs CIS Technology Org
456 A.Bruchs CIS Beta Alpha Psi
55. Functional Dependencies
Trivial functional dependency
Partially functional dependency
A B C
B determines B == knowing B, can find B
A B C
B determines C == knowing B, can find C
56. Functional Dependencies
Fully functional dependency
Transitive dependency
A B C
A determines B AND C == knowing A, can find every non-key attributes
A B C
A determines B and B determines C
57. First Normalization Form
Definition of 1NF
Relation is in 1nf if it satisfy following condition:
No two rows of data must contain repeating group
of information
I.e. Each set of column must have an atomic value,
such that multiple columns cannot be used to fetch
the same row
58. 2nd normalization form
Definition: A relation is in 2nd nf if it satisfies following
condition:
It is in 1st NF
All non-key attributes are fully-functional dependency on
the primary key.
Primary key has to be able to determine all other
attributes.
A functional dependency that holds in a relation is partial
when removing one of the determining attributes gives a
functional dependency that holds in the relation.
If {A,B} {C} but also {A} {C} then {C} is partially
functionally dependent on {A,B}
☆Can contain transitive functionality
59. 3rd Normalization Form
A relation is in 3rd NF if it satisfies the following
condition:
It is in 2nd NF
There is no transitive dependency
Transitive dependency
A B C
relation
A determines B
B = f(A)
B determines C
C = h(B)
Transitive: C =h(f(A))
f h
60. BCNF
Determinant: is any attribute(simple or composite) on which
some other attribute is fully functional dependent.
BCNF definition:
A relation R is in BCNF if and only if every determinant is
candidate key
Note -- 3rd NF does not deal with:
A relation has multiple candidate key
Those candidate keys are composite
The candidate keys overlap
BCNF is to eliminate anomaly of those cases
BCNF is to deal with
cases where 3rd
normalization can not.
61. BCNF-Example
Table = Supplies(supplier_no, supplier_name,city,zip)
Supplier_name is unique
Supplier_no and supplier_name are unique
H1 (supplier_no) = city = g1(supplier_name)
H2(supplier_no) = zip = g2(supplier_name)
H3(supplier_no) = supplier_name
G3(supplier_name) = supplier_no
62. PossibleAnomaly in BCNF
INSERT: We cannot record the city for a supplier_no
without also knowing the supplier_name
DELETE: If we delete the row for a given supplier_name,
we lose the information that the supplier_no is
associated with a given city.
UPDATE: Since supplier_name is a candidate key
(unique), there are none.
http://www2.york.psu.edu/~lxn/IST_210/normal_form_definitions.html
63. Possible solution
Decompose Supplier into to two tables.
SUPPLIER_INFO (supplier_no, city, zip)
SUPPLIER_NAME (supplier_no, supplier_name)
65. Representation
SQL Representation
select movietitle
From(select starname, movietitle from starln) a,
(select name from moviestar where birthdate like ‘%1974%’) b
Where a.starname = b.name
Relational Algebra 3 Different
representations
shows the same
query
68. Structure of disk
Reading one data at one time b/c using magnetic current is not reliable
If failure, then it needs back to recover
Cylinder(non-physical)