Top Banner
Database Design Principles of database design
18

Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Dec 27, 2015

Download

Documents

Justin Smith
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Database Design

Principles of database design

Page 2: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Relational Models

Relational databases are designed to provide efficient structures for transaction processing

Minimize data redundancyIdentify stable structuresProvide for flexible queries

Page 3: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Relational Databases

Based on tables which represent things about which we store data Rows represent instances Columns (attributes) are single

valued properties

Connections among tables are defined by common attributes

Page 4: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Data Modeling

Describe the data structures and relationships that are required to support the users business model. The business model is the abstract description of the rules and processes by which the organization creates value.

Page 5: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Considerations in Relational Database Design

Understand the business environment and uses of data

Identify fields needed to produce required information store data in smallest parts avoid calculated fields

Group fields into tablesDetermine each table’s primary key Include a common field in related tablesAvoid redundancies

Page 6: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Conceptual Data Modeling

Understand the structure of data independent of process

Describe the information objects of the organization and the relationships between objects

Develop from knowledge of the organization and users

Page 7: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

EntitiesSomething of importance that can be identified in the business environment.

•Similar entities are grouped in entity classes. Example - individual employees can be grouped in an entity class called EMPLOYEE.

•Individual members of an entity class are called entity instances.

Page 8: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Entities

Entity rows cannot be duplicatesEntities must have more than one

instanceEntities must have more than one

attribute

Page 9: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Examples of Entities

Person - customer, Object - item, productEvent - sale, purchaseConcept - course, flight

Page 10: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Identifying Entities

In the business context, entities are usually described by nouns.

The person, or organization using the system is usually not an entity.

Reports, screens and processing steps are not entities.

Entities with only one attribute are usually modeled as attributes of another entity.

Page 11: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Attributes

Entities have attributes or properties that describe the characteristics of the entity.

All entity instances in an entity class have the same attributes. Attribute values will vary.

Attributes can be composites of other attributes.The type of data described by the attribute is the

same for all entity instances. The value can change but must be the same type (numbers, date, etc).

Page 12: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Keys

Single field or combination of several fields to identify records for retrieval and processing

Primary key - unique identifierSecondary key -identifier, but

not necessarily uniqueForeign key - primary key in

another related table

Page 13: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Example of Relational Tables

Page 14: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Examples of Relational Tables

Page 15: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

IdentifiersEntity instances have some name or identification string to identify them within the context of the environment. This name or string is an identifier.

Unique identifiers identify a single entity instance.

Non-unique identifiers can identify sets of instances.

Page 16: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

A relationship is a connection or association between entity instances in different entity classes.It specifies what row connects with what row in associated tables.

Relationships

Page 17: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Normalization

A process for identifying structural problems with relational databases to reduce processing anomalies.

Theoretically basedBottom-up (starts with attribute

lists)Step by step procedure

Page 18: Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.

Steps in Normalization

Every non-key attribute is fully functionally dependent on the primary key.

No functional dependencies between non-key attributes.