exam 70-461 querying microsoft sql server...

33
Exam 70-461 Querying Microsoft SQL Server 2012 Database Development

Upload: lythuy

Post on 21-Aug-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Exam 70-461 Querying Microsoft SQL Server 2012

Database Development

Page 2: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Course ObjectivesNormalizationER DiagramDBMSSQL CommandsConstraintsData integrity rulesSubquiriesIndexesFunctionsTriggersStored Procedures

Database Development

Page 3: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Material:

Book:

Training Kit (Exam 70-461) Querying Microsoft SQL Server 2012

Days Reading:

Database Development

Page 4: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Tools:MS VISIO 2013

MS SQL SERVER 2012 or 2014 Evaluation Edition

Database Development

Page 5: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Evaluation:Oral or MCQ Test

Database Development

Page 6: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Outline:

Database Introduction

Data Modeling

Entity Relationship modeling

Normalization

Database Development

Page 7: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

General Terms

Data

Database

Database Management System

Database Development

Page 8: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

What is the ultimate purpose of a database management system?

Data Information Knowledge Action

Is to transform

Page 9: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Data Modeling

The three level of data modeling,

1. Conceptual data model

2. Logical data model

3. Physical data model

Page 10: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Abstraction Layers

• Conceptual– What data is held

• An Image and its meta-data• Entity-Relationship model (ERM)

• Logical– How data is organised in storage

• Block and Directory structure• Tables, keys

• Physical– How data is stored in bits

• JPEG as a stream of bytes• A Database as files and records stored in a DBMS-specific format

Abstraction

Realisation

(Refinement

Reification)

(Reverse Engineering)

(Engineering, Model-Driven development

Page 11: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Conceptual data model

Page 12: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Logical data model

Page 13: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Logical data model

Page 14: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Physical data model

Page 15: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Physical data model

Page 16: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Comparison

Page 17: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Conceptual Design

Page 18: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Logical Design

Page 19: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Physical Design

Page 20: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Comparison

Page 21: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

E R Diagram

Entity relationship Model

Specialized graphics

Inter-relationship between Entities

Use symbols

Page 22: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

E R Diagram (Chen Notation)

Three types of information

Boxes = Entity

Diamonds = Relationship

Oval = Attributes

Page 23: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

E R Diagram (Chen Notation)

Example:

Information about residents

Persons

City

Names

Population

Lives in

Page 24: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

E R Diagram

Page 25: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Cardinality and Existence

Page 26: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

Cardinality

1:1 --- one-to- one --- One entity of type X can be associated with, at most, one entity of type Y. One entity of type Y can be associated with, at most, one entity of type X.

An example: the relationship between car and steering wheel. A car has only one steering wheel and a steering wheel can only be installed in one car.

1:M --- one-to-many --- One entity of type X can be associated with many entities of type Y. One entity of type Y can be associated with, at most, one entity of type X.

An example: the relationship between building and rooms. A building can have many rooms but a room can be in, at most, one building.

M:M --- many-to-many --- One entity of type X can be associated with many entities of type Y. One entity of type Y can be associated with many entities of type X. An example: the

relationship between a car and its options (such as air conditioning, ABS brakes). A car can have many options and an option can be installed on many cars.

Page 27: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

E R Diagram (Crow Foot)

Page 28: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

E R Diagram (Crow Foot)

Page 29: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

E R Diagram (Crow Foot)

Page 30: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

E R Diagram (Crow Foot Example)

Page 31: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

TASK 1:

Install MS VISO 2013

Construct following ER Diagram by using chen database notations. Watch video Create an ER Diagram.

Page 32: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

TASK 2:

Watch video Data Modeling in Visio 2013.

Construct following ER Diagram by using crow foot database notations.

Page 33: Exam 70-461 Querying Microsoft SQL Server 2012mars.tekkom.dk/mediawiki/images/9/94/Databaser_1.pdf · Exam 70-461 Querying Microsoft SQL Server 2012 Database Development. Course Objectives

TASK 3:

Construct following ER Diagram by using chen database notations. Recreate the diagram into crow foot notation.