Database Design and Normalization

Save this PDF as:
Size: px
Start display at page:

Download "Database Design and Normalization"

Transcription

1 Database Design and Normalization 3 CHAPTER IN THIS CHAPTER The Relational Design Theory 48

2 46 Database Design Unleashed PART I Access applications are database applications, an obvious statement that can get lost in the details of designing a dialog box or crafting the perfect form. To develop smarter, faster, more efficient database applications, you need to understand the concept of database normalization, this chapter s topic. Relational database management systems, or RDBMSes, such as Microsoft Access, implement a theory of data management and manipulation called, strangely enough, relational theory, pioneered by Dr. E.F. Codd at IBM during the 1970s. This chapter introduces you to just enough relational theory to enable you to design Access databases that take advantage of the way relational database operations work. Note Critics of Microsoft Access argue it does not conform to all of Dr. Codd s 13 rules defining a relational database and so cannot be called relational. Predictably, Access supporters argue it is fully conformant. From a practical standpoint, it behaves like relational database. You may judge for yourself whether it is truly conformant. Codd s Rules The following table lists the 13 rules Codd declared to which a database system much conform in order to be considered a true relational database management system. Rule The Foundation Principle Information Guaranteed Access Missing Information Description Any RDBMS must be able to manage databases entirely through its relational capabilities. If a database system depends on a record-by-record data manipulation tools, it is not truly relational. All data in a relational database is represented explicitly as values in tables. Data cannot be stored in any other way. Every data element must be accessible logically through the use of a combination of its primary key value, table name, and column name. Null values are supported explicitly. Nulls represent missing or inapplicable information.

3 Database Design and Normalization CHAPTER 3 47 System Catalog Comprehensive Language View Updatability Set Level Updates Physical Data Independence Logical Data Independence Integrity Independence The database description or catalog exists at the logical level as tabular values. The relational language (SQL) must be able to set the database design in the same manner in which it acts on data stored in the structure. An RDBMS must support a clearly defined data-manipulation language (SQL) that comprehensively supports data manipulation and definition, view definition, integrity constraints, transactional boundaries, and authorization. All views that can be updated by the system. In a true RDBMS, most (although not all) views would be updatable. An RDBMS must do more than just be able to retrieve data sets. It has to be capable of inserting, updating, and deleting data as a relational set. Data must be physically independent of the application program. The underlying RDBMS program or optimizer should be able to track physical changes in the data. For example, an RDBMS s application programs should not have to change when an index is added to or deleted from a table. Whenever possible, application software must be independent of changes made to the base tables. For example, no code should be rewritten when tables are combined into a view. Data integrity must be definable in a relational language and stored in the catalog. Data integrity constraints can be built into applications. However, this approach is foreign to the relational model. In the relational model, the integrity should be inherent in the database design. continues 3 DATABASE DESIGN AND NORMALIZATION

4 48 Database Design Unleashed PART I Distribution Independence Nonsubversion RDBMS capabilities will not be limited due to the distribution of its components in separate databases. If an RDBMS has a single-record-at-a-time language, that language cannot be used to bypass the integrity rules or constraints of the relational language. Thus, not only must an RDBMS be governed by relational rules, but these rules must be primary laws. The Relational Design Theory The relational design theory developed by Dr. Codd consists of the following categories: Tables and uniqueness Foreign keys and domains Relationships Data normalization Integrity rules The Benefits of Using the Relational Model Using the relational design theory, you gain the benefits of years of research into the best way to manage data. Some of the benefits you can achieve by following the relational model are Ensuring data integrity. Storing data storage efficiently. Giving your database application tremendous room for growth. Creating a database that behaves predictably because it conforms to these welltested rules. Enabling other database designers to understand your database because it follows the rules. Ensuring that database schema changes are easy to implement Improving the speed of data access. I know this ties in with efficiency; however, the mention of the word speed is important.

5 Database Design and Normalization CHAPTER 3 49 Tables and Uniqueness When you create database applications, each table represents an entity or process in the real world. Tables can represent people, events, financial transactions, and physical items such as products. Relational theory requires that all data is stored in a table consisting of unique rows and columns. The way to guarantee uniqueness for each rule is to set a primary key for each row. A primary key is a field or group of fields that uniquely identifies that row. If the primary key consists of multiple fields, it is called a composite key. The primary key must be unique that is, it must appear in one and only one row. Access allows you to designate a field as a primary key by setting it as a Key value in table design view. Access will then check to see if the data in that field is unique and does not allow duplicates. Sometimes it can be hard to come up with a unique value for each row while following the business rules in your application. For example, suppose you are creating a contact management system to track your contacts. Your initial database design might resemble the table shown in Figure 3.1. FIGURE 3.1 A table storing contact information. 3 DATABASE DESIGN AND NORMALIZATION As you develop your contact management system, you might select ContactName, Contact , or one of the ContactPhone fields as the key. Possible key fields are commonly referred to as candidate keys because, during the initial database design period, they might be used as primary keys, but the final decision has not been made. A common rule of database design is to keep the key as simple as possible and to choose the key from data that is the most unique and least likely to change. A person s name might change due to marriage, divorce, and so on. Phone numbers and addresses

6 50 Database Design Unleashed PART I change all the time. A good key would be a Social Security number, but what if your contact lives outside the United States? In this situation, Access allows you to create an AutoNumber field to use as a primary key. An AutoNumber is a numeric value that Access maintains and automatically increments each time you add a new record to a table. However, an AutoNumber is not the same as a record number. In record number based database products, record numbers are recalculated as records are added or deleted. In Microsoft Access, a record s AutoNumber remains the same as records are added or deleted (except in an unusual circumstance discussed in Chapter 5, The Microsoft Jet Database Engine 4.0 ). AutoNumber values are not reused in the same table after a record is deleted. There are two types of AutoNumber values: Integers ReplicationID or GUID (used in Replication). Note You can manipulate a Jet AutoNumber in a few ways. You can set the AutoNumber increment value, reset the starting seed, and start counting backward. See Chapter 5 for more information. Foreign Keys and Domains When one table s primary key is used in another table, it is called a foreign key because it is foreign to the second table. Foreign keys are used to relate records from two (or more) tables, a topic discussed in the section titled Relationships later in the chapter. Figure 3.2 illustrates a table using foreign keys. FIGURE 3.2 A table with two foreign keys. Figure 3.2 shows the Contacts table with two foreign keys, ContactID and PhoneID. ContactID is the primary key of the tblcontactname table (not shown) and PhoneID is the primary key of the tblcontactphone table (not shown).

7 Database Design and Normalization CHAPTER 3 51 When you use foreign keys, they will always be in the same domain. A domain is the pool of possible values from which a column s value is drawn. For example, in the United States, the domain of ZIP codes consists of all valid ZIP codes. Another example might be a university s student ID numbers. If the student ID system is based on Social Security numbers, the domain consists of all valid Social Security numbers available to the system. Relationships When you create primary keys and foreign keys, you are defining relationships. Relationships refer to how the records in one table connect to the records in another table. Access supports three different types of relationships: One-to-one relationships One-to-many relationships Many-to-many relationships To set relationships in Microsoft Access, press the Relationships button on the toolbar or select Tools, Relationships from the menu to bring up the Relationships window. One-to-One Relationships Two tables have a one-to-one relationship if, for each row in one table, there is at most one related record in the related table. Figure 3.3 shows an example of a one-to-one relationship. FIGURE 3.3 A one-to-one relationship. 3 DATABASE DESIGN AND NORMALIZATION Figure 3.3 shows a one-to-one relationship because each record in the table tblcontacts relates to, at most, one related record in tblcontact . One-to-one relationships are the least common types of relationships because most databases include related information in one table. For security reasons, however, you might choose to break out information into two tables. Financial transactions often involve many one-to-one relationships.

8 52 Database Design Unleashed PART I One-to-Many Relationships The most common type of relationship is the one-to-many relationship. A one-to-many relationship occurs when a table has zero or many related records (sometimes called child records) in another table. A typical example occurs in a customer order database, because one customer can have many orders. Similarly, in your contact database, one contact (the one side of the relationship) might have several phone numbers (the many side). To express the relationship in terms of keys, each contact has a unique ID which is the primary key in one table. This primary key would appear as a foreign key in each related record in a table of telephone numbers. Figure 3.4 illustrates a one-to-many relationship. FIGURE 3.4 A one-to-many relationship. The ContactID field is tblcontacts primary key and a foreign key in tblcontactphone. ContactID 2 appears twice in tblcontactphone, meaning that there are two related records in tblcontactphone. Figure 3.4 includes the contents of the table to make the relationships clearer. Many-to-Many Relationships Given two tables, tblalpha and tblbeta, a many-to-many relationship occurs when one or more rows in tblalpha relate to zero or more rows in tblbeta, and one or more rows in tblbeta relates to zero or more rows in tblalpha.

9 Database Design and Normalization CHAPTER 3 53 Many-to-many relationships are problematic because it is difficult to select unique records from one table using existing relationships. Suppose you have three contacts (stored in tblalpha) who use any one of three fax numbers (stored in tblbeta). If you want to send one of those contacts a fax, it is not immediately clear which fax number to use. Conversely, if you receive a fax from one of those three numbers that lists the sender s fax number but not the sender s name, you will not immediately know which of the three sent the fax. Unfortunately, Access does not have a way to resolve many-to-many relationships between two tables. The only way to do so is to create a so-called linking table. A linking table is a table that contains the primary keys of both tables as foreign keys. Figure 3.5 shows a many-to-many relationship between tblcontacts and tblcontacttype through the linking table tblcontactinfo. tblcontacts contains all the contacts in your database. tblcontacttype lists all the types of contact information: Fax, , Phone, and Pager. tblcontactinfo is the linking table. It contains a reference to a contact (ContactID), a contact type (ContactTypeID), and the contact information itself (ContactInfo), so you can locate either a specific telephone number using a contact s name or a specific contact name using a particular telephone number. Moreover, if your contact adds a new type of communication (like a Web address) to the list, you simply add Web Address to the lookup table (tblcontacttype), and then add the new linking record to tblcontactinfo. This is the most flexible way to build a contact management system because it avoids repeating fields (Phone1, Phone2, and so forth), blank fields, and having to add new fields to a table when you add another communication type to the list. A common naming convention when using a linking table this way is to use the trel prefix to identify a linking table. In this case, the tblcontactinfo would be named trelcontactinfo. 3 DATABASE DESIGN AND NORMALIZATION FIGURE 3.5 A many-to-many relationship using a linking table.

10 54 Database Design Unleashed PART I Data Normalization Data normalization describes the process of designing a database (or modifying an existing database design) and organizing data to take best advantage of relational database principles. Codd defined six levels of normalization that he described as normal forms. The first three, known as First, Second, and Third Normal Form, have the most impact on database design decisions. As you read through the next few paragraphs, keep the following somewhat whimsical but useful summation of Codd s first three laws in mind: The values in a row are dependent on the key, the whole key, and nothing but the key, so help me Codd. First Normal Form First Normal Form requires that all columns (fields) in a table contain atomic values. That is, each field should contain one value, not a list of values or any repeating groups of data. Many flat file databases store data in this fashion, which makes searching quite difficult. Note The term flat file database refers to files, almost always text files but sometimes binary, containing some type of data. They are called flat because they lack any structure or hierarchical arrangement suggesting the relationship between one record and the next. Flat files are often database dumps. Figure 3.6 shows an example of a table that is not in First Normal Form. FIGURE 3.6 A table not in First Normal Form. The ContactInfo column violates First Normal Form because it contains multiple pieces of information. Putting the contact type (Fax, Voice, ) in its own column (ContactType), making separate records for each contact number in the ContactInfo column, creating the ContactInfoID column, and making ContactID the table s primary key results in Figure 3.7. The table shown in Figure 3.7 is in First Normal Form because each column contains a single, discrete piece of information.

11 Database Design and Normalization CHAPTER 3 55 FIGURE 3.7 A Table in First Normal Form. Second Normal Form A table in Second Normal Form is one in First Normal Form and in which every non-key field is fully dependent on the entire primary key. That is, any column in a table that is not the primary key or part of a composite primary key must depend on the primary key or all parts of a composite primary key for its meaning or interpretation. tblcontact is not in Second Normal Form. The primary key is a composite consisting of ContactID, ContactInfoID, and ContactInfo. ContactName does depend on ContactID, but not on ContactInfoID or ContactInfo. To put this table in Second Normal Form, put ContactInfo, ContactInfoID, and ContactType in a separate table. Next, use ContactID as a foreign key in the new table, creating a one-to-many relationship. The result is shown in Figure 3.8. Now both tables are in Second Normal Form because the columns in each table depend on their respective table s primary keys. FIGURE 3.8 A Table in Second Normal Form. 3 DATABASE DESIGN AND NORMALIZATION

12 56 Database Design Unleashed PART I Third Normal Form A table is in Third Normal Form when it is in Second Normal Form and when no nonkey column depends on the primary key. tblcontactold in Figure 3.8 contains a field dependent on another non-key field, so it is not in Third Normal Form. If you do not see it right away, look at it for a few moments before continuing with the next paragraph. If you missed it, the dependent column is ContactType. Why? Given the ContactID and ContactInfoID, you can use a query to obtain the ContactType. The solution is to create a third table named tblcontacttype using the ContactType descriptions, and use tblcontacttype s primary key (ContactTypeID, in this case) as a foreign key in tblcontactold. The result is shown in Figure 3.9. FIGURE 3.9 Tables in Third Normal Form. All three tables are now in Third Normal Form. Real-World Benefits of Normalization Why bother to normalize data? The original table in the previous example (Figure 3.6), listed the contact types and information in an array of values, making searching for the contents of a fax number very difficult. In addition, when one of your contacts phone number changes or gets a new form of communication method, like a cellular phone, updating the data is difficult and easily botched. First Normal Form improved the

13 Database Design and Normalization CHAPTER 3 57 situation and gave you more flexibility because it created separate records for each contact s voice number, fax number, address, and so forth. First Normal Form, shown in Figure 3.7, only partly solves the problem. Contact data is difficult to manage because the same information is repeated many times and because storing the same name 10 times wastes disk space. Second Normal Form, in Figure 3.8, is almost, but not quite there. It eliminates most of the wasted disk space and repetitious information, but limits your flexibility. Third Normal Form allows you to add and remove contact types from a single table without requiring any changes to the structure of other tables. The tables in Figure 3.9 give you the most flexibility and use the least amount of disk space. Data Integrity Rules When normalizing a set of tables, you should also consider data integrity rules. Data integrity rules, sometimes called constraints, are rules, often enforced by the database engine itself, that ensure the consistency of your data. For example, to revisit the contact database example a final time, if you delete a contact from the main table (tblcontact), you want to make sure that related records in other tables are also deleted. Deleting only a related record, on the other hand, should not delete other related records or, certainly, the primary contact information. Most data integrity rules in an Access 2002 database are determined by the relationships you define. In addition, Access lets you specify cascading updates and deletes when defining relationships. A cascading update ensures that when you update a record s primary key value on the one side of a one-to-many relationship, the change will be reflected in all records on the many side. The change, that is, will cascade through all related records. 3 DATABASE DESIGN AND NORMALIZATION Suppose you have a lookup table for states. New York is in this table with a primary key of NY and a description of New York. Imagine that New York City broke away and formed its own state (before you laugh, it almost happened in 1789!) When you change your NY value to NNY (for New New York ), the values of NY in all the child tables will be changed to NNY. If cascading updates were not set, you would need to add a record to the lookup table for NY1, update all the records in the child table, and then delete the NY record from the lookup table. A cascading delete has the same effect for deleting a primary key. Cascading deletes ensure that deleting a record from a one table also deletes all related records from the many table(s). This feature has a downside, however. If you delete a customer and cascading deletes were set, all the many invoices would be deleted. If you do not have deletes set, the deletion would not be allowed in the one table until you deleted all the

14 58 Database Design Unleashed PART I records in the many table, to avoid leaving any orphans. Orphaned records are records not related to an existing primary key. As a result, they are not directly accessible and constitute wasted disk space. Summary As a relational database, Access 2002 implements a proven database model. Applying the relational model to your database designs will enable you to take full advantage of relational database advantages. A normalized database is a key element of a properly designed relational database. A database design that eliminates redundant data in any single table, places tightly related datasets into individual tables, keeps unrelated datasets separated in their own tables, and establishes clear relations between tables will enable you fully to exploit the relational database model Access 2002 implements.

Tutorial on Relational Database Design

Tutorial on Relational Database Design Tutorial on Relational Database Design Introduction Relational database was proposed by Edgar Codd (of IBM Research) around 1969. It has since become the dominant database model for commercial applications

More information

Database Design Basics

Database Design Basics Database Design Basics Table of Contents SOME DATABASE TERMS TO KNOW... 1 WHAT IS GOOD DATABASE DESIGN?... 2 THE DESIGN PROCESS... 2 DETERMINING THE PURPOSE OF YOUR DATABASE... 3 FINDING AND ORGANIZING

More information

Table and field properties Tables and fields also have properties that you can set to control their characteristics or behavior.

Table and field properties Tables and fields also have properties that you can set to control their characteristics or behavior. Create a table When you create a database, you store your data in tables subject-based lists that contain rows and columns. For instance, you can create a Contacts table to store a list of names, addresses,

More information

Database design 1 The Database Design Process: Before you build the tables and other objects that will make up your system, it is important to take time to design it. A good design is the keystone to creating

More information

Optimum Database Design: Using Normal Forms and Ensuring Data Integrity. by Patrick Crever, Relational Database Programmer, Synergex

Optimum Database Design: Using Normal Forms and Ensuring Data Integrity. by Patrick Crever, Relational Database Programmer, Synergex Optimum Database Design: Using Normal Forms and Ensuring Data Integrity by Patrick Crever, Relational Database Programmer, Synergex Printed: April 2007 The information contained in this document is subject

More information

Access Tutorial 2 Building a Database and Defining Table Relationships

Access Tutorial 2 Building a Database and Defining Table Relationships Access Tutorial 2 Building a Database and Defining Table Relationships Microsoft Office 2013 Objectives Session 2.1 Learn the guidelines for designing databases and setting field properties Create a table

More information

- Suresh Khanal. http://mcqsets.com. http://www.psexam.com Microsoft Excel Short Questions and Answers 1

- Suresh Khanal. http://mcqsets.com. http://www.psexam.com Microsoft Excel Short Questions and Answers 1 - Suresh Khanal http://mcqsets.com http://www.psexam.com Microsoft Excel Short Questions and Answers 1 Microsoft Access Short Questions and Answers with Illustrations Part I Suresh Khanal Kalanki, Kathmandu

More information

Topic: Relationships in ER Diagram and Relationships in MS Access

Topic: Relationships in ER Diagram and Relationships in MS Access MS Access Lab 3 Topic: Relationships in ER Diagram and Relationships in MS Access Summary Introduction to Relationships Why Define Relationships? Relationships in ER Diagram vs. Relationships in MS Access

More information

Ken Goldberg Database Lab Notes. There are three types of relationships: One-to-One (1:1) One-to-Many (1:N) Many-to-Many (M:N).

Ken Goldberg Database Lab Notes. There are three types of relationships: One-to-One (1:1) One-to-Many (1:N) Many-to-Many (M:N). Lab 3 Relationships in ER Diagram and Relationships in MS Access MS Access Lab 3 Summary Introduction to Relationships Why Define Relationships? Relationships in ER Diagram vs. Relationships in MS Access

More information

Database Design for the Uninitiated CDS Brownbag Series CDS

Database Design for the Uninitiated CDS Brownbag Series CDS Database Design for the Uninitiated Paul Litwin FHCRC Collaborative Data Services 1 CDS Brownbag Series This is the ninth in a series of seminars Materials for the series can be downloaded from www.deeptraining.com/fhcrc

More information

Microsoft Access Basics

Microsoft Access Basics Microsoft Access Basics 2006 ipic Development Group, LLC Authored by James D Ballotti Microsoft, Access, Excel, Word, and Office are registered trademarks of the Microsoft Corporation Version 1 - Revision

More information

1. INTRODUCTION TO RDBMS

1. INTRODUCTION TO RDBMS Oracle For Beginners Page: 1 1. INTRODUCTION TO RDBMS What is DBMS? Data Models Relational database management system (RDBMS) Relational Algebra Structured query language (SQL) What Is DBMS? Data is one

More information

Chapter 4: Database Design

Chapter 4: Database Design Chapter 4: Chapter 4: Objectives Understand data integrity concepts. Learn how to normalize data. Work with SQL Server s tools for enforcing data integrity. Implement primary and foreign keys. Use Declarative

More information

Planning and Creating a Custom Database

Planning and Creating a Custom Database Planning and Creating a Custom Database Introduction The Microsoft Office Access 00 database wizards make creating databases easy, but you may need to create a database that does not fit any of the predefined

More information

z Introduction to Relational Databases for Clinical Research Michael A. Kohn, MD, MPP michael.kohn@ucsf.edu copyright 2007Michael A.

z Introduction to Relational Databases for Clinical Research Michael A. Kohn, MD, MPP michael.kohn@ucsf.edu copyright 2007Michael A. z Introduction to Relational Databases for Clinical Research Michael A. Kohn, MD, MPP michael.kohn@ucsf.edu copyright 2007Michael A. Kohn Table of Contents Introduction...1 Relational Databases, Keys,

More information

Database Normalization. Mohua Sarkar, Ph.D Software Engineer California Pacific Medical Center 415-600-7003 sarkarm@sutterhealth.

Database Normalization. Mohua Sarkar, Ph.D Software Engineer California Pacific Medical Center 415-600-7003 sarkarm@sutterhealth. Database Normalization Mohua Sarkar, Ph.D Software Engineer California Pacific Medical Center 415-600-7003 sarkarm@sutterhealth.org Definition A database is an organized collection of data whose content

More information

Microsoft Access Part I (Database Design Basics) ShortCourse Handout

Microsoft Access Part I (Database Design Basics) ShortCourse Handout Microsoft Access Part I (Database Design Basics) ShortCourse Handout July 2004, Technology Support, Texas Tech University. ALL RIGHTS RESERVED. Members of Texas Tech University or Texas Tech Health Sciences

More information

Use Find & Replace Commands under Home tab to search and replace data.

Use Find & Replace Commands under Home tab to search and replace data. Microsoft Access 2: Managing Data in Tables and Creating Relationships You have created tables in an Access database. Data in Access tables can be added, deleted, and updated to be current (practiced in

More information

Filter by Selection button. Displays records by degree to which they match the selected record. Click to view advanced filtering options

Filter by Selection button. Displays records by degree to which they match the selected record. Click to view advanced filtering options The Home Ribbon Sort Buttons: sort records into ascending or descending order by selected field Filter by Selection button. Displays records by degree to which they match the selected record. Display summary

More information

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Outline Database concepts Conceptual Design Logical Design Communicating with the RDBMS 2 Some concepts Database: an

More information

Creating Database Tables in Microsoft SQL Server

Creating Database Tables in Microsoft SQL Server Creating Database Tables in Microsoft SQL Server Microsoft SQL Server is a relational database server that stores and retrieves data for multi-user network-based applications. SQL Server databases are

More information

DATABASE INTRODUCTION

DATABASE INTRODUCTION Introduction The history of database system research is one of exceptional productivity and startling economic impact. We have learnt that from the days of file-based systems there are better ways to handle

More information

Information Technology Services Kennesaw State University

Information Technology Services Kennesaw State University Information Technology Services Kennesaw State University Microsoft Access 2007 Level 1 1 Copyright 2008 KSU Dept. of Information Technology Services This document may be downloaded, printed or copied

More information

INTRODUCTION TO MICROSOFT ACCESS MINIMAL MANUAL

INTRODUCTION TO MICROSOFT ACCESS MINIMAL MANUAL University of Glasgow Department of Computing Science INTRODUCTION TO MICROSOFT ACCESS MINIMAL MANUAL 1 Databases in Access...2 2 The Database Window...2 3 Help...2 4 Saving...3 5 Wizards...3 6 Tables...3

More information

Database Management. Technology Briefing. Modern organizations are said to be drowning in data but starving for information p.

Database Management. Technology Briefing. Modern organizations are said to be drowning in data but starving for information p. Technology Briefing Database Management Modern organizations are said to be drowning in data but starving for information p. 509 TB3-1 Learning Objectives TB3-2 Learning Objectives TB3-3 Database Management

More information

Topics. Database Essential Concepts. What s s a Good Database System? Using Database Software. Using Database Software. Types of Database Programs

Topics. Database Essential Concepts. What s s a Good Database System? Using Database Software. Using Database Software. Types of Database Programs Topics Software V:. Database concepts: records, fields, data types. Relational and objectoriented databases. Computer maintenance and operation: storage health and utilities; back-up strategies; keeping

More information

Introduction to Computing. Lectured by: Dr. Pham Tran Vu t.v.pham@cse.hcmut.edu.vn

Introduction to Computing. Lectured by: Dr. Pham Tran Vu t.v.pham@cse.hcmut.edu.vn Introduction to Computing Lectured by: Dr. Pham Tran Vu t.v.pham@cse.hcmut.edu.vn Databases The Hierarchy of Data Keys and Attributes The Traditional Approach To Data Management Database A collection of

More information

Physical Database Design Process. Physical Database Design Process. Major Inputs to Physical Database. Components of Physical Database Design

Physical Database Design Process. Physical Database Design Process. Major Inputs to Physical Database. Components of Physical Database Design Physical Database Design Process Physical Database Design Process The last stage of the database design process. A process of mapping the logical database structure developed in previous stages into internal

More information

Database Management System

Database Management System ISSN: 2349-7637 (Online) RESEARCH HUB International Multidisciplinary Research Journal Research Paper Available online at: www.rhimrj.com Database Management System Viral R. Dagli Lecturer, Computer Science

More information

ISM 318: Database Systems. Objectives. Database. Dr. Hamid R. Nemati

ISM 318: Database Systems. Objectives. Database. Dr. Hamid R. Nemati ISM 318: Database Systems Dr. Hamid R. Nemati Department of Information Systems Operations Management Bryan School of Business Economics Objectives Underst the basics of data databases Underst characteristics

More information

Microsoft Access 2003 Module 1

Microsoft Access 2003 Module 1 Microsoft Access 003 Module http://pds.hccfl.edu/pds Microsoft Access 003: Module June 005 006 Hillsborough Community College - Professional Development Services Hillsborough Community College - Professional

More information

An Introduction to Relational Database Management System

An Introduction to Relational Database Management System History The concept of relational databases was first described by Edgar Frank Codd (almost exclusively referenced as E. F. Codd in technical literature) in the IBM research report RJ599, dated August

More information

Exploring Microsoft Office Access 2007. Chapter 2: Relational Databases and Multi-Table Queries

Exploring Microsoft Office Access 2007. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office Access 2007 Chapter 2: Relational Databases and Multi-Table Queries 1 Objectives Design data Create tables Understand table relationships Share data with Excel Establish table

More information

A Basic introduction to Microsoft Access

A Basic introduction to Microsoft Access A Basic introduction to Microsoft Access By Ojango J.M.K Department of Animal Sciences, Egerton University, Njoro, Kenya and International Livestock Research Institute, Nairobi, Kenya Ms Access is a database

More information

Database Normalization And Design Techniques

Database Normalization And Design Techniques Database Normalization And Design Techniques What is database normalization and how does it apply to us? In this article Barry teaches us the best way to structure our database for typical situations.one

More information

Fundamentals of Database Design

Fundamentals of Database Design Fundamentals of Database Design Zornitsa Zaharieva CERN Data Management Section - Controls Group Accelerators and Beams Department /AB-CO-DM/ 23-FEB-2005 Contents : Introduction to Databases : Main Database

More information

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt Lesson Notes Author: Pamela Schmidt Tables Text Fields (Default) Text or combinations of text and numbers, as well as numbers that don't require calculations, such as phone numbers. or the length set by

More information

Access Database Design

Access Database Design Technical Support Services Office of Information Technology, West Virginia University OIT Help Desk (304) 293-4444 http://oit.wvu.edu/training/classmat/db/ Last revised: June 26, 2008 Copyright 2008 West

More information

The process of database development. Logical model: relational DBMS. Relation

The process of database development. Logical model: relational DBMS. Relation The process of database development Reality (Universe of Discourse) Relational Databases and SQL Basic Concepts The 3rd normal form Structured Query Language (SQL) Conceptual model (e.g. Entity-Relationship

More information

Once the schema has been designed, it can be implemented in the RDBMS.

Once the schema has been designed, it can be implemented in the RDBMS. 2. Creating a database Designing the database schema... 1 Representing Classes, Attributes and Objects... 2 Data types... 5 Additional constraints... 6 Choosing the right fields... 7 Implementing a table

More information

B.1 Database Design and Definition

B.1 Database Design and Definition Appendix B Database Design B.1 Database Design and Definition Throughout the SQL chapter we connected to and queried the IMDB database. This database was set up by IMDB and available for us to use. But

More information

Creating Tables ACCESS. Normalisation Techniques

Creating Tables ACCESS. Normalisation Techniques Creating Tables ACCESS Normalisation Techniques Microsoft ACCESS Creating a Table INTRODUCTION A database is a collection of data or information. Access for Windows allow files to be created, each file

More information

SQL Server. 1. What is RDBMS?

SQL Server. 1. What is RDBMS? SQL Server 1. What is RDBMS? Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained

More information

Database Fundamentals: 1

Database Fundamentals: 1 Database Fundamentals Robert J. Robbins Johns Hopkins University rrobbins@gdb.org Database Fundamentals: 1 What is a Database? General: A database is any collection of related data. Restrictive: A database

More information

Creating and Using Databases with Microsoft Access

Creating and Using Databases with Microsoft Access CHAPTER A Creating and Using Databases with Microsoft Access In this chapter, you will Use Access to explore a simple database Design and create a new database Create and use forms Create and use queries

More information

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database. Physical Design Physical Database Design (Defined): Process of producing a description of the implementation of the database on secondary storage; it describes the base relations, file organizations, and

More information

MS Access Lab 2. Topic: Tables

MS Access Lab 2. Topic: Tables MS Access Lab 2 Topic: Tables Summary Introduction: Tables, Start to build a new database Creating Tables: Datasheet View, Design View Working with Data: Sorting, Filtering Help on Tables Introduction

More information

The Relational Model. Why Study the Relational Model?

The Relational Model. Why Study the Relational Model? The Relational Model Chapter 3 Instructor: Vladimir Zadorozhny vladimir@sis.pitt.edu Information Science Program School of Information Sciences, University of Pittsburgh 1 Why Study the Relational Model?

More information

Foreign and Primary Keys in RDM Embedded SQL: Efficiently Implemented Using the Network Model

Foreign and Primary Keys in RDM Embedded SQL: Efficiently Implemented Using the Network Model Foreign and Primary Keys in RDM Embedded SQL: Efficiently Implemented Using the Network Model By Randy Merilatt, Chief Architect - January 2012 This article is relative to the following versions of RDM:

More information

- Eliminating redundant data - Ensuring data dependencies makes sense. ie:- data is stored logically

- Eliminating redundant data - Ensuring data dependencies makes sense. ie:- data is stored logically Normalization of databases Database normalization is a technique of organizing the data in the database. Normalization is a systematic approach of decomposing tables to eliminate data redundancy and undesirable

More information

Microsoft Office 2010

Microsoft Office 2010 Access Tutorial 1 Creating a Database Microsoft Office 2010 Objectives Learn basic database concepts and terms Explore the Microsoft Access window and Backstage view Create a blank database Create and

More information

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1 The Relational Model Ramakrishnan&Gehrke, Chapter 3 CS4320 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. Legacy systems in older models

More information

Lecture 6. SQL, Logical DB Design

Lecture 6. SQL, Logical DB Design Lecture 6 SQL, Logical DB Design Relational Query Languages A major strength of the relational model: supports simple, powerful querying of data. Queries can be written intuitively, and the DBMS is responsible

More information

Consider the possible problems with storing the following data in a spreadsheet:

Consider the possible problems with storing the following data in a spreadsheet: Microsoft Access 2010 Part 1: Introduction to Database Design What is a database? Identifying entities and attributes Understanding relationships and keys Developing tables and other objects Planning a

More information

2. Basic Relational Data Model

2. Basic Relational Data Model 2. Basic Relational Data Model 2.1 Introduction Basic concepts of information models, their realisation in databases comprising data objects and object relationships, and their management by DBMS s that

More information

DATABASE MANAGEMENT SYSTEM

DATABASE MANAGEMENT SYSTEM REVIEW ARTICLE DATABASE MANAGEMENT SYSTEM Sweta Singh Assistant Professor, Faculty of Management Studies, BHU, Varanasi, India E-mail: sweta.v.singh27@gmail.com ABSTRACT Today, more than at any previous

More information

N o r m a l i z a t i o n

N o r m a l i z a t i o n N o r m a l i z a t i o n One of the most important factors in software development is database definition. If your tables are not set up properly, it can cause you a lot of headaches down the road when

More information

SQL DATA DEFINITION: KEY CONSTRAINTS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7

SQL DATA DEFINITION: KEY CONSTRAINTS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7 SQL DATA DEFINITION: KEY CONSTRAINTS CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7 Data Definition 2 Covered most of SQL data manipulation operations Continue exploration of SQL

More information

Chapter 6: Physical Database Design and Performance. Database Development Process. Physical Design Process. Physical Database Design

Chapter 6: Physical Database Design and Performance. Database Development Process. Physical Design Process. Physical Database Design Chapter 6: Physical Database Design and Performance Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden Robert C. Nickerson ISYS 464 Spring 2003 Topic 23 Database

More information

Normalization. Functional Dependence. Normalization. Normalization. GIS Applications. Spring 2011

Normalization. Functional Dependence. Normalization. Normalization. GIS Applications. Spring 2011 Normalization Normalization Normalization is a foundation for relational database design Systematic approach to efficiently organize data in a database GIS Applications Spring 2011 Objectives Minimize

More information

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3 The Relational Model Chapter 3 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase,

More information

www.gr8ambitionz.com

www.gr8ambitionz.com Data Base Management Systems (DBMS) Study Material (Objective Type questions with Answers) Shared by Akhil Arora Powered by www. your A to Z competitive exam guide Database Objective type questions Q.1

More information

IENG2004 Industrial Database and Systems Design. Microsoft Access I. What is Microsoft Access? Architecture of Microsoft Access

IENG2004 Industrial Database and Systems Design. Microsoft Access I. What is Microsoft Access? Architecture of Microsoft Access IENG2004 Industrial Database and Systems Design Microsoft Access I Defining databases (Chapters 1 and 2) Alison Balter Mastering Microsoft Access 2000 Development SAMS, 1999 What is Microsoft Access? Microsoft

More information

Getting Started with Access 2007

Getting Started with Access 2007 Getting Started with Access 2007 Table of Contents Getting Started with Access 2007... 1 Plan an Access 2007 Database... 2 Learning Objective... 2 1. Introduction to databases... 2 2. Planning a database...

More information

Microsoft Access 2007 Module 1

Microsoft Access 2007 Module 1 Microsoft Access 007 Module http://pds.hccfl.edu/pds Microsoft Access 007: Module August 007 007 Hillsborough Community College - Professional Development and Web Services Hillsborough Community College

More information

Microsoft Using an Existing Database Amarillo College Revision Date: July 30, 2008

Microsoft Using an Existing Database Amarillo College Revision Date: July 30, 2008 Microsoft Amarillo College Revision Date: July 30, 2008 Table of Contents GENERAL INFORMATION... 1 TERMINOLOGY... 1 ADVANTAGES OF USING A DATABASE... 2 A DATABASE SHOULD CONTAIN:... 3 A DATABASE SHOULD

More information

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model 221 After completing this chapter, you should be able to explain the three phases of database design, Why are multiple phases useful? evaluate the significance of the Entity-Relationship

More information

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys Database Design Overview Conceptual Design. The Entity-Relationship (ER) Model CS430/630 Lecture 12 Conceptual design The Entity-Relationship (ER) Model, UML High-level, close to human thinking Semantic

More information

Database Setup. Coding, Understanding, & Executing the SQL Database Creation Script

Database Setup. Coding, Understanding, & Executing the SQL Database Creation Script Overview @author R.L. Martinez, Ph.D. We need a database to perform the data-related work in the subsequent tutorials. Begin by creating the falconnight database in phpmyadmin using the SQL script below.

More information

Databases and Microsoft Access II

Databases and Microsoft Access II Databases and Microsoft Access II Northern New York Library Network Workshop Jim Crowley C3 - Crowley Computer Consulting 9148 State Highway 37 Ogdensburg NY 13669 315-394-7008 fax 315-394-7009 www.crowleycomputers.com

More information

Access Tutorial 3: Relationships

Access Tutorial 3: Relationships Access Tutorial 3: Relationships 3.1 Introduction: The advantage of using tables and relationships A common mistake made by inexperienced database designers (or those who have more experience with spreadsheets

More information

7. Databases and Database Management Systems

7. Databases and Database Management Systems 7. Databases and Database Management Systems 7.1 What is a File? A file is a collection of data or information that has a name, called the Filename. There are many different types of files: Data files

More information

Simple Invoicing Desktop Database with MS Access 2013. c 2015 by David W. Gerbing School of Business Administration Portland State University

Simple Invoicing Desktop Database with MS Access 2013. c 2015 by David W. Gerbing School of Business Administration Portland State University Simple Invoicing Desktop Database with MS Access 2013 c 2015 by David W. Gerbing School of Business Administration Portland State University July 2, 2015 CONTENTS 1 Contents 1 Create a New Database 1 2

More information

Fundamental Concepts of Relational Theory Technical Brief

Fundamental Concepts of Relational Theory Technical Brief Fundamental Concepts of Relational Theory Technical Brief Introduction This paper contains a series of technical briefs intended to provide general information for FileMaker developers regarding some of

More information

Relational model. Relational model - practice. Relational Database Definitions 9/27/11. Relational model. Relational Database: Terminology

Relational model. Relational model - practice. Relational Database Definitions 9/27/11. Relational model. Relational Database: Terminology COS 597A: Principles of Database and Information Systems elational model elational model A formal (mathematical) model to represent objects (data/information), relationships between objects Constraints

More information

Creating a Database in Access

Creating a Database in Access Creating a Database in Access Microsoft Access is a database application. A database is collection of records and files organized for a particular purpose. For example, you could use a database to store

More information

Course Title: Microsoft Access 2007- Basic Duration: 12 hours

Course Title: Microsoft Access 2007- Basic Duration: 12 hours Course Title: Microsoft Access 2007- Basic Duration: 12 hours Getting started Topic A: Database concepts A-1: Identifying database components A-2: Identifying the advantages of relational databases Topic

More information

SQL AND DATA. What is SQL? SQL (pronounced sequel) is an acronym for Structured Query Language, CHAPTER OBJECTIVES

SQL AND DATA. What is SQL? SQL (pronounced sequel) is an acronym for Structured Query Language, CHAPTER OBJECTIVES C H A P T E R 1 SQL AND DATA CHAPTER OBJECTIVES In this chapter, you will learn about: Data, Databases, and the Definition of SQL Page 3 Table Relationships Page 15 The STUDENT Schema Diagram Page 37 What

More information

Task 1 : Implement a table in your database to represent the CarModel entity

Task 1 : Implement a table in your database to represent the CarModel entity LAB 2: From data model to database Getting started In this lab you will implement and test a database to represent part of the GCUCars data model you discussed in the tutorial. An example solution for

More information

3. Relational Model and Relational Algebra

3. Relational Model and Relational Algebra ECS-165A WQ 11 36 3. Relational Model and Relational Algebra Contents Fundamental Concepts of the Relational Model Integrity Constraints Translation ER schema Relational Database Schema Relational Algebra

More information

Lecture Notes INFORMATION RESOURCES

Lecture Notes INFORMATION RESOURCES Vilnius Gediminas Technical University Jelena Mamčenko Lecture Notes on INFORMATION RESOURCES Part I Introduction to Dta Modeling and MSAccess Code FMITB02004 Course title Information Resourses Course

More information

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML?

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML? CS2Bh: Current Technologies Introduction to XML and Relational Databases Spring 2005 Introduction to Databases CS2 Spring 2005 (LN5) 1 Why databases? Why not use XML? What is missing from XML: Consistency

More information

Foundations of Information Management

Foundations of Information Management Foundations of Information Management - WS 2012/13 - Juniorprofessor Alexander Markowetz Bonn Aachen International Center for Information Technology (B-IT) Data & Databases Data: Simple information Database:

More information

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to: 14 Databases 14.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define a database and a database management system (DBMS)

More information

CHAPTER 4: BUSINESS ANALYTICS

CHAPTER 4: BUSINESS ANALYTICS Chapter 4: Business Analytics CHAPTER 4: BUSINESS ANALYTICS Objectives Introduction The objectives are: Describe Business Analytics Explain the terminology associated with Business Analytics Describe the

More information

4. The Third Stage In Designing A Database Is When We Analyze Our Tables More Closely And Create A Between Tables

4. The Third Stage In Designing A Database Is When We Analyze Our Tables More Closely And Create A Between Tables 1. What Are The Different Views To Display A Table A) Datasheet View B) Design View C) Pivote Table & Pivot Chart View D) All Of Above 2. Which Of The Following Creates A Drop Down List Of Values To Choose

More information

Data Modeling Basics

Data Modeling Basics Information Technology Standard Commonwealth of Pennsylvania Governor's Office of Administration/Office for Information Technology STD Number: STD-INF003B STD Title: Data Modeling Basics Issued by: Deputy

More information

What is a database? The parts of an Access database

What is a database? The parts of an Access database What is a database? Any database is a tool to organize and store pieces of information. A Rolodex is a database. So is a phone book. The main goals of a database designer are to: 1. Make sure the data

More information

A brief overview of developing a conceptual data model as the first step in creating a relational database.

A brief overview of developing a conceptual data model as the first step in creating a relational database. Data Modeling Windows Enterprise Support Database Services provides the following documentation about relational database design, the relational database model, and relational database software. Introduction

More information

Databases What the Specification Says

Databases What the Specification Says Databases What the Specification Says Describe flat files and relational databases, explaining the differences between them; Design a simple relational database to the third normal form (3NF), using entityrelationship

More information

Access 2007. Creating Databases - Fundamentals

Access 2007. Creating Databases - Fundamentals Access 2007 Creating Databases - Fundamentals Contents Database Design Objectives of database design 1 Process of database design 1 Creating a New Database... 3 Tables... 4 Creating a table in design view

More information

C# Cname Ccity.. P1# Date1 Qnt1 P2# Date2 P9# Date9 1 Codd London.. 1 21.01 20 2 23.01 2 Martin Paris.. 1 26.10 25 3 Deen London.. 2 29.

C# Cname Ccity.. P1# Date1 Qnt1 P2# Date2 P9# Date9 1 Codd London.. 1 21.01 20 2 23.01 2 Martin Paris.. 1 26.10 25 3 Deen London.. 2 29. 4. Normalisation 4.1 Introduction Suppose we are now given the task of designing and creating a database. How do we produce a good design? What relations should we have in the database? What attributes

More information

Access Part 2 - Design

Access Part 2 - Design Access Part 2 - Design The Database Design Process It is important to remember that creating a database is an iterative process. After the database is created and you and others begin to use it there will

More information

Converting an Excel Spreadsheet Into an Access Database

Converting an Excel Spreadsheet Into an Access Database Converting an Excel Spreadsheet Into an Access Database Tracey L. Fisher Personal Computer and Software Instructor Butler County Community College - Adult and Community Education Exceeding Your Expectations..

More information

Databases in Engineering / Lab-1 (MS-Access/SQL)

Databases in Engineering / Lab-1 (MS-Access/SQL) COVER PAGE Databases in Engineering / Lab-1 (MS-Access/SQL) ITU - Geomatics 2014 2015 Fall 1 Table of Contents COVER PAGE... 0 1. INTRODUCTION... 3 1.1 Fundamentals... 3 1.2 How To Create a Database File

More information

Fundamentals of Relational Database Design

Fundamentals of Relational Database Design Fundamentals of Relational Database Design Presented by: Paul Litwin Paul Litwin is an independent developer, editor, writer, and educator. He s the owner of Seattle-based Litwin Consulting, a Microsoft

More information

Files. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file?

Files. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file? Files What s it all about? Information being stored about anything important to the business/individual keeping the files. The simple concepts used in the operation of manual files are often a good guide

More information

IN THIS PROJECT, YOU LEARN HOW TO

IN THIS PROJECT, YOU LEARN HOW TO UNIT 2 PROJECT 11 CREATING A CUSTOMIZED DATABASE IN THIS PROJECT, YOU LEARN HOW TO Examine a Database and Its Objects Create Tables and Set Field Properties in Design View Create Relationships Add and

More information

The 3 Normal Forms: Copyright Fred Coulson 2007 (last revised February 1, 2009)

The 3 Normal Forms: Copyright Fred Coulson 2007 (last revised February 1, 2009) The 3 Normal Forms: A Tutorial by Fred Coulson Copyright Fred Coulson 2007 (last revised February 1, 2009) This tutorial may be freely copied and distributed, providing appropriate attribution to the author

More information

IBM DB2 XML support. How to Configure the IBM DB2 Support in oxygen

IBM DB2 XML support. How to Configure the IBM DB2 Support in oxygen Table of Contents IBM DB2 XML support About this Tutorial... 1 How to Configure the IBM DB2 Support in oxygen... 1 Database Explorer View... 3 Table Explorer View... 5 Editing XML Content of the XMLType

More information