SlideShare uma empresa Scribd logo
1 de 32
Database Engineering
Xbox Part One

Christoph Becher aka The Cup
www.cupworks.net
Agenda
• About Mii
• Theory of databases

• Relational databases
• Relationships
• ERM/ERD
• Normalization
About Mii
I know… the picture is my Live Avatar… because he is simply
beautiful 
About Mii
Health

Developer Level 38

Mana

Strength:
Agility:
Intelligence:
Willpower:
Vitality:
•
•
•
•
•
•
•

3745
5467
56
89
423
345
212

25 years
past Bigpoint, currently InnoGames
studied at Games Academy
worked many years as freelancer
lecturer for game development
focused on high level architecture for
frontend and backend
aka Ezio Auditore da Firenze
Theory of databases
preparation is everything
Theory of databases
A database is an organized collection of data
• 1960s - navigational DBMS
• 1970s - relational DBMS
• late 1970s - SQL DBMS
• 1980s - desktop DBMS and object-oriented DBMS
• 2000s - NoSQL & NewSQL DBMS
• DBMSs (database management systems): software that interacts
with the user, other applications, and the database itself to
capture and analyze data
• different kinds of data models
Theory of databases
Common logical data models for databases include:
• Hierarchical database model
• Network model
• Relational model
• Entity–relationship model
• Enhanced entity–relationship model
• Object model
• Document model
• Entity–attribute–value model
• Star schema
Theory of databases
Physical data models include:
• Inverted index
• Flat file
Other models include:
• Associative model
• Multidimensional model
• Multivalue model
• Semantic model
• XML database
• Named graph
Relational databases
it's getting serious
Relational databases
• a relational database is a database that has a collection of tables
of data items
• all of which are formally described and organized according to
the relational model
• tables may have additionally defined relationships with each
other
• each table scheme must identify a column or group of columns
called primary key
• a relationship can then be established between each row in the
table and a row in another table by creating a foreign key
• relational model offers various levels of refinement of table
organization and reorganization called database normalization
Relationships
it’s complicated
Relationships
• relationships between tables have quantities, called cardinalities
• this shows how many entities of an entity type can or have to
stand in relation with exactly one entity of the other entity type
involved in the relationship type (and the other way around)
• to display cardinality there are different notation forms (we use
Chen)
• types of cardinalities
•

1:1

•

1:n

•

n:m
Relationships
•

1:1
•
•

•

1:n
•
•

•

in a 1:1 relationship there is exactly one entity assigned to exactly one
other entity
the primary key of one of the two tables is used as foreign key of the
other table in an additional column
an entity on one side of the relationship (master) is confronted by none,
one or more than one entities on the other side (detail)
the detail table gets an additional column, that receives the primary key
of the master table as foreign key

n:m
•
•

there can be any amount of entities in relationships with each other.
an additional table is generated for implementation, that contains the
primary keys of both tables as foreign keys
ERM/ERD
Emergency Room?
ERM/ERD
• Entity Relationship Model/Diagram
• part of software engineering (SE)
• abstract way of describing a database
• three levels of models
•

Conceptual data model

•

Logical data model

•

Physical data model

• the first stage of information system design uses these models
during the requirements analysis
• different notations (part of UML, we use Chen)
• Tools: MySQL Workbench and Open ModelSphere
ERM/ERD
attribute

Chen notation

attribute

attribute

attribute

attribute

attribute

entity

n

m

relation

attribute

attribute

entity
ERM/ERD
Chen proposed the following "rules of thumb" for mapping
natural language descriptions into ER diagrams
English grammar structure

ER structure

Common noun

Entity type

Proper noun

Entity

Transitive verb

Relationship type

Intransitive verb

Attribute type

Adjective

Attribute for entity

Adverb

Attribute for relationship
Normalization
be normal in this crazy world
Normalization
• Normalization
• is a process of organizing fields and tables of a relation database
• minimizes redundancy and dependency
• usually involves dividing large tables into smaller tables and
defining relationships between them
• selective denormalization can be performed for performance
reasons
• Edgar F. Codd, the inventor of the relational model introduced
the concept of normalization and the first normal form
• currently there are nine normal forms (first three are interesting
for us)
Normalization

first normal form
A relation is in first normal form if the domain of each
attribute contains only atomic values, and the value of each
attribute contains only a single value from that domain.
Normalization

street

city

address

number

code
Normalization

second normal form
No non-prime attribute in the table is functionally dependent
on a proper subset of any candidate key.
Normalization
id

name

track

title

2001

1

Baby Please Don't Go

2001

High Voltage

2

She's Got Balls

2002

id

High Voltage

T.N.T.

1

It's a Long Way to the Top

name

2001

High Voltage

2002

T.N.T.

cd_id

track

title

2001

1

Baby Please Don't Go

2001

2

She's Got Balls

2002

1

It's a Long Way to the
Top
Normalization

third normal form
Every non-prime attribute is non-transitively dependent on
every candidate key in the table. The attributes that do not
contribute to the description of the primary key are removed
from the table. In other words, no transitive dependency is
allowed.
Normalization
id
2001

High Voltage

AC/DC

1

Baby Please Don't Go

2002

id

name

interpret

Queen

Queen

1

Keep Yourself Alive

name

track

id

title

track

title

cd_id

101

AC/DC

10

1

Baby Please Don't Go

12001

102

Queen

11

1

Keep Yourself Alive

12002

id

name

interpret_id

12001

High Voltage

101

12002

Queen

102
Normalization
Elementary Key normal Form
Every non-trivial functional dependency in the table is either
the dependency of an elementary key attribute or a
dependency on a superkey.

Boyce–Codd normal form
Every non-trivial functional dependency in the table is a
dependency on a superkey.
Normalization
Fourth normal form
Every non-trivial multivalued dependency in the table is a
dependency on a superkey.

Fifth normal form
Every non-trivial join dependency in the table is implied by
the superkeys of the table.
Normalization
Domain/key normal form
Every constraint on the table is a logical consequence of the
table's domain constraints and key constraints.

Sixth normal form
Table features no non-trivial join dependencies at all (with
reference to generalized join operator).
Wake up!
We are at the end
Questions?
Suggestions? Rumors?
Thank you
for all the fish!
&

Christoph Becher

www.CupWorks.net
@CupWorks

/CupWorks

Mais conteúdo relacionado

Mais procurados

Lecture 07 relational database management system
Lecture 07 relational database management systemLecture 07 relational database management system
Lecture 07 relational database management system
emailharmeet
 
Eer >r.model
Eer >r.modelEer >r.model
Eer >r.model
lavya3
 
Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)
welcometofacebook
 

Mais procurados (20)

DATABASE CONCEPTS AND PRACTICAL EXAMPLES
DATABASE CONCEPTS AND PRACTICAL EXAMPLESDATABASE CONCEPTS AND PRACTICAL EXAMPLES
DATABASE CONCEPTS AND PRACTICAL EXAMPLES
 
Year 11 DATA PROCESSING 1st Term
Year 11 DATA PROCESSING 1st TermYear 11 DATA PROCESSING 1st Term
Year 11 DATA PROCESSING 1st Term
 
Chapter-3 Data Modeling using ER Model
Chapter-3 Data Modeling using ER ModelChapter-3 Data Modeling using ER Model
Chapter-3 Data Modeling using ER Model
 
Learn Database Design with MySQL - Chapter 5 - Design principles & normalization
Learn Database Design with MySQL - Chapter 5 - Design principles & normalizationLearn Database Design with MySQL - Chapter 5 - Design principles & normalization
Learn Database Design with MySQL - Chapter 5 - Design principles & normalization
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1
 
Database intro
Database introDatabase intro
Database intro
 
Relational model
Relational modelRelational model
Relational model
 
Lecture 07 relational database management system
Lecture 07 relational database management systemLecture 07 relational database management system
Lecture 07 relational database management system
 
DBMS:Relational Modal
DBMS:Relational ModalDBMS:Relational Modal
DBMS:Relational Modal
 
Relational model
Relational modelRelational model
Relational model
 
Intro to relational model
Intro to relational modelIntro to relational model
Intro to relational model
 
Dbms relational data model and sql queries
Dbms relational data model and sql queries Dbms relational data model and sql queries
Dbms relational data model and sql queries
 
Relational Model - An Introduction
Relational Model - An IntroductionRelational Model - An Introduction
Relational Model - An Introduction
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Eer >r.model
Eer >r.modelEer >r.model
Eer >r.model
 
Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)
 
Relational model
Relational modelRelational model
Relational model
 
Keys presentation
Keys presentationKeys presentation
Keys presentation
 
demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
 

Semelhante a Database Engineering: Part one

relationalDatabaseModel.pptx
relationalDatabaseModel.pptxrelationalDatabaseModel.pptx
relationalDatabaseModel.pptx
NirajG3
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - Normalization
Nickkisha Farrell
 
Data and functional modeling
Data and functional modelingData and functional modeling
Data and functional modeling
Slideshare
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
Rasan Samarasinghe
 

Semelhante a Database Engineering: Part one (20)

relationalDatabaseModel.pptx
relationalDatabaseModel.pptxrelationalDatabaseModel.pptx
relationalDatabaseModel.pptx
 
DATABASE DESIGN.pptx
DATABASE DESIGN.pptxDATABASE DESIGN.pptx
DATABASE DESIGN.pptx
 
Relational databases.pdf
Relational databases.pdfRelational databases.pdf
Relational databases.pdf
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLE
 
Relational Data Model.pptx
Relational Data Model.pptxRelational Data Model.pptx
Relational Data Model.pptx
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - Normalization
 
Databases - Unit 2.pdf
Databases - Unit 2.pdfDatabases - Unit 2.pdf
Databases - Unit 2.pdf
 
Data_base.pptx
Data_base.pptxData_base.pptx
Data_base.pptx
 
Data and functional modeling
Data and functional modelingData and functional modeling
Data and functional modeling
 
RDBMS Model
RDBMS ModelRDBMS Model
RDBMS Model
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
 
Database management system
Database management systemDatabase management system
Database management system
 
overview of database concept
overview of database conceptoverview of database concept
overview of database concept
 
Advanced data modeling
Advanced data modelingAdvanced data modeling
Advanced data modeling
 
ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMS
 
Reviewing basic concepts of relational database
Reviewing basic concepts of relational databaseReviewing basic concepts of relational database
Reviewing basic concepts of relational database
 
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERAGeek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Último (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 

Database Engineering: Part one

  • 1. Database Engineering Xbox Part One Christoph Becher aka The Cup www.cupworks.net
  • 2. Agenda • About Mii • Theory of databases • Relational databases • Relationships • ERM/ERD • Normalization
  • 3. About Mii I know… the picture is my Live Avatar… because he is simply beautiful 
  • 4. About Mii Health Developer Level 38 Mana Strength: Agility: Intelligence: Willpower: Vitality: • • • • • • • 3745 5467 56 89 423 345 212 25 years past Bigpoint, currently InnoGames studied at Games Academy worked many years as freelancer lecturer for game development focused on high level architecture for frontend and backend aka Ezio Auditore da Firenze
  • 6. Theory of databases A database is an organized collection of data • 1960s - navigational DBMS • 1970s - relational DBMS • late 1970s - SQL DBMS • 1980s - desktop DBMS and object-oriented DBMS • 2000s - NoSQL & NewSQL DBMS • DBMSs (database management systems): software that interacts with the user, other applications, and the database itself to capture and analyze data • different kinds of data models
  • 7. Theory of databases Common logical data models for databases include: • Hierarchical database model • Network model • Relational model • Entity–relationship model • Enhanced entity–relationship model • Object model • Document model • Entity–attribute–value model • Star schema
  • 8. Theory of databases Physical data models include: • Inverted index • Flat file Other models include: • Associative model • Multidimensional model • Multivalue model • Semantic model • XML database • Named graph
  • 10. Relational databases • a relational database is a database that has a collection of tables of data items • all of which are formally described and organized according to the relational model • tables may have additionally defined relationships with each other • each table scheme must identify a column or group of columns called primary key • a relationship can then be established between each row in the table and a row in another table by creating a foreign key • relational model offers various levels of refinement of table organization and reorganization called database normalization
  • 12. Relationships • relationships between tables have quantities, called cardinalities • this shows how many entities of an entity type can or have to stand in relation with exactly one entity of the other entity type involved in the relationship type (and the other way around) • to display cardinality there are different notation forms (we use Chen) • types of cardinalities • 1:1 • 1:n • n:m
  • 13. Relationships • 1:1 • • • 1:n • • • in a 1:1 relationship there is exactly one entity assigned to exactly one other entity the primary key of one of the two tables is used as foreign key of the other table in an additional column an entity on one side of the relationship (master) is confronted by none, one or more than one entities on the other side (detail) the detail table gets an additional column, that receives the primary key of the master table as foreign key n:m • • there can be any amount of entities in relationships with each other. an additional table is generated for implementation, that contains the primary keys of both tables as foreign keys
  • 15. ERM/ERD • Entity Relationship Model/Diagram • part of software engineering (SE) • abstract way of describing a database • three levels of models • Conceptual data model • Logical data model • Physical data model • the first stage of information system design uses these models during the requirements analysis • different notations (part of UML, we use Chen) • Tools: MySQL Workbench and Open ModelSphere
  • 17. ERM/ERD Chen proposed the following "rules of thumb" for mapping natural language descriptions into ER diagrams English grammar structure ER structure Common noun Entity type Proper noun Entity Transitive verb Relationship type Intransitive verb Attribute type Adjective Attribute for entity Adverb Attribute for relationship
  • 18. Normalization be normal in this crazy world
  • 19. Normalization • Normalization • is a process of organizing fields and tables of a relation database • minimizes redundancy and dependency • usually involves dividing large tables into smaller tables and defining relationships between them • selective denormalization can be performed for performance reasons • Edgar F. Codd, the inventor of the relational model introduced the concept of normalization and the first normal form • currently there are nine normal forms (first three are interesting for us)
  • 20. Normalization first normal form A relation is in first normal form if the domain of each attribute contains only atomic values, and the value of each attribute contains only a single value from that domain.
  • 22. Normalization second normal form No non-prime attribute in the table is functionally dependent on a proper subset of any candidate key.
  • 23. Normalization id name track title 2001 1 Baby Please Don't Go 2001 High Voltage 2 She's Got Balls 2002 id High Voltage T.N.T. 1 It's a Long Way to the Top name 2001 High Voltage 2002 T.N.T. cd_id track title 2001 1 Baby Please Don't Go 2001 2 She's Got Balls 2002 1 It's a Long Way to the Top
  • 24. Normalization third normal form Every non-prime attribute is non-transitively dependent on every candidate key in the table. The attributes that do not contribute to the description of the primary key are removed from the table. In other words, no transitive dependency is allowed.
  • 25. Normalization id 2001 High Voltage AC/DC 1 Baby Please Don't Go 2002 id name interpret Queen Queen 1 Keep Yourself Alive name track id title track title cd_id 101 AC/DC 10 1 Baby Please Don't Go 12001 102 Queen 11 1 Keep Yourself Alive 12002 id name interpret_id 12001 High Voltage 101 12002 Queen 102
  • 26. Normalization Elementary Key normal Form Every non-trivial functional dependency in the table is either the dependency of an elementary key attribute or a dependency on a superkey. Boyce–Codd normal form Every non-trivial functional dependency in the table is a dependency on a superkey.
  • 27. Normalization Fourth normal form Every non-trivial multivalued dependency in the table is a dependency on a superkey. Fifth normal form Every non-trivial join dependency in the table is implied by the superkeys of the table.
  • 28. Normalization Domain/key normal form Every constraint on the table is a logical consequence of the table's domain constraints and key constraints. Sixth normal form Table features no non-trivial join dependencies at all (with reference to generalized join operator).
  • 29. Wake up! We are at the end
  • 31. Thank you for all the fish!