Surrogate Keys Ray Lockwood

Size: px
Start display at page:

Download "Surrogate Keys Ray Lockwood"

Transcription

1 Data Modeling and Implementation Surrogate Keys Pg 1 Surrogate Keys Ray Lockwood Points: A Surrogate Key is the primary key and links tables together. A Surrogate Key is usually a system generated integer. A Surrogate Key doesn't contain a fact about the object being modeled. A Primary Key shouldn't change when the facts about an object change. A Surrogate Key increases a database s referential integrity. Keys Link Tables Together Keys are the mechanism that link tables together. Because a table is a logical structure, its keys are logical, too. A key is a logical link between tables. Since a key is a logical device, we have some freedom in choosing its values. A example of a physical link is the memory pointer of the network database. Natural Keys In a database of country songs, we could choose AlbumName as a primary key: Primary Key Album: AlbumName Artist YearReleased Cowboy Country Billie Nelson 1989 Cryin Bob Bob Smittie 1984 Foreign Key Song: AlbumName SongTitle Length Cowboy Country Country Shuffle 3:14 Cowboy Country Country Blues 3:05 Cryin Bob Cryin Over My Pickup Truck 3:12 Cryin Bob Cryin Over My Dog 3:08 Cryin Bob Cryin Over My Beer 3:10 AlbumName is a Natural Key because this attribute occurs naturally in the table. A Natural Key is not only a linking device, it also contains a fact about an object. A Natural Key is a consequence of the table s data. AlbumName is a natural key because it contains data about the object. Song is an ID dependent entity. Album Song In choosing AlbumName as the primary key of Album, we're using a piece of data about the entity as the linking construct. This is a Natural Key.

2 Data Modeling and Implementation Surrogate Keys Pg 2 Problem with Natural Keys The problem with using an object's data as a key is two-fold: 1. What happens if we need to change the value of a natural key, perhaps to correct a misspelling? We'd have to change all the foreign keys, too. (Foreign keys produce a form of redundancy). 2. What happens if the natural key turns out to be non-unique? According to Relational rules, a key value can never change, so a misspelling can't be corrected. However, most DBMS's support key value changes through a feature called cascading updates: all foreign key values in child rows are automatically changed if the primary key value in the parent is changed, so links are undisturbed. I ran into the uniqueness problem in a table of manufacturer s part numbers. We used MfrPartNum as the primary key in this table. After it had been used for a couple of years, the database wouldn't let a clerk enter a particular new part. This part happened to have the same part number as a different manufacturer s unrelated part already in the database. The key we chose wasn't under our control. We relied on outside actors to insure uniqueness of our keys, and that caused us problems. Referential Integrity and Foreign Key Constraint Referential Integrity means assuring that the connections between tables remain valid. One important type of rule for referential integrity is called the Foreign Key Constraint. Foreign Key Constraint means that values in the foreign key column of a child table will always contain only values from the primary or candidate key attributes in the parent table. There must be no dangling pointers; this means there must be no row with a foreign key value that points to a non-existent primary key value in another table. In simpler terms, there will be no orphan rows in child tables. In our Country Music Database, if the key of a row of the Album table is changed, it must also be changed for corresponding rows in the Song table, too. This weakens referential integrity. Since we have to accept natural keys as they are, we don t have control over them. Cascading Deletes: when a parent row is deleted, all its children in other tables are deleted, too. Cascading Updates: when the primary key value in a parent row is changed, foreign keys in the children are changed to match. Relying on keys we have no control over to be unique and unchanging is risky. Referential means linking tables together using keys. Referential Integrity means assuring that linkages between tables are always correct. A Foreign Key Constraint prevents orphan rows in child tables.

3 Data Modeling and Implementation Surrogate Keys Pg 3 Surrogate Keys To avoid referential integrity problems, it s better for a key to be strictly a linking mechanism; its better if a key doesn't contain data about the object modeled by its table. In other words, keys shouldn't contain a fact about a real-world object. A key that doesn't contain real-world data is called a Surrogate Key (also called an Artificial Key as opposed to a Natural Key). is an alias for an object. If we can t put real-world data into a key, what is the alternative? We use a systemgenerated integer (usually an auto-increment integer) to set a value for our surrogate key. A Surrogate Key Becomes a Fact Outside Its Native Database Surrogate keys abound: Your social security num, driver s license num, phone num, automobile serial num, and Winn-Dixie reward num. These are system-generated identifiers that happen to be visible to users of the system. They're surrogate keys only within the database in which they were generated. Outside that database, they're a fact about an entity. Within the Social Security Administration database, your SSN is a surrogate key under the control of the database owner. In the rest of the world your SSN is a fact about you. Most surrogate keys are generated for the DBMS to use internally and aren't visible outside the database. In our Country Music database, instead of using Song Title, we can add an auto-increment integer column as a surrogate primary key. Tables linked to Album will use this surrogate key for linking, but this value has no meaning outside the database. Surrogate Keys Improve Referential Integrity A key is a linking construct; a surrogate key is a pure linking construct. The advantage of a surrogate key is that it's under the control of the database designer and not the outside world. Social Security number is a surrogate key assigned by the Social Security Administration for their own use. Keys can be pure linking devices, and not contain a fact about an object. A surrogate is a substitute for something else. Surrogate keys are system generated. is a surrogate only within the database which created it. If a surrogate key is visible outside the database, it becomes a fact about an object. Surrogate keys are almost always unseen by the outside world. is under the control of the database owner. A person might change his name, address, occupation, and correct the date of his birth; but his SSN will never change unless the people who own the SSN database decide to change it. As a result, this surrogate key a more reliable way for the Social Security folks to link their tables together than if they chose a natural key. Surrogate Keys Improve Efficiency The data type for surrogate keys is chosen for efficiency, and the integer type is the most efficient to search. This fact, plus the fact they can be auto-incremented, means that surrogate keys are generally integers. is almost always an auto-incremented integer.

4 Data Modeling and Implementation Surrogate Keys Pg 4 Example Here are our Country Music database tables again: Album: AlbumName Artist YearReleased Cowboy Country Billie Nelson 1989 Cryin Bob Bob Smittie 1984 Song: AlbumName SongTitle Length Cowboy Country Country Shuffle 3:14 Cowboy Country Country Blues 3:05 Cryin Bob Cryin Over My Pickup Truck 3:12 Cryin Bob Cryin Over My Dog 3:08 Cryin Bob Cryin Over My Beer 3:10 To change the name of the album Cowboy Country to Kowboy Kountry, then in addition to the Name attribute, we'd have to change all the corresponding foreign key values in the Song table. Here are the same two tables using the surrogate key AlbumID as the primary key of Album. The value of AlbumID is a system generated auto-increment integer: Surrogate Primary Key Just another attribute Album: AlbumID Name Artist YearReleased 001 Cowboy Country Billie Nelson Cryin Bob Bob Smittie 1984 Song: AlbumID SongTitle Length 001 Country Shuffle 3: Country Blues 3: Cryin Over My Pickup Truck 3: Cryin Over My Dog 3: Cryin Over My Beer 3:10 Now we can change the album name in only one place, the Album table, without disturbing the linkage between tables. The surrogate key is a pure linking construct. It carries no fact about an entity it has the single purpose of linking rows of one table to those of another. This is more robust and efficient than using a natural primary key. Now, the Name attribute is just another fact about an object, and not a linking device. is a pure linking construct that s all it does.

5 Data Modeling and Implementation Surrogate Keys Pg 5 Disadvantage In our original Country Music Database, we could look at the Song table alone and read album names that went with song titles. With the surrogate primary key, we can't do this. We have to perform a join to see the album names that go with song titles. Weigh the advantage against this disadvantage before deciding to use a surrogate key. A disadvantage of surrogate keys is that more joins may be necessary to get information from child tables. A Note about Normalization Data that's duplicated in foreign keys is a type of data redundancy that means repeated data that's hard to maintain if the data changes. Because keys are never meant to change, this is not a pathological redundancy addressed by normalization. It's a reflection that the rows in the child table belong to the rows in the parent table. Data repeated in foreign keys reflects the relationship between tables. Disadvantages of Surrogate Keys Disadvantage 1 Surrogate key values have no meaning to the user. They don t have much meaning to the database designer either. They make tables hard to read during casual inspection. Surrogate keys make your data more cryptic, and a step away from the Relational goal of making the database closer to information than to data. As a result, you have to join tables to look up the facts the surrogate keys represent. This is a performance hit if an application has to join tables where it wouldn t have if we used natural keys. Disadvantage 2 When data is shared among different databases, the uniqueness of surrogate keys is not assured. If you have two independent databases and wish them read each other s data, it s likely that surrogate key values of one database will be duplicated in the other. This can cause meaningless connections between the same kinds of data in the different databases. This was the problem in the parts inventory database earlier. Two unrelated parts from different manufacturers happened to have the same part number. These part numbers, though natural keys in our database, are really surrogate keys in the manufacturers databases. When combined, a collision occurred. If you design databases that might one day be combined, you can plan ahead and assign different numeric ranges for the surrogate keys. Surrogate keys make data look more cryptic on casual inspection. Tables linked by surrogate keys may require more joins. It is potentially more difficult for different databases to share data. Databases intended to share data should draw surrogate keys from different pools. Some database designers use GUID or UUID values generated by the operating system as surrogate keys. Globally Unique ID Universally Unique ID

6 Data Modeling and Implementation Surrogate Keys Pg 6 Surrogate Keys Are Widely Used The advantages of using surrogate keys usually outweigh their disadvantages. Most database designers use surrogate primary keys for many and sometimes all the table Using surrogate keys is a good practice. If a good natural key exists, use it. If not, use a surrogate key. Summary Surrogate keys: Don't introduce normalization problems in a table. Improve referential integrity because they're pure linking constructs. Improve join performance. But: Make tables more cryptic when casually viewing them. May require more joins for certain queries. Can cause problems when connecting different databases together.

ER Modeling ER Diagram ID-Dependent and Weak Entities Pg 1

ER Modeling ER Diagram ID-Dependent and Weak Entities Pg 1 ER Modeling ER Diagram ID-Dependent and Weak Entities Pg 1 ER Diagram ID-Dependent and Weak Entities Ray Lockwood Points: An ID-dependent entity is an entity whose identifier (key) includes the identifier

More information

Referential Integrity and Other Table Constraints Ray Lockwood

Referential Integrity and Other Table Constraints Ray Lockwood DDL Referential Integrity and Other Table s Pg 1 Referential Integrity and Other Table s Ray Lockwood Points: Referential Integrity assuring tables remain properly linked by primary and foreign keys. Referential

More information

Instructor: Craig Duckett. Lecture 04: Thursday, April 5, Relationships

Instructor: Craig Duckett. Lecture 04: Thursday, April 5, Relationships Instructor: Craig Duckett Lecture 04: Thursday, April 5, 2018 Relationships 1 Assignment 1 is due NEXT LECTURE 5, Tuesday, April 10 th in StudentTracker by MIDNIGHT MID-TERM EXAM is LECTURE 10, Tuesday,

More information

Introductory SQL SQL Joins: Viewing Relationships Pg 1

Introductory SQL SQL Joins: Viewing Relationships Pg 1 Introductory SQL SQL Joins: Viewing Relationships Pg 1 SQL Joins: Viewing Relationships Ray Lockwood Points: The relational model uses foreign keys to establish relationships between tables. SQL uses Joins

More information

CSE 530A. ER Model to Relational Schema. Washington University Fall 2013

CSE 530A. ER Model to Relational Schema. Washington University Fall 2013 CSE 530A ER Model to Relational Schema Washington University Fall 2013 Relational Model A relational database consists of a group of relations (a.k.a., tables) A relation (table) is a set of tuples (rows)

More information

Q &A on Entity Relationship Diagrams. What is the Point? 1 Q&A

Q &A on Entity Relationship Diagrams. What is the Point? 1 Q&A 1 Q&A Q &A on Entity Relationship Diagrams The objective of this lecture is to show you how to construct an Entity Relationship (ER) Diagram. We demonstrate these concepts through an example. To break

More information

8) A top-to-bottom relationship among the items in a database is established by a

8) A top-to-bottom relationship among the items in a database is established by a MULTIPLE CHOICE QUESTIONS IN DBMS (unit-1 to unit-4) 1) ER model is used in phase a) conceptual database b) schema refinement c) physical refinement d) applications and security 2) The ER model is relevant

More information

USING MICROSOFT ACCESS 2013 Guided Project 7-1

USING MICROSOFT ACCESS 2013 Guided Project 7-1 Guided Project 7-1 For this project, you enhance the functionality of a database for a friend s music collection. You use Design view to create a main form and a subform, and customize the form to add

More information

Database Design. A Bottom-Up Approach

Database Design. A Bottom-Up Approach Database Design A Bottom-Up Approach Reality Check Why do you need a database? What is the primary use of your database? Fast data entry Fast queries Summary data Who is responsible for the content? Who

More information

So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees.

So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees. So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees. According to the 161 schedule, heaps were last week, hashing

More information

3.1. Keys: Super Key, Candidate Key, Primary Key, Alternate Key, Foreign Key

3.1. Keys: Super Key, Candidate Key, Primary Key, Alternate Key, Foreign Key Unit 3: Types of Keys & Data Integrity 3.1. Keys: Super Key, Candidate Key, Primary Key, Alternate Key, Foreign Key Different Types of SQL Keys A key is a single or combination of multiple fields in a

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

IT 3203 Introduction to Web Development

IT 3203 Introduction to Web Development IT 3203 Introduction to Web Development Databases and SQL April 7 Notice: This session is being recorded. Copyright 2007 by Bob Brown Disadvantages of File Processing Program-Data Dependence All programs

More information

Microsoft Office Access 2007: Intermediate Course 01 Relational Databases

Microsoft Office Access 2007: Intermediate Course 01 Relational Databases Microsoft Office Access 2007: Intermediate Course 01 Relational Databases Slide 1 Relational Databases Course objectives Normalize tables Set relationships between tables Implement referential integrity

More information

There are three types of joins in Access such as one-to-one, one-to-many, and many-to-many.

There are three types of joins in Access such as one-to-one, one-to-many, and many-to-many. Relationships There are three types of joins in Access such as one-to-one, one-to-many, and many-to-many. One-to-one A one-to-one relationship has only one matching row in each table. An example would

More information

Data, Databases, and DBMSs

Data, Databases, and DBMSs Todd S. Bacastow January 2004 IST 210 Data, Databases, and DBMSs 1 Evolution Ways of storing data Files ancient times (1960) Databases Hierarchical (1970) Network (1970) Relational (1980) Object (1990)

More information

New Perspectives on Microsoft Access Module 2: Building a Database and Defining Table Relationships

New Perspectives on Microsoft Access Module 2: Building a Database and Defining Table Relationships New Perspectives on Microsoft Access 2016 Module 2: Building a Database and Defining Table Relationships 1 Objectives Session 2.1 Learn the guidelines for designing databases and setting field properties

More information

Casting in C++ (intermediate level)

Casting in C++ (intermediate level) 1 of 5 10/5/2009 1:14 PM Casting in C++ (intermediate level) Casting isn't usually necessary in student-level C++ code, but understanding why it's needed and the restrictions involved can help widen one's

More information

Relational Database Components

Relational Database Components Relational Database Components Chapter 2 Class 01: Relational Database Components 1 Class 01: Relational Database Components 2 Conceptual Database Design Components Class 01: Relational Database Components

More information

Fundamentals, Design, and Implementation, 9/e Copyright 2004 Database Processing: Fundamentals, Design, and Implementation, 9/e by David M.

Fundamentals, Design, and Implementation, 9/e Copyright 2004 Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. Chapter 5 Database Design Elements of Database Design Fundamentals, Design, and Implementation, 9/e Chapter 5/2 The Database Design Process Create tables and columns from entities and attributes Select

More information

MITOCW watch?v=w_-sx4vr53m

MITOCW watch?v=w_-sx4vr53m MITOCW watch?v=w_-sx4vr53m The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

The great primary-key debate

The great primary-key debate http://builder.com.com/5100-6388-1045050.html Página 1 de 3 16/11/05 Log in Join now Help SEARCH: Builder.com GO Home : Architect : Database : The great primary-key debate Resources Newsletters Discussion

More information

Chapter 1 SQL and Data

Chapter 1 SQL and Data Chapter 1 SQL and Data What is SQL? Structured Query Language An industry-standard language used to access & manipulate data stored in a relational database E. F. Codd, 1970 s IBM 2 What is Oracle? A relational

More information

Assorted Topics Stored Procedures and Triggers Pg 1

Assorted Topics Stored Procedures and Triggers Pg 1 Assorted Topics Stored Procedures and Triggers Pg 1 Stored Procedures and Triggers Ray Lockwood Points: A Stored Procedure is a user-written program stored in the database. A Trigger is a stored procedure

More information

10 Database Design 1

10 Database Design 1 10 Database Design 1 Objectives Discuss the general process and goals of database design Define user views and explain their function Define Database Design Language (DBDL) and use it to document database

More information

Relational Model. IT 5101 Introduction to Database Systems. J.G. Zheng Fall 2011

Relational Model. IT 5101 Introduction to Database Systems. J.G. Zheng Fall 2011 Relational Model IT 5101 Introduction to Database Systems J.G. Zheng Fall 2011 Overview What is the relational model? What are the most important practical elements of the relational model? 2 Introduction

More information

SQL Server Management Studio (SSMS)

SQL Server Management Studio (SSMS) Page 1 of 40 SQL Server Management Studio (SSMS) SQL Server Management Studio (free) is the main administration console for SQL Server. It allows you to create and administer databases, security, replication,

More information

Inf 202 Introduction to Data and Databases (Spring 2010)

Inf 202 Introduction to Data and Databases (Spring 2010) Inf 202 Introduction to Data and Databases (Spring 2010) Jagdish S. Gangolly Informatics CCI SUNY Albany February 2, 2010 Relation Relation is a logical concept. A relation is used to represent entities

More information

OVERVIEW OF RELATIONAL DATABASES: KEYS

OVERVIEW OF RELATIONAL DATABASES: KEYS OVERVIEW OF RELATIONAL DATABASES: KEYS Keys (typically called ID s in the Sierra Database) come in two varieties, and they define the relationship between tables. Primary Key Foreign Key OVERVIEW OF DATABASE

More information

Design Pattern: Composite

Design Pattern: Composite Design Pattern: Composite Intent Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. Motivation

More information

It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek

It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek Seite 1 von 5 Issue Date: FoxTalk July 2000 It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek This month, Paul Maskens and Andy Kramek discuss the problems of validating data entry.

More information

Follow these steps to get started: o Launch MS Access from your start menu. The MS Access startup panel is displayed:

Follow these steps to get started: o Launch MS Access from your start menu. The MS Access startup panel is displayed: Forms-based Database Queries The topic presents a summary of Chapter 3 in the textbook, which covers using Microsoft Access to manage and query an Access database. The screenshots in this topic are from

More information

Chapter 11 Database Concepts

Chapter 11 Database Concepts Chapter 11 Database Concepts INTRODUCTION Database is collection of interrelated data and database system is basically a computer based record keeping system. It contains the information about one particular

More information

Chapter 12: Social Implications of IT

Chapter 12: Social Implications of IT !" #$$ %! & The final exam will be cumulative! Please also study previous midterm reviews and exams and other material from the beginning of the course. For instance: Six Steps in the Debugging Process

More information

ER Modeling Data Modeling and the Entity-Relationship (ER) Diagram Pg 1

ER Modeling Data Modeling and the Entity-Relationship (ER) Diagram Pg 1 ER Modeling Data Modeling and the Entity-Relationship (ER) Diagram Pg 1 Data Modeling and the Entity-Relationship (ER) Diagram Ray Lockwood Points: The Entity-Relationship (ER) Diagram is seen by various

More information

A Brief Writer s Guide to Book Indexing

A Brief Writer s Guide to Book Indexing A Brief Writer s Guide to Book Indexing From Potomac Indexing, LLC I know. You (writer about to publish a non- fiction book of more than 100 pages) are so tired of looking at your text over and over, assessing

More information

MITOCW watch?v=rvrkt-jxvko

MITOCW watch?v=rvrkt-jxvko MITOCW watch?v=rvrkt-jxvko The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

Manually Manage Music And Videos Is Checked Under Device Options In Itunes

Manually Manage Music And Videos Is Checked Under Device Options In Itunes Manually Manage Music And Videos Is Checked Under Device Options In Itunes on the summary tab, click Manually manage videos option. Turn off sync music. delete music from ios device in usage_ manage storage.

More information

In this tutorial we are going to take a look at the CentovaCast 3 control panel running ShoutCast 2 and explain some of the basic features.

In this tutorial we are going to take a look at the CentovaCast 3 control panel running ShoutCast 2 and explain some of the basic features. CentovaCast 3 - Shoutcast2 Overview In this tutorial we are going to take a look at the CentovaCast 3 control panel running ShoutCast 2 and explain some of the basic features. Details Once you purchase

More information

Microsoft. Student Edition. The Richard Stockton College of New Jersey. Computer Courseware

Microsoft. Student Edition. The Richard Stockton College of New Jersey. Computer Courseware Microsoft Establishing a Relationship in Access 2002 Student Edition The Richard Stockton College of New Jersey Computer Courseware CustomGuide.com granted to Computer and Telecommunication Services a

More information

Basant Group of Institution

Basant Group of Institution Basant Group of Institution Visual Basic 6.0 Objective Question Q.1 In the relational modes, cardinality is termed as: (A) Number of tuples. (B) Number of attributes. (C) Number of tables. (D) Number of

More information

Mahathma Gandhi University

Mahathma Gandhi University Mahathma Gandhi University BSc Computer science III Semester BCS 303 OBJECTIVE TYPE QUESTIONS Choose the correct or best alternative in the following: Q.1 In the relational modes, cardinality is termed

More information

Post Experiment Interview Questions

Post Experiment Interview Questions Post Experiment Interview Questions Questions about the Maximum Problem 1. What is this problem statement asking? 2. What is meant by positive integers? 3. What does it mean by the user entering valid

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

1 of 5 5/11/2006 12:10 AM CS 61A Spring 2006 Midterm 2 solutions 1. Box and pointer. Note: Please draw actual boxes, as in the book and the lectures, not XX and X/ as in these ASCII-art solutions. Also,

More information

Architecture of a Database Management System Ray Lockwood

Architecture of a Database Management System Ray Lockwood Assorted Topics Architecture of a Database Management System Pg 1 Architecture of a Database Management System Ray Lockwood Points: A DBMS is divided into modules or layers that isolate functionality.

More information

16/06/56. Databases. Databases. Databases The McGraw-Hill Companies, Inc. All rights reserved.

16/06/56. Databases. Databases. Databases The McGraw-Hill Companies, Inc. All rights reserved. Distinguish between the physical and logical views of data. Describe how data is organized: characters, fields, records, tables, and databases. Define key fields and how they are used to integrate data

More information

Databases The McGraw-Hill Companies, Inc. All rights reserved.

Databases The McGraw-Hill Companies, Inc. All rights reserved. Distinguish between the physical and logical views of data. Describe how data is organized: characters, fields, records, tables, and databases. Define key fields and how they are used to integrate data

More information

CIS 45, The Introduction. What is a database? What is data? What is information?

CIS 45, The Introduction. What is a database? What is data? What is information? CIS 45, The Introduction I have traveled the length and breadth of this country and talked with the best people, and I can assure you that data processing is a fad that won t last out the year. The editor

More information

Relational Databases. Charles Severance

Relational Databases. Charles Severance Relational Databases Charles Severance Unless otherwise noted, the content of this course material is licensed under a Creative Commons Attribution 3.0 License. http://creativecommons.org/licenses/by/3.0/.

More information

COMM 391. Objectives. Introduction to Microsoft Access. What is in an Access database file? Introduction to Microsoft Access 2010

COMM 391. Objectives. Introduction to Microsoft Access. What is in an Access database file? Introduction to Microsoft Access 2010 Objectives COMM 391 Introduction to Management Information Systems Introduction to Microsoft Access 2010 Describe the major objects in Access database. Define field, record, table and database. Navigate

More information

Access Intermediate

Access Intermediate Access 2010 - Intermediate (103-134) Building Access Databases Notes Quick Links Building Databases Pages AC52 AC56 AC91 AC93 Building Access Tables Pages AC59 AC67 Field Types Pages AC54 AC56 AC267 AC270

More information

INFO 1103 Homework Project 2

INFO 1103 Homework Project 2 INFO 1103 Homework Project 2 February 15, 2019 Due March 13, 2019, at the end of the lecture period. 1 Introduction In this project, you will design and create the appropriate tables for a version of the

More information

Designing a Database -- Understanding Relational Design

Designing a Database -- Understanding Relational Design Designing a Database -- Understanding Relational Design Contents Overview The Database Design Process Steps in Designing a Database Common Design Problems Determining the Purpose Determining the Tables

More information

Physical Design of Relational Databases

Physical Design of Relational Databases Physical Design of Relational Databases Chapter 8 Class 06: Physical Design of Relational Databases 1 Physical Database Design After completion of logical database design, the next phase is the design

More information

Instructor: Craig Duckett. Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables

Instructor: Craig Duckett. Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables Instructor: Craig Duckett Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables 1 Assignment 1 is due LECTURE 5, Tuesday, April 10 th, 2018 in StudentTracker by MIDNIGHT MID-TERM

More information

The Relational Model. Week 2

The Relational Model. Week 2 The Relational Model Week 2 1 Relations A relation is a more concrete construction, of something we have seen before, the ER diagram. name S.S.N students street city A relation is (just!) a table! We will

More information

Tracking changes in Word 2007 Table of Contents

Tracking changes in Word 2007 Table of Contents Tracking changes in Word 2007 Table of Contents TRACK CHANGES: OVERVIEW... 2 UNDERSTANDING THE TRACK CHANGES FEATURE... 2 HOW DID THOSE TRACKED CHANGES AND COMMENTS GET THERE?... 2 WHY MICROSOFT OFFICE

More information

DOWNLOAD PDF LEARN TO USE MICROSOFT ACCESS

DOWNLOAD PDF LEARN TO USE MICROSOFT ACCESS Chapter 1 : Microsoft Online IT Training Microsoft Learning Each video is between 15 to 20 minutes long. The first one covers the key concepts and principles that make Microsoft Access what it is, and

More information

More about Databases. Topics. More Taxonomy. And more Taxonomy. Computer Literacy 1 Lecture 18 30/10/2008

More about Databases. Topics. More Taxonomy. And more Taxonomy. Computer Literacy 1 Lecture 18 30/10/2008 Topics More about Databases Computer Literacy Lecture 8 30/0/008 Terminology What s a database for again? Relational Database Model Samples Database Integrity Data mining More Taxonomy According to more

More information

Partitioning Shines in PostgreSQL 11

Partitioning Shines in PostgreSQL 11 Partitioning Shines in PostgreSQL 11 Amit Langote, NTT OSS Center PGConf.ASIA, Tokyo Dec 11, 2018 About me Amit Langote Work at NTT OSS Center developing PostgreSQL Contributed mainly to table partitioning

More information

File Processing Approaches

File Processing Approaches Relational Database Basics Review Overview Database approach Database system Relational model File Processing Approaches Based on file systems Data are recorded in various types of files organized in folders

More information

Keys are fields in a table which participate in below activities in RDBMS systems:

Keys are fields in a table which participate in below activities in RDBMS systems: Keys are fields in a table which participate in below activities in RDBMS systems: 1. To create relationships between two tables. 2. To maintain uniqueness in a table. 3. To keep consistent and valid data

More information

CMPT 354 Database Systems I

CMPT 354 Database Systems I CMPT 354 Database Systems I Chapter 2 Entity Relationship Data Modeling Data models A data model is the specifications for designing data organization in a system. Specify database schema using a data

More information

OBJECTIVES. How to derive a set of relations from a conceptual data model. How to validate these relations using the technique of normalization.

OBJECTIVES. How to derive a set of relations from a conceptual data model. How to validate these relations using the technique of normalization. 7.5 逻辑数据库设计 OBJECTIVES How to derive a set of relations from a conceptual data model. How to validate these relations using the technique of normalization. 2 OBJECTIVES How to validate a logical data model

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

Lecture 3. Wednesday, September 3, 2014

Lecture 3. Wednesday, September 3, 2014 Lecture 3 Wednesday, September 3, 2014 ER Diagrams Last week, we covered ER diagrams which allow us to show entities, attributes, and relationships The last component of an ER diagram is the cardinality

More information

The data structures of the relational model Attributes and domains Relation schemas and database schemas

The data structures of the relational model Attributes and domains Relation schemas and database schemas The data structures of the relational model Attributes and domains Relation schemas and database schemas databases First normal form (1NF) Running Example Pubs-Drinkers-DB: Pubs (name, location) Drinkers

More information

Database Systems. Course Administration

Database Systems. Course Administration Database Systems ( ) September 20, 2004 Lecture #2 By Hao-hua Chu ( ) 1 Course Administration Can everyone get the textbook? HW #1 is out on the course homepage It is due one week from today. Next week

More information

Lecture2: Database Environment

Lecture2: Database Environment College of Computer and Information Sciences - Information Systems Dept. Lecture2: Database Environment 1 IS220 : D a t a b a s e F u n d a m e n t a l s Topics Covered Data abstraction Schemas and Instances

More information

A tuple is dangling if it doesn't join with any

A tuple is dangling if it doesn't join with any Outerjoin R./ S = R./Swith dangling tuples padded with nulls and included in the result. A tuple is dangling if it doesn't join with any other tuple. R = A B 1 2 3 4 S = B C 2 5 2 6 7 8 R./ S = A B C 1

More information

Chapter 6. Advanced Data Modeling. Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

Chapter 6. Advanced Data Modeling. Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel Chapter 6 Advanced Data Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel 1 In this chapter, you will learn: About the extended entity relationship (EER)

More information

Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM).

Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM). Question 1 Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM). By specifying participation conditions By specifying the degree of relationship

More information

4. Relationships, Referential Integrity, Indexes

4. Relationships, Referential Integrity, Indexes Access Basics for Programming: Relationships, Referential Integrity, Indexes Crystal Jan 8, 2008 4-1 4. Relationships, Referential Integrity, Indexes Steps to Document Table Structure using Relationship

More information

DW DIGs Model Windows Tricks

DW DIGs Model Windows Tricks Window Menu 1. Window > Cascade Windows All open windows that aren't minimized at the bottom of the screen will be offset diagonally so you can see the title bar of each. 2. Window > Tile Windows All open

More information

Entity Attribute STUDENT TABLE tuples single domain

Entity Attribute STUDENT TABLE tuples single domain Objectives Computer Science 202 Database Systems: Relational Database Model To learn the basic relational database components and concepts. To become familiar with the relational table's components and

More information

CS352 Lecture - Data Models

CS352 Lecture - Data Models CS352 Lecture - Data Models Last revised July 24, 2008 Objectives: 1. To introduce the entity-relationship model 2. To note the distinctive features of the hierarchical and network models. 3. To introduce

More information

Turn-by-Turn Mapping GPS and MP3 Player Quick Start Guide

Turn-by-Turn Mapping GPS and MP3 Player Quick Start Guide Pub. 988-0148-532 Turn-by-Turn Mapping GPS and MP3 Player Quick Start Guide Copyright 2005 Lowrance Electronics, Inc. All rights reserved. No part of this manual may be copied, reproduced, republished,

More information

Er Diagram Exercises. Exercise1. Draw an ER diagram for the following application from the manufacturing industry.

Er Diagram Exercises. Exercise1. Draw an ER diagram for the following application from the manufacturing industry. Er Diagram Exercises Exercise1 Draw an ER diagram for the following application from the manufacturing industry. 1. Each supplier has a unique name, and located in a city. 2. Each part has a unique number.

More information

MITOCW watch?v=4dj1oguwtem

MITOCW watch?v=4dj1oguwtem MITOCW watch?v=4dj1oguwtem PROFESSOR: So it's time to examine uncountable sets. And that's what we're going to do in this segment. So Cantor's question was, are all sets the same size? And he gives a definitive

More information

WIFIRANGER TROUBLESHOOTING POSSIBLE CAUSES

WIFIRANGER TROUBLESHOOTING POSSIBLE CAUSES Rev 1-8/1/2013 WIFIRANGER TROUBLESHOOTING No IP Address from WiFi Network DESCRIPTION The WiFiRanger is told to connect to a WiFi network but gets the message No IP Address in it s WiFi status box on the

More information

MITOCW watch?v=hverxup4cfg

MITOCW watch?v=hverxup4cfg MITOCW watch?v=hverxup4cfg PROFESSOR: We've briefly looked at graph isomorphism in the context of digraphs. And it comes up in even more fundamental way really for simple graphs where the definition is

More information

Principles of Algorithm Design

Principles of Algorithm Design Principles of Algorithm Design When you are trying to design an algorithm or a data structure, it s often hard to see how to accomplish the task. The following techniques can often be useful: 1. Experiment

More information

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering Fall 2011 ECOM 4113: Database System Lab Eng.

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering Fall 2011 ECOM 4113: Database System Lab Eng. Islamic University of Gaza Faculty of Engineering Department of Computer Engineering Fall 2011 ECOM 4113: Database System Lab Eng. Ahmed Abumarasa Database Lab Lab 2 Database Table Introduction: The previous

More information

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 [talking head] This lecture we study theory design and implementation. Programmers have two roles to play here. In one role, they

More information

Relational Data Model

Relational Data Model Relational Data Model 1. Relational data model Information models try to put the real-world information complexity in a framework that can be easily understood. Data models must capture data structure

More information

Relationship Manager

Relationship Manager Relationship Manager Graeme Geldenhuys 2009-07-10 In this article we are going to look at the problem surrounding object oriented programming and object relationships. We will look at the traditional way

More information

A Flat file database. Problems with a flat file database (data redundancy)

A Flat file database. Problems with a flat file database (data redundancy) Data capture Before you can create a database, you need to collect data. This is known as data capture. One of the most common ways is to use and optical mark reader (OMR). An OMR sensor is used for marking

More information

MITOCW watch?v=flgjisf3l78

MITOCW watch?v=flgjisf3l78 MITOCW watch?v=flgjisf3l78 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

Running Example Tables name location

Running Example Tables name location Running Example Pubs-Drinkers-DB: The data structures of the relational model Attributes and domains Relation schemas and database schemas databases Pubs (name, location) Drinkers (name, location) Sells

More information

CIS Slightly-different version of Week 10 Lab, also intro to SQL UPDATE and DELETE, and more

CIS Slightly-different version of Week 10 Lab, also intro to SQL UPDATE and DELETE, and more CIS 315 - Week 10 Lab Exercise p. 1 Sources: CIS 315 - Slightly-different version of Week 10 Lab, 10-27-09 more SELECT operations: UNION, INTERSECT, and MINUS, also intro to SQL UPDATE and DELETE, and

More information

SQL Server. Lecture3 Cascading referential integrity constraint

SQL Server. Lecture3 Cascading referential integrity constraint SQL Server Lecture3 Cascading referential integrity constraint insert into tblperson values (4,'May','Ma@m.com',4) Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the FOREIGN KEY

More information

Asteroid Destroyer How it Works

Asteroid Destroyer How it Works Asteroid Destroyer How it Works This is a summary of some of the more advance coding associated with the Asteroid Destroyer Game. Many of the events with in the game are common sense other than the following

More information

Part 5: Introduction to Logical Design

Part 5: Introduction to Logical Design 5. Introduction to Logical Design 5-1 Part 5: Introduction to Logical Design References: Elmasri/Navathe:Fundamentals of Database Systems, 3rd Edition, 1999. Chapter 3, Data Modeling Using the Entity-Relationship

More information

Chapter 12: Indexing and Hashing. Basic Concepts

Chapter 12: Indexing and Hashing. Basic Concepts Chapter 12: Indexing and Hashing! Basic Concepts! Ordered Indices! B+-Tree Index Files! B-Tree Index Files! Static Hashing! Dynamic Hashing! Comparison of Ordered Indexing and Hashing! Index Definition

More information

Back to the main page Back to the Tutorial Page Digital Audio Rules of Audacity Setup, Audio Import and Playback Recording with Audacity

Back to the main page Back to the Tutorial Page Digital Audio Rules of Audacity Setup, Audio Import and Playback Recording with Audacity Back to the main page Back to the Tutorial Page Digital Audio Rules of Audacity Setup, Audio Import and Playback Recording with Audacity Tutorial - I.Basics Part 4 - Recording with Audacity - Part 4 1.

More information

OVERVIEW OF DATABASE DEVELOPMENT

OVERVIEW OF DATABASE DEVELOPMENT DATABASE SYSTEMS I WEEK 2: THE ENTITY-RELATIONSHIP MODEL OVERVIEW OF DATABASE DEVELOPMENT Requirements Analysis / Ideas High-Level Database Design Conceptual Database Design / Relational Database Schema

More information

SQL - Subqueries and. Schema. Chapter 3.4 V4.0. Napier University

SQL - Subqueries and. Schema. Chapter 3.4 V4.0. Napier University SQL - Subqueries and Chapter 3.4 V4.0 Copyright @ Napier University Schema Subqueries Subquery one SELECT statement inside another Used in the WHERE clause Subqueries can return many rows. Subqueries can

More information

The following content is provided under a Creative Commons license. Your support

The following content is provided under a Creative Commons license. Your support MITOCW Lecture 23 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality, educational resources for free. To make a

More information

Microsoft Access Description

Microsoft Access Description Go To Page.. Go!! Microsoft Word Microsoft PowerPoint Microsoft Office Main Microsoft Excel Microsoft Publisher Introduction into Microsoft Access Starting Up Microsoft Access Creating New, and Opening

More information