A hypothetical M:M student schedule example

Size: px
Start display at page:

Download "A hypothetical M:M student schedule example"

Transcription

1 A hypothetical : student schedule example We are interested in creating a relationship between two tables: Student and Class Section. We want to be able to be able to have students register for different class sections for scheduling purposes and need to assign individual students to individual class sections. Using a relational DB approach, we create separate tables for each group of related entities one table contains all the student information (the attributes dealing specifically with students) and one table containing all the class section information (attributes dealing specifically with class section). We want to be able to update the information in one table without having to manually change the information in the other table. For example, using tables I can add, delete, or edit student information and not have to change any information in the course section table. Student Table Student ID LastName FirstName Address Concentration 234 Jones Sally 2 ain Street Finance 256 Smith Bob 689 South Street IS 6532 Simpson Bart 75 Springfield Lane Accounting 2233 Winter Kelly 987 ain Street Finance denotes that there can be, or are, more entities Primary Key (PK) every table UST have a PK attribute. Each row in each table UST have a unique PK value that uniquely IDs each and every record. It cannot be repeated or left blank. CRN Designation Section CourseName BSAD 4 A anagement Information Systems BSAD 4 B anagement Information Systems BSAD 4 C anagement Information Systems BSAD 80 A anagerial Finance BSAD 80 B anagerial Finance BSAD 90 A Business Policy denotes that there can be, or are, more entities To create a relationship between the two tables (link the tables), we must create a foreign key (FK) attribute. We do this by using the primary key attribute from the table on the side of the relationship as a foreign key in the table on the many side of the relationship. The connectivity of the relationship (whether it is :, :, or :) and which side of the relationship is the side and which side is the many side depends on the actual or practical relationship between the two tables. The relationship depends on how things work or is structured in reality.

2 I will show three different examples for illustration (only is correct):. : 2. : 3. : NOTE: for our purposes in this class, the FK always goes on the many side of a : relationship. : (a one-to-many relationship) with a class section containing many students CLASS SECTION Contains Registers for STUDENT Each class section can contain,2, n (many) instances of a student entity (the individual students). THIS PART OF THE RELATIONSHIP AKES SENSE Each student can register for ONLY one instance of a class section entity. THIS PART OF THE RELATIONSHIP IS NOT WHAT WE WANT! IT AKES NO SENSE We create a relationship by using the primary key (PK) attribute from the one side of the relationship (course table) as a foreign key (FK) attribute on the many side of the relationship (student table). CRN (course reference number) is the PK attribute in the Class Section table. We repeat that attribute in the Student Table. So, CRN becomes the Foreign Key (FK) in the Student table. Student Table Student LastName FirstName Address Concentration CRN ID 234 Jones Sally 2 ain Street Finance Smith Bob 689 South Street IS Simpson Bart 75 Springfield Lane Accounting Winter Kelly 987 ain Street Finance CRN Designation Section CourseName BSAD 4 A anagement Information Systems BSAD 4 B anagement Information Systems BSAD 4 C anagement Information Systems BSAD 80 A anagerial Finance BSAD 80 B anagerial Finance BSAD 90 A Business Policy RED = PKs, BLUE = FK 2

3 Using the : relationship the PHYSICAL STRUCTURE of the database allows each student in the Student table to only register for one course. In the Student table there is no more room to add additional courses for each student. Why don t we just add more CRN fields? What is the problem with this approach? Student Table Student LastName FirstName Address Concentration CRN# CRN#2 ID 234 Jones Sally 2 ain Street Finance Smith Bob 689 South Street IS Simpson Bart 75 Springfield Accounting Lane 2233 Winter Kelly 987 ain Street Finance Let s switch the relationship around and look at the reverse situation: : (still a : relationship, we are just switching which table is on the one side and which table is on the many side) CLASS SECTION Contains Registers for STUDENT Each class section can contain ONLY one instance of student. THIS PART OF THE RELATIONSHIP IS NOT WHAT WE WANT! IT AKES NO SENSE Each student can register for,2, n (many) instances of class section. THIS PART OF THE RELATIONSHIP AKES SENSE Each table still has the same PK, but now a FK goes in the Class Section table (it is now on the many side of the relationship. CRN Student Designation Section CourseName ID BSAD 4 A anagement Information Systems BSAD 4 B anagement Information Systems BSAD 4 C anagement Information Systems BSAD 80 A anagerial Finance BSAD 80 B anagerial Finance BSAD 90 A Business Policy 3

4 Student Table Student ID LastName FirstName Address Concentration 234 Jones Sally 2 ain Street Finance 256 Smith Bob 689 South Street IS 6532 Simpson Bart 75 Springfield Lane Accounting 2233 Winter Kelly 987 ain Street Finance : The correct relationship is a : relationship that allows students to register for more than one instance of class section and allows class section to contain more than one instance of a student CLASS SECTION Contains Registers for STUDENT We are NOT going to place a FK in both tables in the : case because that will still not allow us to model the relationship in an accurate way. What should be done WHEN EVER YOU HAVE A :, YOU UST CREATE A NEW TABLE (called a junction, joining, or link table) BREAK UP THE : INTO 2 SEPARATE : RELATIONSHIPS Student Can be listed on Each line lists Schedule Line Item Each line lists Can be listed on Class Section The new joining table should be named appropriately. What does the table do? The table provides a line-by-line matching of one instance of class section and one instance of student. The new joining table could be named Schedule Line Item because it will match one student ID with one CRN on each line of the table (a class schedule). It could also be called something like Class Section Line Item because it will give a line-byline listing of each student ID in each class section. The joining table ALWAYS provides a line-by-line matching of a single instance in one table to a single instance in another table. This works because each student ID value can be repeated many times AND each CRN value can be repeated many times using a composite PK. 4

5 Student Table Student ID LastName FirstName Address Concentration 234 Jones Sally 2 ain Street Finance 256 Smith Bob 689 South Street IS 6532 Simpson Bart 75 Springfield Lane Accounting 2233 Winter Kelly 987 ain Street Finance CRN Designation Section CourseName BSAD 4 A anagement Information Systems BSAD 4 B anagement Information Systems BSAD 4 C anagement Information Systems BSAD 80 A anagerial Finance BSAD 80 B anagerial Finance BSAD 90 A Business Policy Schedule Line Item Table Student ID CRN Schedule Line Item Table has PK and 2 FKs PK: Student_ID + CRN (this is a composite key) FK: Student_ID is the foreign key in the Schedule Line Item table to the Student table FK: CRN is the foreign key in the Schedule Line Item table to the Class Section table The Primary key for the new joining table (in this case called Schedule Line Item Table) is a COPOSITE KEY using both Student_ID and CRN together. Each field is also a Foreign Key back to the original table. THIS IS A NEW TABLE THAT IS CREATED SPECIFICALLY TO RESOLVE THE : RELATIONSHIP 5

6 The foreign keys (FK) are Student_ID from Student table and Course_ID from Course table In this case, we can use each foreign key and combine them together to make a unique COPOSITE Primary Key (PK) attribute. Alternatively, we could create a new field like Schedule Line Item ID (or something to that affect) to serve as the PK attribute. This prevents students from registering more than once for same class. Why do this? You should be able to see how flexible the Schedule Line Item Table is. This new table can be called a joining, junction, or link Table Don t repeat student or course info on multiple lines Can easily edit the joining table data without changing the student or course data 6

BSAD 141, Fall 2017 In-class ERD exercise (Tuesday, 10/24)

BSAD 141, Fall 2017 In-class ERD exercise (Tuesday, 10/24) BSAD 4, Fall 207 In-class ERD exercise (Tuesday, 0/24) Student / Course Section example: This example builds directly on the : example we discussed in class last week and is the last in-class example that

More information

Introduction to MS Access: creating tables, keys, and relationships

Introduction to MS Access: creating tables, keys, and relationships Introduction to MS Access: creating tables, keys, and relationships BSAD 141 Dave Novak Topics Covered Brief introduction to MS Access Name and save a DB file Create tables and keys Create and enforce

More information

Database Management Systems

Database Management Systems Database Management Systems Associate Professor Dr. Raed Ibraheem Hamed University of Human Development, College of Science and Technology Computer Science Department 2015 2016 Department of Computer Science

More information

Database Design. 9-2 Basic Mapping: The Transformation Process. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Design. 9-2 Basic Mapping: The Transformation Process. Copyright 2015, Oracle and/or its affiliates. All rights reserved. Database Design 9-2 Objectives This lesson covers the following objectives: Distinguish between a conceptual model and a physical model Apply terminology mapping between the two models Understand and apply

More information

Basic Mapping: The Transformation Process. Copyright 2011, Oracle. All rights reserved.

Basic Mapping: The Transformation Process. Copyright 2011, Oracle. All rights reserved. Basic Mapping: The Transformation Process Copyright 2011, Oracle. All rights reserved. What Will I Learn? Objectives In this lesson, you will learn to: Distinguish entity relationship models from database

More information

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

CSC 453 Database Technologies. Tanu Malik DePaul University

CSC 453 Database Technologies. Tanu Malik DePaul University CSC 453 Database Technologies Tanu Malik DePaul University A Data Model A notation for describing data or information. Consists of mostly 3 parts: Structure of the data Data structures and relationships

More information

Entity Relationship Diagrams and Relational DBs

Entity Relationship Diagrams and Relational DBs Entity Relationship Diagrams and Relational DBs BSAD 4 Dave Novak Topics Covered ERD (entity relationship diagram) Data Modeling Entity vs- Entity set Attribute vs- Relationship Types of attributes and

More information

In mathematical terms, the relation itself can be expressed simply in terms of the attributes it contains:

In mathematical terms, the relation itself can be expressed simply in terms of the attributes it contains: The Relational Model The relational data model organises data as 2-dimensional tables or relations. An example of one such relation would be STUDENT shown below. As we have seen in the wine list example,

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

SWEN-220 Mathematical Models of Software. Conceptual to Relational Mapping

SWEN-220 Mathematical Models of Software. Conceptual to Relational Mapping SWEN-220 Mathematical Models of Software Conceptual to Relational Mapping 1 Relational (Logical) Design Logical design is where a conceptual design is mapped to a relational schema. Entry = Conceptual

More information

Consistency The DBMS must ensure the database will always be in a consistent state. Whenever data is modified, the database will change from one

Consistency The DBMS must ensure the database will always be in a consistent state. Whenever data is modified, the database will change from one Data Management We start our studies of Computer Science with the problem of data storage and organization. Nowadays, we are inundated by data from all over. To name a few data sources in our lives, we

More information

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity COS 597A: Principles of Database and Information Systems Relational model continued Understanding how to use the relational model 1 with as weak entity folded into folded into branches: (br_, librarian,

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

CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam

CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam Question No: 1 ( Marks: 1 ) - Please choose one Which of the following is NOT a feature of Context DFD?

More information

ACS-3902 Fall Ron McFadyen 3D21 Slides are based on chapter 5 (7 th edition) (chapter 3 in 6 th edition)

ACS-3902 Fall Ron McFadyen 3D21 Slides are based on chapter 5 (7 th edition) (chapter 3 in 6 th edition) ACS-3902 Fall 2016 Ron McFadyen 3D21 ron.mcfadyen@acs.uwinnipeg.ca Slides are based on chapter 5 (7 th edition) (chapter 3 in 6 th edition) 1 The Relational Data Model and Relational Database Constraints

More information

Introduction to ERwin

Introduction to ERwin Introduction to ERwin Database Design & Modelling Hans-Petter Halvorsen, M.Sc. Software The following Editions can be downloaded for Free on Internet: CA ERwin Data Modeler Community Edition SQL Server

More information

Review. Objec,ves. Example Students Table. Database Overview 3/8/17. PostgreSQL DB Elas,csearch. Databases

Review. Objec,ves. Example Students Table. Database Overview 3/8/17. PostgreSQL DB Elas,csearch. Databases Objec,ves PostgreSQL DB Elas,csearch Review Databases Ø What language do we use to query databases? March 8, 2017 Sprenkle - CSCI397 1 March 8, 2017 Sprenkle - CSCI397 2 Database Overview Store data in

More information

Database. Quiz with Explainations. Hans-Petter Halvorsen, M.Sc.

Database. Quiz with Explainations. Hans-Petter Halvorsen, M.Sc. Database Quiz with Explainations Hans-Petter Halvorsen, M.Sc. Questions 1. What is a Database? 2. Give Examples of Systems that use a Database 3. What is DBMS? 4. Give Examples of DBMS systems? 5. We have

More information

3/3/2008. Announcements. A Table with a View (continued) Fields (Attributes) and Primary Keys. Video. Keys Primary & Foreign Primary/Foreign Key

3/3/2008. Announcements. A Table with a View (continued) Fields (Attributes) and Primary Keys. Video. Keys Primary & Foreign Primary/Foreign Key Announcements Quiz will cover chapter 16 in Fluency Nothing in QuickStart Read Chapter 17 for Wednesday Project 3 3A due Friday before 11pm 3B due Monday, March 17 before 11pm A Table with a View (continued)

More information

CS211 Lecture: Database Design

CS211 Lecture: Database Design CS211 Lecture: Database Design Objectives: last revised November 21, 2006 1. To introduce the anomalies that result from redundant storage of data 2. To introduce the notion of functional dependencies

More information

CS530 Database Architecture Models. Database Model. Prof. Ian HORROCKS. Dr. Robert STEVENS. and Design The Relational

CS530 Database Architecture Models. Database Model. Prof. Ian HORROCKS. Dr. Robert STEVENS. and Design The Relational 02 - The Relational Database Model CS530 Database Architecture Models and Design Prof. Ian HORROCKS Dr. Robert STEVENS In this Section Topics Covered The basics of the relational model in the context of

More information

MySQL. A practical introduction to database design

MySQL. A practical introduction to database design MySQL A practical introduction to database design Dr. Chris Tomlinson Bioinformatics Data Science Group, Room 126, Sir Alexander Fleming Building chris.tomlinson@imperial.ac.uk Database Classes 24/09/18

More information

CS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010

CS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010 CS403- Database Management Systems Solved MCQS From Midterm Papers April 29,2012 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 CS403- Database Management Systems MIDTERM EXAMINATION - Spring

More information

course 3 Levels of Database Design CSCI 403 Database Management Mines Courses ERD Attributes Entities title 9/26/2018

course 3 Levels of Database Design CSCI 403 Database Management Mines Courses ERD Attributes Entities title 9/26/2018 3 Levels of Database Design CSCI 403 Database Management 13 Database Modeling with Entity-Relationship Diagrams Conceptual (this lecture) Understand data entities & relationships between them Communication

More information

Practice Problem for the Bonus Part of Take Home Assignment 2

Practice Problem for the Bonus Part of Take Home Assignment 2 Practice Problem for the Bonus Part of Take Home Assignment 2 The table titled Student given below stores a set of attributes found in a University database. The following conditions apply: Each student

More information

MIS2502: Data Analytics Relational Data Modeling. Jing Gong

MIS2502: Data Analytics Relational Data Modeling. Jing Gong MIS2502: Data Analytics Relational Data Modeling Jing Gong gong@temple.edu http://community.mis.temple.edu/gong Where we are Now we re here Data entry Transactional Database Data extraction Analytical

More information

CSC 337. Multi-table SQL Queries (Joins) Rick Mercer, Marty Stepp

CSC 337. Multi-table SQL Queries (Joins) Rick Mercer, Marty Stepp CSC 337 Multi-table SQL Queries (Joins) Rick Mercer, Marty Stepp Related tables and keys for Database simpsons id name email 123 Bart bart@fox.com 456 Milhouse milhouse@fox.com 888 Lisa lisa@fox.com 404

More information

Normalization (1) IT 5101 Introduction to Database Systems. J.G. Zheng Fall 2011

Normalization (1) IT 5101 Introduction to Database Systems. J.G. Zheng Fall 2011 Normalization (1) IT 5101 Introduction to Database Systems J.G. Zheng Fall 2011 Overview What is normalization? What are the normal forms? How to normalize relations? 2 Two Basic Ways To Design Tables

More information

Database Views & Stored Procedures. Hans-Petter Halvorsen, M.Sc.

Database Views & Stored Procedures. Hans-Petter Halvorsen, M.Sc. Database Views & Stored Procedures Hans-Petter Halvorsen, M.Sc. SQL Server Hans-Petter Halvorsen, M.Sc. Microsoft SQL Server 3 1 2 Your SQL Server Your Tables Your Database 4 Write your Query here 5 The

More information

QUETZALANDIA.COM. 5. Data Manipulation Language

QUETZALANDIA.COM. 5. Data Manipulation Language 5. Data Manipulation Language 5.1 OBJECTIVES This chapter involves SQL Data Manipulation Language Commands. At the end of this chapter, students should: Be familiar with the syntax of SQL DML commands

More information

CS 275 Final Project (50pts Total)

CS 275 Final Project (50pts Total) CS 275 Final Project (50pts Total) Solve the following problems and save your queries and scripts in APEX and in a Word file. Name your saved file in APEX CS275FinalProj. Save your word file as follows:

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

Networks and Web for Health Informatics (HINF 6220)

Networks and Web for Health Informatics (HINF 6220) Networks and Web for Health Informatics (HINF 6220) Tutorial #1 Raheleh Makki Email: niri@cs.dal.ca Tutorial Class Timings Tuesday & Thursday 4:05 5:25 PM Course Outline Database Web Programming SQL PHP

More information

CSE 154 LECTURE 14: MULTI-TABLE SQL QUERIES (JOINS )

CSE 154 LECTURE 14: MULTI-TABLE SQL QUERIES (JOINS ) CSE 154 LECTURE 14: MULTI-TABLE SQL QUERIES (JOINS ) Exceptions for errors $db = new PDO("mysql:dbname=imdb_small", "jessica", "guinness"); $db->setattribute(pdo::attr_errmode, PDO::ERRMODE_EXCEPTION);

More information

Views and Virtual Tables

Views and Virtual Tables Views and Virtual Tables VIEWS Views CREATE OR REPLACE VIEW CSstudents AS SELECT * FROM student WHERE Program = 'COMP-SCI'; SELECT * FROM CSstudents; base tables (CREATE TABLE) stored in database views

More information

Database Systems Relational Model. A.R. Hurson 323 CS Building

Database Systems Relational Model. A.R. Hurson 323 CS Building Relational Model A.R. Hurson 323 CS Building Relational data model Database is represented by a set of tables (relations), in which a row (tuple) represents an entity (object, record) and a column corresponds

More information

Database Systems. S. Adams. Dilbert. Available: Hans-Petter Halvorsen

Database Systems. S. Adams. Dilbert. Available:  Hans-Petter Halvorsen Database Systems S. Adams. Dilbert. Available: http://dilbert.com Hans-Petter Halvorsen Old fashion Database (Data-storage) Systems Not too long ago, this was the only data-storage device most companies

More information

Database Design. 9-3 Relationship Mapping. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Design. 9-3 Relationship Mapping. Copyright 2015, Oracle and/or its affiliates. All rights reserved. Database Design 9-3 Objectives This lesson covers the following objectives: Apply the rule of relationship mapping to correctly transform 1:M and barred relationships Apply the rule of relationship mapping

More information

Ch 9: Mapping EER to Relational. Follow a seven-step algorithm to convert the basic ER model constructs into relations steps 1-7

Ch 9: Mapping EER to Relational. Follow a seven-step algorithm to convert the basic ER model constructs into relations steps 1-7 Ch 9: Mapping EER to Relational Follow a seven-step algorithm to convert the basic ER model constructs into relations steps 1-7 Additional steps for EER model for specialization/generalization steps 8a

More information

King Fahd University of Petroleum and Minerals

King Fahd University of Petroleum and Minerals 1 King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 334: Database Systems Semester 041 Major Exam 1 18% ID: Name: Section: Grades Section Max Scored A 5 B 25

More information

COMPUTER SCIENCE. ATAR course examination Marking Key

COMPUTER SCIENCE. ATAR course examination Marking Key COMPUTER SCIENCE ATAR course examination 2016 Marking Key Marking keys are an explicit statement about what the examining panel expect of candidates when they respond to particular examination items. They

More information

Database Design and Administration for OnBase WorkView Solutions. Mike Martel Senior Project Manager

Database Design and Administration for OnBase WorkView Solutions. Mike Martel Senior Project Manager Database Design and Administration for OnBase WorkView Solutions Mike Martel Senior Project Manager 1. Solution Design vs. Database Design Agenda 2. Data Modeling/Design Concepts 3. ERD Diagramming Labs

More information

MIS2502: Data Analytics Relational Data Modeling. Jing Gong

MIS2502: Data Analytics Relational Data Modeling. Jing Gong MIS2502: Data Analytics Relational Data Modeling Jing Gong gong@temple.edu http://community.mis.temple.edu/gong Where we are Now we re here Data entry Transactional Database Data extraction Analytical

More information

SQL Server and SQL Structured Query Language

SQL Server and SQL Structured Query Language SQL Server and SQL Structured Query Language Step by step Exercises Hans-Petter Halvorsen Database Systems Hans-Petter Halvorsen, M.Sc. Database Systems A Database is a structured way to store lots of

More information

Successmaker Student and Teacher Imports

Successmaker Student and Teacher Imports Successmaker 2011 Student and Teacher Imports First Get teacher names to Import Go to: http://dev1.escambia.k12.fl.usescambia Click on List All the Records in the Employee Database Group Choose Instructional

More information

MIS 2223 Bypass Exam Office 2016 Sample Exercises

MIS 2223 Bypass Exam Office 2016 Sample Exercises MIS 2223 Bypass Exam Office 2016 Sample Exercises Assignment One Microsoft Word 2016 Your MIS 2223 instructor would like you to format a short research paper using MLA format, which is standard for research

More information

Copyright 2009 Labyrinth Learning Not for Sale or Classroom Use LESSON 1. Designing a Relational Database

Copyright 2009 Labyrinth Learning Not for Sale or Classroom Use LESSON 1. Designing a Relational Database LESSON 1 By now, you should have a good understanding of the basic features of a database. As you move forward in your study of Access, it is important to get a better idea of what makes Access a relational

More information

Database Foundations. 5-1 Mapping Entities and Attributes. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Foundations. 5-1 Mapping Entities and Attributes. Copyright 2015, Oracle and/or its affiliates. All rights reserved. Database Foundations 5-1 Road Map You are here Mapping Entities and Attributes Mapping Primary and Foreign Keys 3 Objectives This lesson covers the following objectives: Describe why you need to create

More information

Weak Entity Sets. A weak entity is an entity that cannot exist in a database unless another type of entity also exists in that database.

Weak Entity Sets. A weak entity is an entity that cannot exist in a database unless another type of entity also exists in that database. Weak Entity Sets A weak entity is an entity that cannot exist in a database unless another type of entity also exists in that database. Weak entity meets two conditions Existence-dependent Cannot exist

More information

Relational terminology. Databases - Sets & Relations. Sets. Membership

Relational terminology. Databases - Sets & Relations. Sets. Membership Relational terminology Databases - & Much of the power of relational databases comes from the fact that they can be described analysed mathematically. In particular, queries can be expressed with absolute

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

HOW TO PERFORM A MAIL MERGE (Microsoft Office 2003)

HOW TO PERFORM A MAIL MERGE (Microsoft Office 2003) HOW TO PERFORM A MAIL MERGE (Microsoft Office 2003) I. Prepare your materials A. Have a form letter written with space left empty for the address and name (see the Guide to Resumes and Cover Letters, available

More information

A practical introduction to database design

A practical introduction to database design A practical introduction to database design Dr. Chris Tomlinson Bioinformatics Data Science Group, Room 126, Sir Alexander Fleming Building chris.tomlinson@imperial.ac.uk Computer Skills Classes 17/01/19

More information

Entity-Relationship Model &

Entity-Relationship Model & Entity-Relationship Model & IST 210 Diagram Todd S. Bacastow IST 210: Organization of data 2/1/2004 1 Design Principles Setting client has (possibly vague) idea of what he/she wants. YOUR task must design

More information

Attributes. Entity-Relationship Model (ERM) IV. Entity Relationship Modeling. Entities and Attributes: Chen and Crow s Foot

Attributes. Entity-Relationship Model (ERM) IV. Entity Relationship Modeling. Entities and Attributes: Chen and Crow s Foot Entity-Relationship odel (ER) IV. Entity Relationship odeling Basis of an Entity-Relationship Diagram (ERD) A design technique Diagrams entities sets (with attributes) and the relationship between the

More information

Introduction to Databases

Introduction to Databases Introduction to Databases Abou Bakar Kaleem 1 Overview - Database - Relational Databases - Introduction to SQL Introduction to Databases 2 1 Database (1) Database : - is a collection of related data -

More information

L12: ER modeling 5. CS3200 Database design (sp18 s2) 2/22/2018

L12: ER modeling 5. CS3200 Database design (sp18 s2)   2/22/2018 L12: ER modeling 5 CS3200 Database design (sp18 s2) https://course.ccs.neu.edu/cs3200sp18s2/ 2/22/2018 200 Announcements! Keep bringing your name plates J Exam 1 discussion: questions on grading: Piazza,

More information

Represent entities and relations with diagrams

Represent entities and relations with diagrams LEARNING OBJECTIVES Define data modeling terms Describe E-R Model Identify entities and relations Represent entities and relations with diagrams WHAT IS DATA MODELING? A data model is a collection of concepts

More information

SUMMER EXAMINATIONS 2013

SUMMER EXAMINATIONS 2013 SUMMER EXAMINATIONS 2013 CSY202913N MODULE TITLE Database Technology 1 LEVEL TIME ALLOWED Five Two Hours Instructions to students: Enter your student number not your name on all answer booklets. You are

More information

MongoDB Schema Design

MongoDB Schema Design MongoDB Schema Design Demystifying document structures in MongoDB Jon Tobin @jontobs MongoDB Overview NoSQL Document Oriented DB Dynamic Schema HA/Sharding Built In Simple async replication setup Automated

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

The SELECT-FROM-WHERE Structure

The SELECT-FROM-WHERE Structure SQL Queries 1 / 28 The SELECT-FROM-WHERE Structure SELECT FROM WHERE From relational algebra: SELECT corresponds to projection FROM specifies

More information

CS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model

CS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model CS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model Modifies from: Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Textbook: Chapter 2 2.2 Example of a Relation

More information

The Relational Model and Normalization

The Relational Model and Normalization The Relational Model and Normalization 1. Introduction 2 2. Relational Model Terminology 3 4. Normal Forms 11 5. Multi-valued Dependency 21 6. The Fifth Normal Form 22 The Relational Model and Normalization

More information

SUMMER EXAMINATIONS 2014

SUMMER EXAMINATIONS 2014 SUMMER EXAMINATIONS 2014 MODULE TITLE LEVEL TIME ALLOWED Database Architecture Four Two hours Instructions to students: Enter your student number not your name on all answer booklets. The exam is split

More information

Simple Programs. 3-Tier Architectures. Databases and the Web. 3-Tier Architectures. Thin-Client 3-Tier Models. Thick-Client 3-Tier Models

Simple Programs. 3-Tier Architectures. Databases and the Web. 3-Tier Architectures. Thin-Client 3-Tier Models. Thick-Client 3-Tier Models 3-Tier Architectures (or 3-Tier Applications) Adapted from Chuck Cusack s otes CSE 56 Simple Programs The programs you have written so far have probably had the following properties: Input/output was text-based,

More information

FIT 100 More Microsoft Access and Relational Databases Creating Views with SQL

FIT 100 More Microsoft Access and Relational Databases Creating Views with SQL FIT 100 More Microsoft Access and Relational Databases Creating Views with SQL Creating Views with SQL... 1 1. Query Construction in SQL View:... 2 2. Use the QBE:... 5 3. Practice (use the QBE):... 6

More information

IT360: Applied Database Systems. Slide Set: #2. Relational Model (Chapter 3 Kroenke) The relational model Relational model terminology

IT360: Applied Database Systems. Slide Set: #2. Relational Model (Chapter 3 Kroenke) The relational model Relational model terminology IT360: Applied Database Systems Slide Set: #2 Relational Model (Chapter 3 Kroenke 1 Goals Understand: The relational model Relational model terminology Write SQL statements to create tables 2 1 Why Study

More information

Intro to Structured Query Language Part I

Intro to Structured Query Language Part I Intro to Structured Query Language Part I The Select Statement In a relational database, data is stored in tables. An example table would relate Social Security Number, Name, and Address: EmployeeAddressTable

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

22/01/2018. Data Management. Data Entities, Attributes, and Items. Data Entities, Attributes, and Items. ACS-1803 Introduction to Information Systems

22/01/2018. Data Management. Data Entities, Attributes, and Items. Data Entities, Attributes, and Items. ACS-1803 Introduction to Information Systems ACS-1803 Introduction to Information Systems Instructor: Kerry Augustine Data Management Lecture Outline 2, Part 2 ACS-1803 Introduction to Information Systems Data Entities, Attributes, and Items Entity:

More information

The SELECT-FROM-WHERE Structure

The SELECT-FROM-WHERE Structure SQL Queries 1 / 28 The SELECT-FROM-WHERE Structure SELECT FROM WHERE From relational algebra: SELECT corresponds to projection FROM specifies

More information

ACS-1803 Introduction to Information Systems. Instructor: Kerry Augustine. Data Management. Lecture Outline 2, Part 2

ACS-1803 Introduction to Information Systems. Instructor: Kerry Augustine. Data Management. Lecture Outline 2, Part 2 ACS-1803 Introduction to Information Systems Instructor: Kerry Augustine Data Management Lecture Outline 2, Part 2 ACS-1803 Introduction to Information Systems Data Entities, Attributes, and Items Entity:

More information

Andrey Zavadskiy. Database Modeling In Practice

Andrey Zavadskiy. Database Modeling In Practice Andrey Zavadskiy Database Modeling In Practice About me Solutions architect, SQL &.NET developer Interests: SQL Server, Entity Framework, Backend, MVC http://andreyzavadskiy.com https://www.facebook.com/andrey.k.zavadskiy

More information

Multi Student Query SONAR. Import from CSV

Multi Student Query SONAR. Import from CSV Class Diagram This is a visual representation of all the classes our system will include. A class is essentially the blueprint for an object (objects would be things like students, professors, admissions

More information

THE RELATIONAL DATABASE MODEL

THE RELATIONAL DATABASE MODEL THE RELATIONAL DATABASE MODEL Introduction to relational DB Basic Objects of relational model Properties of relation Representation of ER model to relation Keys Relational Integrity Rules Functional Dependencies

More information

Database Fundamentals

Database Fundamentals Database Fundamentals presented to NYPHP May 22, 2007 by Kenneth Downs Secure Data Software, Inc. ken@secdat.com www.secdat.com www.andromeda project.org Pre Relational In the bad old days, every program

More information

Advanced Web Programming Practice Exam II

Advanced Web Programming Practice Exam II Advanced Web Programming Practice Exam II Name: 12 December 2017 This is a closed book exam. You may use one sheet of notes (8.5X11in, front only) but cannot use any other references or electronic device.

More information

SQL Server 2008 Tutorial 3: Database Creation

SQL Server 2008 Tutorial 3: Database Creation SQL Server 2008 Tutorial 3: Database Creation IT 5101 Introduction to Database Systems J.G. Zheng Fall 2011 DDL Action in SQL Server Creating and modifying structures using the graphical interface Table

More information

PSUG National Information Exchange. Users helping users

PSUG National Information Exchange. Users helping users PSUG National Information Exchange Users helping users Basic SQL Dean Dahlvang Proctor Public Schools Proctor, MN About Dean Dean Dahlvang (ddahlvan@proctor.k12.mn.us) Director of Administrative Technology

More information

SHARING HISTORICAL GRADES EDUCATION TECHNOLOGY SERVICES. Sharing Historical Grades

SHARING HISTORICAL GRADES EDUCATION TECHNOLOGY SERVICES. Sharing Historical Grades EDUCATION TECHNOLOGY SERVICES Sharing Historical Grades Table of Contents SHARING HISTORICAL GRADES...3 Export the Grades...3 IMPORTING HISTORICAL GRADES FROM ANOTHER SCHOOL...7 Modifying the Data...7

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

Data Management Lecture Outline 2 Part 2. Instructor: Trevor Nadeau

Data Management Lecture Outline 2 Part 2. Instructor: Trevor Nadeau Data Management Lecture Outline 2 Part 2 Instructor: Trevor Nadeau Data Entities, Attributes, and Items Entity: Things we store information about. (i.e. persons, places, objects, events, etc.) Have relationships

More information

CONCEPTUAL DESIGN: ER TO RELATIONAL TO SQL

CONCEPTUAL DESIGN: ER TO RELATIONAL TO SQL RELATIONAL MODEL TO Data Model CONCEPTUAL DESIGN: ER TO RELATIONAL TO How to represent Entity sets, Relationship sets, Attributes, Key and participation constraints, Subclasses, Weak entity sets...? 2

More information

CSCB20 Week 4. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

CSCB20 Week 4. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017 CSCB20 Week 4 Introduction to Database and Web Application Programming Anna Bretscher Winter 2017 Last Week Intro to SQL and MySQL Mapping Relational Algebra to SQL queries Focused on queries to start

More information

EE221 Databases Practicals Manual

EE221 Databases Practicals Manual EE221 Databases Practicals Manual Lab 1 An Introduction to SQL Lab 2 Database Creation and Querying using SQL Assignment Data Analysis, Database Design, Implementation and Relation Normalisation School

More information

Appendix A Database Design. Data Modeling and the Entity-Relationship Model

Appendix A Database Design. Data Modeling and the Entity-Relationship Model Appendix A Database Design Data Modeling and the Entity-Relationship Model 1 Three Stages of Database Development The three stages of database development are: 1. Requirements Analysis Stage 2. Component

More information

CS3DB3/SE4DB3/ SE6DB3 TUTORIAL YU HUANG

CS3DB3/SE4DB3/ SE6DB3 TUTORIAL YU HUANG CS3DB3/SE4DB3/ SE6DB3 TUTORIAL YU HUANG 2015-01-28 Outline (many-to-one)at least one primary key, candidate key, super key foreign key is-a relationship review DB2 command; at least one(many-to-one) all

More information

Databases. Purpose Of A Database. To store information

Databases. Purpose Of A Database. To store information Databases In this section of notes you will learn about: different types of databases, how information is stored in databases, the different types of relations that can exist within a database and how

More information

Normalization in Databases

Normalization in Databases Normalization in Databases What is Normalization? Unnormalized data exists in flat files Normalization is the process of moving data into related tables This is usually done by running action queries (Make

More information

Database Management System (15ECSC208) UNIT I: Chapter 2: Relational Data Model and Relational Algebra

Database Management System (15ECSC208) UNIT I: Chapter 2: Relational Data Model and Relational Algebra Database Management System (15ECSC208) UNIT I: Chapter 2: Relational Data Model and Relational Algebra Relational Data Model and Relational Constraints Part 1 A simplified diagram to illustrate the main

More information

GiftWorks Import Guide Page 2

GiftWorks Import Guide Page 2 Import Guide Introduction... 2 GiftWorks Import Services... 3 Import Sources... 4 Preparing for Import... 9 Importing and Matching to Existing Donors... 11 Handling Receipting of Imported Donations...

More information

CS275 Intro to Databases

CS275 Intro to Databases CS275 Intro to Databases The Relational Data Model Chap. 3 How Is Data Retrieved and Manipulated? Queries Data manipulation language (DML) Retrieval Add Delete Update An Example UNIVERSITY database Information

More information

Introduction to Database Systems. The Relational Data Model

Introduction to Database Systems. The Relational Data Model Introduction to Database Systems The Relational Data Model Werner Nutt 1 4. The Relational Data Model 4.1 Schemas 1. Schemas 2. Instances 3. Integrity Constraints 2 Different Schemas are Based on Different

More information

DATABASE TECHNOLOGY - 1DL124

DATABASE TECHNOLOGY - 1DL124 1 DATABASE TECHNOLOGY - 1DL124 Summer 2007 An introductury course on database systems http://user.it.uu.se/~udbl/dbt-sommar07/ alt. http://www.it.uu.se/edu/course/homepage/dbdesign/st07/ Kjell Orsborn

More information

You Don t Need a DBA. What Every PHP Developer Should Know about Database Development. Maggie Nelson php works 2007

You Don t Need a DBA. What Every PHP Developer Should Know about Database Development. Maggie Nelson php works 2007 You Don t Need a DBA or What Every PHP Developer Should Know about Database Development Maggie Nelson php works 2007 Database Developer PHP Developer = DBA System Administrator DB Developer: Help! My database

More information

Introduction to Database Systems. The Relational Data Model. Werner Nutt

Introduction to Database Systems. The Relational Data Model. Werner Nutt Introduction to Database Systems The Relational Data Model Werner Nutt 1 4. The Relational Data Model 4.1 Schemas 1. Schemas 2. Instances 3. Integrity Constraints 2 Different Schemas are Based on Different

More information

The Entity-Relationship Model (ER Model) - Part 2

The Entity-Relationship Model (ER Model) - Part 2 Lecture 4 The Entity-Relationship Model (ER Model) - Part 2 By Michael Hahsler Based on slides for CS145 Introduction to Databases (Stanford) Lecture 4 > Section 2 What you will learn about in this section

More information

DBMS. Relational Model. Module Title?

DBMS. Relational Model. Module Title? Relational Model Why Study the Relational Model? Most widely used model currently. DB2,, MySQL, Oracle, PostgreSQL, SQLServer, Note: some Legacy systems use older models e.g., IBM s IMS Object-oriented

More information