Database Design Methodology

117
Database Design Methodology

description

Database Design Methodology. Lesson 1: Introduction to Databases. Objectives. List database types (e.g., flat file, relational), and identify their uses and architectures Describe the types of database management system (DBMS), and explain the benefits and limitations of each DBMS type - PowerPoint PPT Presentation

Transcript of Database Design Methodology

Page 1: Database Design Methodology

DatabaseDesign Methodology

Page 2: Database Design Methodology

Lesson 1:Introduction to Databases

Page 3: Database Design Methodology

Objectives

• List database types (e.g., flat file, relational), and identify their uses and architectures

• Describe the types of database management system (DBMS), and explain the benefits and limitations of each DBMS type

• Analyze and select appropriate database designs, and identify the solution that addresses the application needs

Page 4: Database Design Methodology

What Isa Database?

• File-based databases– Flat-file databases

• The evolution of databases

Page 5: Database Design Methodology

Relational Databasesand DBMSs

• Relational databases

• Structured Query Language

• Database administrator

• Advantages and disadvantages of DBMSs

• Choosing the correct database type

Page 6: Database Design Methodology

The Origins ofRelational Databases

• Codd first proposed the relational data model in 1970

• System R

• Development of SQL

• INGRES

• IBM UK Scientific Center

Page 7: Database Design Methodology

Summary

List database types (e.g., flat file, relational), and identify their uses and architectures

Describe the types of database management system (DBMS), and explain the benefits and limitations of each DBMS type

Analyze and select appropriate database designs, and identify the solution that addresses the application needs

Page 8: Database Design Methodology

Lesson 2:Relational

Database Fundamentals

Page 9: Database Design Methodology

Objectives• Define common database architectures

(e.g., single, multi-tier)• Describe the function of Structured Query

Language (SQL), including language subsets

• Describe the function of Data Definition Language (DDL)

• Describe the function of Data Manipulation Language (DML)

Page 10: Database Design Methodology

Objectives (cont’d)

• Describe the function of Data Control Language (DCL)

• Define essential database concepts and terms, including relation, relation name, table, row, column, value, relational algebra, data modeling, data relationship

• Explain the concepts of attribute, degree, tuple and cardinality

Page 11: Database Design Methodology

Objectives (cont’d)

• Define entities, including strong entities, weak entities

• List characteristics of relations (e.g., column characteristics, row characteristics)

• Describe table types (e.g., base tables, virtual tables)

• Distinguish between primary and foreign keys, including null value, composite key

• Explain data models in relational databases

Page 12: Database Design Methodology

Objectives (cont’d)

• Describe common database relationships (e.g., one to one, one to many, many to many) and identify the notation for such relationships (e.g., 1:n)

• Define relational integrity concepts, including domain constraints, entity and referential integrity views

• Explain the structure and purpose of a data dictionary

Page 13: Database Design Methodology

MultitierDatabase Architecture

• Two-tier client-server architecture– Fat client

• Three-tier client-server architecture– Thin client

• n-tier architecture

Page 14: Database Design Methodology

RelationalModel Terminology

• Relational data structure

• Rows (tuples)

• Columns (attributes)

• Domains

• Degrees

• Cardinality

• Normalization

Page 15: Database Design Methodology

Using Tablesto Represent Data

• Entities

• Characteristics of relations

• Types of tables

• Primary keys

• Foreign keys

Page 16: Database Design Methodology

Data Models

• Components– Structural information– Manipulative information– Integrity information

Page 17: Database Design Methodology

Entities andData Relationships

• Entity-relationship (ER) modeling

• Strong entities

• Weak entities

Page 18: Database Design Methodology

Relational Integrity

• Domain constraints

• Entity integrity

• Referential integrity

• Views

Page 19: Database Design Methodology

Database Languages

• Data Definition Language

• Data Manipulation Language

• Data Control Language

• Data dictionaries

Page 20: Database Design Methodology

SummaryDefine common database architectures

(e.g., single, multi-tier)Describe the function of Structured Query

Language (SQL), including language subsets

Describe the function of Data Definition Language (DDL)

Describe the function of Data Manipulation Language (DML)

Page 21: Database Design Methodology

Summary (cont’d)

Describe the function of Data Control Language (DCL)

Define essential database concepts and terms, including relation, relation name, table, row, column, value, relational algebra, data modeling, data relationship

Explain the concepts of attribute, degree, tuple and cardinality

Page 22: Database Design Methodology

Summary (cont’d)

Define entities, including strong entities, weak entities

List characteristics of relations (e.g., column characteristics, row characteristics)

Describe table types (e.g., base tables, virtual tables)

Distinguish between primary and foreign keys, including null value, composite key

Explain data models in relational databases

Page 23: Database Design Methodology

Summary (cont’d)

Describe common database relationships (e.g., one to one, one to many, many to many) and identify the notation for such relationships (e.g., 1:n)

Define relational integrity concepts, including domain constraints, entity and referential integrity views

Explain the structure and purpose of a data dictionary

Page 24: Database Design Methodology

Lesson 3:Database Planning

Page 25: Database Design Methodology

Objectives• Describe the elements of a database planning

strategy (e.g., defining the scope of a database application)

• List the necessary steps for creating a database requirements document, including conducting interviews, noting project constraints, identifying the precise duties of the database, creating a database design document

Page 26: Database Design Methodology

Objectives (cont’d)

• Explain the importance of data modeling and entity relationship diagrams during the planning stage (e.g., define the concept of an entity-relationship [ER] diagram)

• Create a database prototype• Describe the purpose of database application

testing, including white-box testing, black-box testing

Page 27: Database Design Methodology

Objectives (cont’d)

• List the criteria for selecting a database management system and an application interface

• Describe database design steps, including determining the proper steps in creating entities, applying normalization, selecting a database management system (DBMS)

Page 28: Database Design Methodology

Database Design Life Cycle

• Create a database strategy• Define database

application scope• Create a database

requirements document• Design the database• Select a DBMS• Design the database

application

• Create database prototypes

• Test the database application

• Implement the database application

• Convert legacy data

• Maintain the database

Page 29: Database Design Methodology

DatabaseRequirements Document

• Conducting interviews

• Requirements document information

Page 30: Database Design Methodology

Selecting a DBMS

• Selection criteria– Data definition functionality– Physical criteria– Access criteria– Transactions– Utilities– Development tools– Miscellaneous features

Page 31: Database Design Methodology

Selecting anApplication Interface

GUI considerations– Descriptive page titles– Clear instructions– Consistent grouping of

input fields– Logically labeled fields– Consistent color use– Properly sized data

entry fields

– Logical cursor movement

– Error messages

– Clearly indicated optional fields

– Completion message

Page 32: Database Design Methodology

SummaryDescribe the elements of a database

planning strategy (e.g., defining the scope of a database application)

List the necessary steps for creating a database requirements document, including conducting interviews, noting project constraints, identifying the precise duties of the database, creating a database design document

Page 33: Database Design Methodology

Summary (cont’d)

Explain the importance of data modeling and entity relationship diagrams during the planning stage (e.g., define the concept of an entity-relationship [ER] diagram)

Create a database prototypeDescribe the purpose of database

application testing, including white-box testing, black-box testing

Page 34: Database Design Methodology

Summary (cont’d)

List the criteria for selecting a database management system and an application interface

Describe database design steps, including determining the proper steps in creating entities, applying normalization, selecting a database management system (DBMS)

Page 35: Database Design Methodology

Lesson 4:Overview of DatabaseDesign Methodology

Page 36: Database Design Methodology

Objectives

• List the steps of the conceptual design phase (e.g., identifying entities, attribute domains, relationships)

• Describe how to identify entities

• List ways to identify attributes and attribute domains for entities

Page 37: Database Design Methodology

Objectives (cont’d)

• List ways to identify candidate and primary keys for entities

• Identify and determine data relationships

• Create an entity-relationship (ER) diagram

• Analyze an entity-relationship (ER) diagram or model to determine relation types

Page 38: Database Design Methodology

Objectives (cont’d)

• Define and describe domains• Explain the results of poor database design,

and describe insertion, deletion and update anomalies in databases

• Describe database design steps, including determining the proper steps in creating entities, applying normalization, selecting a database management system (DBMS)

Page 39: Database Design Methodology

Effects ofPoor Database Design

• Insertion anomalies

• Deletion anomalies

• Update anomalies

Page 40: Database Design Methodology

DatabaseDesign Phases

• Conceptual phase

• Logical phase

• Physical phase

Page 41: Database Design Methodology

ConceptualDatabase Design

• Identifying entities• Identifying attributes and attribute domains for

entities• Identifying relationships• Identifying candidate and primary keys for entities• Creating an entity-relationship (ER) diagram• Reviewing the ER model by the user and design

team

Page 42: Database Design Methodology

Entity-Relationship Models

• Creating ER models

• Defining domains

• Common SQL data types

• Determining data relationships– Recursive relationships

Page 43: Database Design Methodology

Summary

List the steps of the conceptual design phase (e.g., identifying entities, attribute domains, relationships)

Describe how to identify entitiesList ways to identify attributes and attribute

domains for entities

Page 44: Database Design Methodology

Summary (cont’d)

List ways to identify candidate and primary keys for entities

Identify and determine data relationshipsCreate an entity-relationship (ER) diagramAnalyze an entity-relationship (ER)

diagram or model to determine relation types

Page 45: Database Design Methodology

Summary (cont’d)

Define and describe domainsExplain the results of poor database design,

and describe insertion, deletion and update anomalies in databases

Describe database design steps, including determining the proper steps in creating entities, applying normalization, selecting a database management system (DBMS)

Page 46: Database Design Methodology

Lesson 5:Normalization

Page 47: Database Design Methodology

Objectives

• Distinguish between specific normal forms, including first normal form (1NF), second normal form (2NF), third normal form (3NF), Boyce-Codd normal form (BCNF)

• Describe the normalization process

• Define and explain determinant, decomposition and functional dependency

Page 48: Database Design Methodology

Objectives (cont’d)

• Describe database design steps, including determining the proper steps in creating entities, applying normalization, selecting a database management system (DBMS)

Page 49: Database Design Methodology

What Is Normalization?

• Normal forms

• First normal form– First normal form anomalies

• Second normal form– Second normal form anomalies

• Third normal form

• Boyce-Codd normal form

Page 50: Database Design Methodology

Related Concepts

• Decomposition

• Atomic value

• Partial functional dependency

• Transitive dependency

• Denormalization

Page 51: Database Design Methodology

Summary

Distinguish between specific normal forms, including first normal form (1NF), second normal form (2NF), third normal form (3NF), Boyce-Codd normal form (BCNF)

Describe the normalization processDefine and explain determinant,

decomposition and functional dependency

Page 52: Database Design Methodology

Summary (cont’d)

Describe database design steps, including determining the proper steps in creating entities, applying normalization, selecting a database management system (DBMS)

Page 53: Database Design Methodology

Lesson 6:Logical Database Design

Page 54: Database Design Methodology

Objectives

• Explain the structure and purpose of a data dictionary

• Identify logical database design issues

• List the steps of the logical database design phase (e.g., creating a raw data model; identifying and documenting entities, attributes, relationships, domains, and candidate and primary keys)

Page 55: Database Design Methodology

Objectives (cont’d)

• Identify the cardinality of data relationships

• Identify and resolve inexpedient data relationships

• Create an integrated logical data model from a conceptual data model

• Use Data Definition Language (DDL)

Page 56: Database Design Methodology

Objectives (cont’d)

• Validate a logical data model against user operations and system requirements

• Define integrity constraints (e.g., necessary data, domain constraints, entity integrity, referential integrity)

• Create corporate and enterprise data models based on user views of data

Page 57: Database Design Methodology

Objectives (cont’d)

• Validate the enterprise data model

• Describe database design steps, including determining the proper steps in creating entities, applying normalization, selecting a database management system (DBMS)

Page 58: Database Design Methodology

LogicalDatabase Design

• Logical data models– One-to-one– One-to-many– Many-to-many

Page 59: Database Design Methodology

Creating aLogical Data Model

Data model refinement

Logical data model creation

Normalization

Logical data model creation

Data model refinement

Normalization

Page 60: Database Design Methodology

Using a DatabaseDefinition Language

• Data dictionaries

• Validating the logical data model

Page 61: Database Design Methodology

DefiningIntegrity Constraints

• Necessary data

• Domain constraints

• Entity integrity

• Referential integrity

• Enterprise constraints

Page 62: Database Design Methodology

Creating anEnterprise Data Model

• User views

• Normalization

• Validating data operations

Page 63: Database Design Methodology

Summary

Explain the structure and purpose of a data dictionary

Identify logical database design issuesList the steps of the logical database design

phase (e.g., creating a raw data model; identifying and documenting entities, attributes, relationships, domains, and candidate and primary keys)

Page 64: Database Design Methodology

Summary (cont’d)

Identify the cardinality of data relationshipsIdentify and resolve inexpedient data

relationshipsCreate an integrated logical data model

from a conceptual data modelUse Data Definition Language (DDL)

Page 65: Database Design Methodology

Summary (cont’d)

Validate a logical data model against user operations and system requirements

Define integrity constraints (e.g., necessary data, domain constraints, entity integrity, referential integrity)

Create corporate and enterprise data models based on user views of data

Page 66: Database Design Methodology

Summary (cont’d)

Validate the enterprise data modelDescribe database design steps, including

determining the proper steps in creating entities, applying normalization, selecting a database management system (DBMS)

Page 67: Database Design Methodology

Lesson 7:Physical Database Design

Page 68: Database Design Methodology

Objectives

• List the elements of physical database design

• Determine physical database design issues

• Describe how to create base relations for a target database management system (DBMS) using Data Definition Language (DDL)

Page 69: Database Design Methodology

Objectives (cont’d)

• Identify and create enterprise constraints for a target DBMS

• Define secondary indexes and determine when to use them

• Create a base relation

• Identify referential constraints

Page 70: Database Design Methodology

Objectives (cont’d)

• Explain denormalization and describe when it is necessary

• Create user views (e.g., the CREATE VIEW SQL statement)

• Design database access rules

Page 71: Database Design Methodology

Objectives (cont’d)

• Use appropriate commands to create, insert and retrieve data from a database table, including the SELECT, CREATE TABLE and CREATE VIEW statements

Page 72: Database Design Methodology

PhysicalDatabase Design

• Creating base relations for a target DBMS

• Data Definition Language

Page 73: Database Design Methodology

CreatingEnterprise Constraints

• Determining referential constraints

Page 74: Database Design Methodology

UsingSecondary Indexes

• A secondary index is a mechanism that creates an additional key for a relation

Page 75: Database Design Methodology

Denormalization

• The process of reuniting relations that were split during the normalization process to improve performance

Page 76: Database Design Methodology

CreatingUser Views

• Determine the appropriate data to be included with each particular view

Page 77: Database Design Methodology

DesigningDatabase Access Rules

• Identifiers

• Privileges– SELECT– UPDATE– DELETE

Page 78: Database Design Methodology

Summary

List the elements of physical database design

Determine physical database design issuesDescribe how to create base relations for a

target database management system (DBMS) using Data Definition Language (DDL)

Page 79: Database Design Methodology

Summary (cont’d)

Identify and create enterprise constraints for a target DBMS

Define secondary indexes and determine when to use them

Create a base relationIdentify referential constraints

Page 80: Database Design Methodology

Summary (cont’d)

Explain denormalization and describe when it is necessary

Create user views (e.g., the CREATE VIEW SQL statement)

Design database access rules

Page 81: Database Design Methodology

Summary (cont’d)

Use appropriate commands to create, insert and retrieve data from a database table, including the SELECT, CREATE TABLE and CREATE VIEW statements

Page 82: Database Design Methodology

Lesson 8:Structured Query Language

Page 83: Database Design Methodology

Objectives• Perform data manipulation• Describe basic SQL syntax• List data types used in SQL, including

SMALLINT, DECIMAL (p, q), CHAR(n) and TIMESTAMP

• Define the term schema in relation to databases

• Create a schema using the CREATE SCHEMA statement

Page 84: Database Design Methodology

Objectives (cont’d)

• Drop schemas from a database using the DROP SCHEMA statement

• Use appropriate commands to create, insert and retrieve data from a database table, including using the SELECT, CREATE TABLE and CREATE VIEW statements

• Use the INSERT command appropriately

Page 85: Database Design Methodology

Objectives (cont’d)

• Use appropriate UPDATE and DELETE statements to update or delete information from a database, including working with tuples

• Use the DISTINCT keyword

• Compose predicates and other statements using the WHERE clause

Page 86: Database Design Methodology

Objectives (cont’d)

• Identify the use and structure of Boolean operators

• Describe SQL special operators and ORDER BY clauses (e.g., the IN, BETWEEN and LIKE operators)

• Deploy the ORDER BY clause to order output by column or group of columns

Page 87: Database Design Methodology

Objectives (cont’d)

• Retrieve data from relations using the SELECT statement

• Create statements using the GRANT keyword to control user access to relations

• Use the REVOKE keyword to limit access

Page 88: Database Design Methodology

SQL Basics

• Subsets of SQL

• SQL features

• Data types

Page 89: Database Design Methodology

DataDefinition Language

• Creating a schema

• Altering and dropping relations and views

Page 90: Database Design Methodology

DataManipulation Language

• Inserting values into relations• Deleting records from relations• Updating values in relations• Retrieving data from relations• Aliases• SQL special operators and ORDER BY

clauses

Page 91: Database Design Methodology

DataControl Language

• Granting privileges

• Revoking privileges

Page 92: Database Design Methodology

SummaryPerform data manipulationDescribe basic SQL syntaxList data types used in SQL, including

SMALLINT, DECIMAL (p, q), CHAR9n) and TIMESTAMP

Define the term schema in relation to databases

Create a schema using the CREATE SCHEMA statement

Page 93: Database Design Methodology

Summary (cont’d)

Drop schemas from a database using the DROP SCHEMA statement

Use appropriate commands to create, insert and retrieve data from a database table, including using the SELECT, CREATE TABLE and CREATE VIEW statements

Use the INSERT command appropriately

Page 94: Database Design Methodology

Summary (cont’d)

Use appropriate UPDATE and DELETE statements to update or delete information from a database, including working with tuples

Use the DISTINCT keywordCompose predicates and other statements

using the WHERE clause

Page 95: Database Design Methodology

Summary (cont’d)

Identify the use and structure of Boolean operators

Describe SQL special operators and ORDER BY clauses (e.g., the IN, BETWEEN and LIKE operators)

Deploy the ORDER BY clause to order output by column or group of columns

Page 96: Database Design Methodology

Summary (cont’d)

Retrieve data from relations using the SELECT statement

Create statements using the GRANT keyword to control user access to relations

Use the REVOKE keyword to limit access

Page 97: Database Design Methodology

Lesson 9:Relational Algebra

Page 98: Database Design Methodology

Objectives

• Describe a selection operation

• Create a projection operation

• Explain and use a Cartesian product operation

• Create unions

• Define a set difference operation

Page 99: Database Design Methodology

Objectives (cont’d)

• Describe an intersection operation

• Create a theta-join

• Use a natural join

• Create an equi-join

• Create an outer join

Page 100: Database Design Methodology

DefiningRelational Algebra

• Selection

• Projection

• Cartesian product

• Union

• Difference

• Intersection

• Joins

Page 101: Database Design Methodology

Summary

Describe a selection operationCreate a projection operationExplain and use a Cartesian product

operationCreate unionsDefine a set difference operation

Page 102: Database Design Methodology

Summary (cont’d)

Describe an intersection operationCreate a theta-joinUse a natural joinCreate an equi-joinCreate an outer join

Page 103: Database Design Methodology

Lesson 10:Transactions andDatabase Security

Page 104: Database Design Methodology

Objectives

• Define the concept of a transaction, including use of the INSERT, DELETE and UPDATE operations

• Identify the two results of a transaction (commit and rollback)

• Describe the four desirable "ACID" properties (atomicity, consistency, isolation, durability)

Page 105: Database Design Methodology

Objectives (cont’d)

• Define serializability in relation to a DBMS• List concurrency control methods, including

locking and timestamps• Describe the steps involved in optimistic

concurrency control (e.g., reading, validation, writing), including knowing when and when not to use optimistic concurrency control

Page 106: Database Design Methodology

Objectives (cont’d)

• Identify issues that can occur if concurrency control is not enacted property (e.g., dirty reads, lost and uncommitted updates, unrepeatable query results)

• Identify issues and determine the scope of database security (e.g., theft, privacy, integrity control, availability)

Page 107: Database Design Methodology

Objectives (cont’d)

• List typical security threats to databases

• Describe database countermeasure and protection techniques (e.g., encryption, ways to create views)

Page 108: Database Design Methodology

Transactions

• Commit

• Rollback

• ACID properties– Atomicity– Consistency– Isolation– Durability

Page 109: Database Design Methodology

Concurrency Control

• Lost updates• Uncommitted updates• Unrepeatable query results• Serializability• Concurrency control methods

– Locking– Timestamps

• Optimistic concurrency control

Page 110: Database Design Methodology

DatabaseSecurity

• The scope of database security

• Types of security threats

• Types of protection techniques

Page 111: Database Design Methodology

Summary

Define the concept of a transaction, including use of the INSERT, DELETE and UPDATE operations

Identify the two results of a transaction (commit and rollback)

Describe the four desirable "ACID" properties (atomicity, consistency, isolation, durability)

Page 112: Database Design Methodology

Summary (cont’d)

Define serializability in relation to a DBMSList concurrency control methods, including

locking and timestampsDescribe the steps involved in optimistic

concurrency control (e.g., reading, validation, writing), including knowing when and when not to use optimistic concurrency control

Page 113: Database Design Methodology

Summary (cont’d)

Identify issues that can occur if concurrency control is not enacted property (e.g., dirty reads, lost and uncommitted updates, unrepeatable query results)

Identify issues and determine the scope of database security (e.g., theft, privacy, integrity control, availability)

Page 114: Database Design Methodology

Summary (cont’d)

List typical security threats to databasesDescribe database countermeasure and

protection techniques (e.g., encryption, ways to create views)

Page 115: Database Design Methodology

DatabaseDesign Methodology

Introduction to DatabasesRelational Database FundamentalsDatabase PlanningOverview of Database Design MethodologyNormalization

Page 116: Database Design Methodology

DatabaseDesign Methodology

Logical Database DesignPhysical Database DesignStructured Query LanguageRelational AlgebraTransactions and Database Security

Page 117: Database Design Methodology

Database Design Methodology

• For information about the CIW Database Specialist exam and certification, visit www.CIW-certified.com