Relational Databases.

Slides:



Advertisements
Similar presentations
The Relational Model J.G. Zheng May 15 th Introduction Edgar F. Codd, 1970 One sentence to explain relational database model: Data are organized.
Advertisements

Chapter 10: Designing Databases
What is a Database By: Cristian Dubon.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
3-1 Chapter 3 Data and Knowledge Management
Designing a Database Unleashing the Power of Relational Database Design.
Keys Chapter 8 Database Design for Mere Mortals. Why Keys Are Important They ensure that each record in a table can be properly identified. They help.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 13 Database Management Systems: Getting Data Together.
RAJIKA TANDON DATABASES CSE 781 – Database Management Systems Instructor: Dr. A. Goel.
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
CTFS Workshop Shameema Esufali Suzanne Lao Data coordinators and technical resources for the network
Copyright © Curt Hill The Relational Model of Database Basic organization and terms.
1 Outline  What is a Primary Key?  AutoNumber primary keys  Single-field primary keys  Composite-field primary key  About Foreign Keys  Database.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design.
Access Review. Access Access is a database application A database is a collection of records and files organized for a particular purpose Access supports.
Component 4/Unit 6b Topic II Relational Databases Keys and relationships Data modeling Database acquisition Database Management System (DBMS) Database.
Relational Theory and Design
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
HO 1 & 2 - Check Have you: Created a new Access database –Hands-on 1 Created a Suppliers table in design view –Hands-on 2 Downloaded and unzipped the two.
CTFS Workshop Shameema Esufali Asian data coordinator and technical resource for the network
Understand Primary, Foreign, and Composite Keys Database Administration Fundamentals LESSON 4.2.
Instructor: Pavlos Pavlikas1 How Data is Stored Chapter 8.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
Chapter 3: Relational Databases
Database Overview What is a database? What types of databases are there? How are databases more powerful than spreadsheets?
1 Microsoft Access 2002 Tutorial 2 – Creating And Maintaining A Database.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
1 SQL SERVER 2005 Express CE-105 SPRING 2007 Engr. Faisal ur Rehman.
1 Finding Your Way Through a Database Exploring Microsoft Office Access.
Databases and DBMSs Todd S. Bacastow January
CompSci 280 S Introduction to Software Development
INTRODUCTION TO DATABASES (MICROSOFT ACCESS)
Logical Database Design and the Rational Model
Introducing Databases
Chapter 4 Logical Database Design and the Relational Model
Chapter 4: Logical Database Design and the Relational Model
Databases – Exam questions
SQL Relational Database Project
Client/Server Databases and the Oracle 10g Relational Database
COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI
COP 4540 Database Management
Objectives Query for top values Create a parameter query
Database Keys and Constraints
CIS 155 Table Relationship
Design a Relational Database Identify Database Purpose
Microsoft Access 2003 Illustrated Complete
Database Management  .
Databases A brief introduction….
Databases and Information Management
CTFS Asia Region Workshop 2014
What is a Database and Why Use One?
Normalization Referential Integrity
(Winter 2017) Instructor: Craig Duckett
What is a Database? A collection of data organized in a manner that allows access, retrieval, and use of that data.
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Databases and Information Management
Data Management Innovations 2017 High level overview of DB
Lingma Acheson Department of Computer and Information Science IUPUI
Database Design Hacettepe University
G061 - Data Dictionary.
Microsoft Access Date.
Presentation transcript:

Relational Databases

Why Databases As programs get larger, data becomes more important Data is entities and relationships Real-world processes involve complex data interaction

Structure of a Database Record – one discreet entity Field – one piece of data Table – series of like records

Record Represents some entity Consists of many details All details refer to same record

Field Specific data elements Has a name, length, type, value Sometimes length is assumed Each record has same field definitions, but different values

Table A series of records following the same definition All records should describe same kind of thing Each record is a different instance of that thing

Database A series of tables each defining different entities The relationships between those entities Ancillary files, indices, views

Primary Keys A primary key is a field or group of fields that uniquely identifies a record. A primary key comprised of two or more fields is called a composite primary key. Every table must have a primary key! The most important key in a table: Uniquely identifies a specific record throughout a database Identifies a specific table throughout the database Enforces table-level integrity Helps to establish relationships between tables

Foreign Keys A foreign key is important when establishing relationships between tables. To create a foreign key, you would take a primary key from one table and incorporate it in a second table. In the second table, the key becomes a foreign key. Foreign keys enforce relationship-level integrity – values in one table's foreign key field must match exactly with the corresponding values of a second table's primary key field.

Table Relationships We categorize table relationships in the Relational Model as follows: One-to-One (1:1) One-to-Many (1:N) Many-to-Many (N:N) To establish a relationship between tables, we need to match values of a shared field.

One-To-One Relationships (1:1) A record in one table (a parent table) is related to one and only one record in a second table (a child table). A record in a second table (the child table) is related to one and only one record in the first table (the parent table). We create a 1:1 relationship by copying the primary key of a parent table into a child table, where it becomes a foreign key. This type of relationship is unique because both tables share the same primary key. The primary key in the child table serves both as that table's primary key and a foreign key .

One-To-Many Relationships (1:N) A record in one table (a parent table) can be related to many records in a second table (a child table). A single record in the child table is related to one and only one record in the parent table. We create a 1:N relationship by copying the primary key of a parent table into a child table, where it becomes a foreign key. This type of relationship is the most common type of relationship in the relational database model.

Many-To-Many Relationships (N:N) A record in one table can be related to many records in a second table. A single record in the second table can be related to many records in the parent table. We create a N:N relationship by copying the primary keys of a each table into a third table, called a linking (associative) table. Together, the copied keys form a composite primary key. Individually, they serve as foreign keys for the other table.

Example of N:N Relationship

SQL Structured Query Language Uniform system for defining, querying data Used by many programming languages and db tools