Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing."— Presentation transcript:

1 Database Design Principles of database design

2 Relational Models Relational databases are designed to provide efficient structures for transaction processing zMinimize data redundancy zIdentify stable structures zProvide for flexible queries

3 Relational Databases Based on tables which represent things about which we store data yRows represent instances yColumns (attributes) are single valued properties Connections among tables are defined by common attributes

4 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.

5 Considerations in Relational Database Design z Understand the business environment and uses of data z Identify fields needed to produce required information y store data in smallest parts y avoid calculated fields z Group fields into tables z Determine each table’s primary key z Include a common field in related tables z Avoid redundancies

6 Conceptual Data Modeling zUnderstand the structure of data independent of process zDescribe the information objects of the organization and the relationships between objects zDevelop from knowledge of the organization and users

7 Entities Something 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.

8 Entities zEntity rows cannot be duplicates zEntities must have more than one instance zEntities must have more than one attribute

9 Examples of Entities zPerson - customer, zObject - item, product zEvent - sale, purchase zConcept - course, flight

10 Identifying Entities nIn the business context, entities are usually described by nouns. nThe person, or organization using the system is usually not an entity. nReports, screens and processing steps are not entities. nEntities with only one attribute are usually modeled as attributes of another entity.

11 Attributes Entities have attributes or properties that describe the characteristics of the entity. z All entity instances in an entity class have the same attributes. Attribute values will vary. z Attributes can be composites of other attributes. z 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).

12 Keys Single field or combination of several fields to identify records for retrieval and processing zPrimary key - unique identifier zSecondary key -identifier, but not necessarily unique zForeign key - primary key in another related table

13 Example of Relational Tables

14 Examples of Relational Tables

15 Identifiers Entity 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.

16 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

17 Normalization A process for identifying structural problems with relational databases to reduce processing anomalies. zTheoretically based zBottom-up (starts with attribute lists) zStep by step procedure

18 Steps in Normalization Every non-key attribute is fully functionally dependent on the primary key. No functional dependencies between non-key attributes.

19 Relation with Transitive Dependency

20 Transitive Dependency in SALES Relation

21 Removing a Transitive Dependency


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

Similar presentations


Ads by Google