# CSEN 501 CSEN501 - Databases I

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 CSEN501 - Databases I Lecture 3: The Relational Model Prof. Dr. Slim German University Cairo, Faculty of Media Engineering and Technology

2 Design Steps Ideas E/R Design Relational Schema Relational DBMS

3 The Relational Data Model (1970) Lessons from the Codd paper: A Relational Model for Data for Large Shared Data Banks Let us separate physical level from conceptual level Model the data independently from how it will be used (accessed, printed, etc.) Describe the data mathematically A relation describes an association between data items - tuples with attributes We generally think of tables and rows, but that s somewhat imprecise Use standard mathematical (logical) operations over the data - these are the relational algebra or relational calculus

4 Why Did It Take So Many Years to Implement RDs? Codd s original work: Earliest relational database research: 1976 System R developed by IBM researchers during the late 1970s. Oracle developed in 1979 using many of the System R results Why the gap? You could do the same thing in other ways Nobody wants to write math formulas Why would I turn my data into tables? It won t perform well

5 Getting More Concrete: Building a Database and Application Start with a conceptual model On paper using certain techniques, e.g. E/R diagrams We ignore low-level details - focus on logical representation Design and implement schema Design and codify (in SQL) the relations Think about the physical level - indexes, etc. Import the data Write applications using DBMS and other tools Many of the hard problems are taken care of by other people (DBMS, API writers, library authors, web server, etc.)

6 Conceptual Design for a University Database

7 What is a Relational Database? The relational model is based on the concept of a relation. A relation is physically represented as a table or two-dimensional array. Tables are used to hold information about objects to be represented in the database. Using the terms of EER model, both entity sets and relationships sets are shown using tables. Student: sid firstname gpa 1 Dina Ahmed Maria 0.7 sid Enroll: grade cid 1 A A C 401 Our focus now is the relational schema: set of tables Can have other kinds of schemas - XML, object,... Question: Can a table have duplicate rows? Course: cid subj sem 501 DB W TC W CP S05

8 Some Terminology I A relation is represented as a two-dimensional table with columns and rows. Columns are called attributes or fields. The number of these columns is the arity (degree) of the relation The rows are called tuples. The number of rows is called cardinality. Each attribute has values taken from a domain, e.g., subj has domain string Domains: string, integer, real, date,... - atomic types Theoretically: a relation is a set of tuples; no tuple can occur more than once Mathematicians define a relation to be a subset of a Cartesian product of a list of domains. Example D 1 = {1, 2} and D 2 = {a, b, c} D 1 D 2 = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}

9 Some Terminology II What are the cardinality and arity of relation Student? Student sid firstname gpa 1 Dina Ahmed Maria Ali 1.3 Can we put a Student tuple and a Course tuple in the same relation? If not how to prevent this? In other words, how to describe relations?

10 Describing Relations A relation is defined by a schema, which specifies domains of each field in the relation. In DBMS, data definition language (DDL) is used - like programming language type definitions In relational DBs, we use relation(attribute:domain) Student(sid:int, name:string, gpa:real) Enroll(sid:int, grade:string, cid:string) Course(cid:string, subj:string, sem:string) Teaches(fid:int, cid:string) Professor(fid:int, name:string) Database people, when they are discussing design, often assume domains are evident to the reader: Student(sid, name, gpa)

11 Definitions: Schema, Relational database A relation (instance) is a table (a set of tuples). A schema is the structure of the table together with a specification of the domains and any other restrictions on possible values. A (relational) database schema is a collection of schemas. A relational database (instance) is a collection of tables, each has a distinct name.

12 Integrity Constraints (ICs) Integrity Constraint (IC): condition that must be true for any instance of the database. Example: a schema specifies domains of the fields in the relation, and is called domain constraints. ICs are specified when schema is defined. Note: this might not be true in Web databases. ICs are checked when relations are modified. A legal instance of relation is one that satisfies all specific ICs. DBMS does not allow illegal instances. If the DBMS checks ICs, stored data is more faithful to real world meaning, that is, for consistency and accuracy. When ICs are enforced, DBMS also avoids data entry errors.

13 Key Constraints: Entity Integrity A set of fields is a (candidate) key for a relation if no two distinct tuples can have the same values in all key fields, any proper subset of the key does not satisfy this condition. If a set of fields satisfies condition 1 but does not satisfy condition 2, then it is called a super key for the relation. If there are more than one candidate keys for a relation, one is chosen to be the primary key. Given a relation schema, the primary keys of the schema is underlined. Student(sid:int, name:string, gpa:real) Entity Integrity: in a relation no attribute of a primary key can have a null value.

14 Key Constraints: Foreign Key Constraint Foreign key: A set of fields in one relation that is used to refer to a tuple in another relation. This set must correspond to the primary key of the second relation. Example: sid is a foreign key in Enroll referring to Student Student(sid:int, name:string, gpa:real) Enroll(sid:int, grade:string, cid:string) Foreign key constraints: Let S 1 be a foreign key in relation R 1 referring to R 2. Then the values of S 1 in R 1 must match (be a subset of) the values of S 1 in R 2.

15 Foreign Keys - Referential Integrity Question: Does the following satisfy the foreign key constraint? Student: sid firstname gpa 1 Dina Ahmed Maria 0.7 Enroll: sid grade cid 1 A A C 202 Referential Integrity: the database does not include any invalid foreign key value. That is, all foreign key constraints are enforced. Suppose Table B has a foreign key that points to a field in Table A. Referential integrity would prevent you from adding a record to Table B that does not exist in Table A. The referential integrity rules might also specify that whenever you delete a record from Table A, any records in Table B that are linked to the deleted record will also be deleted. This is called cascading delete.

16 Representing Relational Database Schemas A relational database schema can have any number of relations. Relation schemas can be represented by giving the name of each relation followed by the attribute names in parentheses with the primary key underlined. The clearest way of showing foreign keys is by drawing arrows from the foreign keys to the primary keys they refer to. Some attributes appear in more than one relation. Student(studID, lastname, firstname, major) Enroll(studID,classNo,grade) To distinguish between the two appearances of attributes, we use the relation name followed by a period followed by the attribute name. Student.studID Enroll.studID When an attribute appears in more than one relation, its appearance usually represents a relationship or interaction between tuples of the two relations. Common attributes play important role in data manipulation.

17 Relational Data Manipulation Languages Variety languages used by relational database management systems Procedural languages: The user tells the system how to manipulate the data, e.g. Relational Algebra Declarative languages: the user states what data is needed but not exactly how it is to be located, e.g. Relational Calculus and SQL Graphical languages: allowing the user to give an example or an illustration of what data should be found, e.g. QBE

18 Summary - What you should remember! What is a relational database? Tuple? Attribute? Field? Domain? Schema? Database schema? Instance? What are integrity constraints? Why study them? How to decide whether an instance is legal? Where do ICs come from? What integrity constraints are a must for relational databases? Questions: Are the following claims correct? Every relation has at least one key. Every relation has one and only one primary key. Every relation has one and only one superkey.

### CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model

CS2Bh: Current Technologies Introduction to XML and Relational Databases Spring 2005 The Relational Model CS2 Spring 2005 (LN6) 1 The relational model Proposed by Codd in 1970. It is the dominant data

### The Relational Model. Why Study the Relational Model? Relational Database: Definitions

The Relational Model Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Microsoft, Oracle, Sybase, etc. Legacy systems in

### EECS 647: Introduction to Database Systems

EECS 647: Introduction to Database Systems Instructor: Luke Huan Spring 2013 Administrative Take home background survey is due this coming Friday The grader of this course is Ms. Xiaoli Li and her email

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

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

### The Relational Model. Why Study the Relational Model?

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

### 3. Relational Model and Relational Algebra

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

### Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst

Outline Data Modeling Yanlei Diao UMass Amherst v Conceptual Design: ER Model v Relational Model v Logical Design: from ER to Relational Slides Courtesy of R. Ramakrishnan and J. Gehrke 1 2 Conceptual

### 1 the relational data model The relational model of data was introduced by E.F. Codd (1970). 1.1 relational model concepts The relational model repres

database systems formal definitions of the relational data model [03] s. yurttaοs 1 1 the relational data model The relational model of data was introduced by E.F. Codd (1970). 1.1 relational model concepts

### Database Systems. Lecture 1: Introduction

Database Systems Lecture 1: Introduction General Information Professor: Leonid Libkin Contact: libkin@ed.ac.uk Lectures: Tuesday, 11:10am 1 pm, AT LT4 Website: http://homepages.inf.ed.ac.uk/libkin/teach/dbs09/index.html

### There are five fields or columns, with names and types as shown above.

3 THE RELATIONAL MODEL Exercise 3.1 Define the following terms: relation schema, relational database schema, domain, attribute, attribute domain, relation instance, relation cardinality, andrelation degree.

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

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

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

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

### Lecture 6. SQL, Logical DB Design

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

### Review Entity-Relationship Diagrams and the Relational Model. Data Models. Review. Why Study the Relational Model? Steps in Database Design

Review Entity-Relationship Diagrams and the Relational Model CS 186, Fall 2007, Lecture 2 R & G, Chaps. 2&3 Why use a DBMS? OS provides RAM and disk A relationship, I think, is like a shark, you know?

### Database Management Systems. Chapter 1

Database Management Systems Chapter 1 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 2 What Is a Database/DBMS? A very large, integrated collection of data. Models real-world scenarios

### The Relational Data Model: Structure

The Relational Data Model: Structure 1 Overview By far the most likely data model in which you ll implement a database application today. Of historical interest: the relational model is not the first implementation

### Relational Database Model. Codd s Twelve Rules. Relations. Introduced by E.F. Codd (1970)

Relational Database Model Introduced by E.F. Codd (1970) http://www.acm.org/classics/nov95/ Based on relational algebra and logic developed by Schröder (1880s) Charles Peirce (1890s) Russell and Whitehead

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

COS 597A: Principles of Database and Information Systems elational model elational model A formal (mathematical) model to represent objects (data/information), relationships between objects Constraints

### SQL Simple Queries. Chapter 3.1 V3.0. Copyright @ Napier University Dr Gordon Russell

SQL Simple Queries Chapter 3.1 V3.0 Copyright @ Napier University Dr Gordon Russell Introduction SQL is the Structured Query Language It is used to interact with the DBMS SQL can Create Schemas in the

### SQL NULL s, Constraints, Triggers

CS145 Lecture Notes #9 SQL NULL s, Constraints, Triggers Example schema: CREATE TABLE Student (SID INTEGER PRIMARY KEY, name CHAR(30), age INTEGER, GPA FLOAT); CREATE TABLE Take (SID INTEGER, CID CHAR(10),

### Ques 1. Define dbms and file management system? Ans- Database management system (DBMS) A file management system

UNIT-1 Ques 1. Define dbms and file management system? Ans- Database management system (DBMS) is a collection of interrelated data and a set of programs to access those data. Some of the very well known

### Relational Database Basics Review

Relational Database Basics Review IT 4153 Advanced Database J.G. Zheng Spring 2012 Overview Database approach Database system Relational model Database development 2 File Processing Approaches Based on

### CPS221 Lecture: Relational Database Design last revised June 21, Objectives:

Objectives: CPS221 Lecture: Relational Database Design last revised June 21, 2011 1.To introduce the notion of primary and foreign keys 2.To introduce the anomalies that result from redundant storage of

### The Entity-Relationship Model

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

### CSE 530A Database Management Systems. Introduction. Washington University Fall 2013

CSE 530A Database Management Systems Introduction Washington University Fall 2013 Overview Time: Mon/Wed 7:00-8:30 PM Location: Crow 206 Instructor: Michael Plezbert TA: Gene Lee Websites: http://classes.engineering.wustl.edu/cse530/

### The Relational Data Model and Relational Database Constraints

The Relational Data Model and Relational Database Constraints Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database Schemas Update Operations and Dealing with Constraint

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

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

### Fundamentals of Database Design

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

### Introduction to Databases

Page 1 of 5 Introduction to Databases An introductory example What is a database? Why do we need Database Management Systems? The three levels of data abstraction What is a Database Management System?

### Databases and BigData

Eduardo Cunha de Almeida eduardo.almeida@uni.lu Outline of the course Introduction Database Systems (E. Almeida) Distributed Hash Tables and P2P (C. Cassagnes) NewSQL (D. Kim and J. Meira) NoSQL (D. Kim)

### 2. Basic Relational Data Model

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

### DATABASE MANAGEMENT SYSTEMS. Question Bank:

DATABASE MANAGEMENT SYSTEMS Question Bank: UNIT 1 1. Define Database? 2. What is a DBMS? 3. What is the need for database systems? 4. Define tupule? 5. What are the responsibilities of DBA? 6. Define schema?

### SQL : Structured Query Language data definition language

Outline SQL : Structured Query Language data definition language Introduction slide 150 slide 152 Integrity constraints slide 159 148 149 SQL presentation Introduction SQL Presentation (2) Introduction

### Jagannath Institute of Management Sciences Lajpat Nagar. BCA Sem III DBMS

Jagannath Institute of Management Sciences Lajpat Nagar BCA Sem III DBMS BCA III RD SEMESTER DBMS NOTES UNIT WISE UNIT 1 Objectives At the end of this chapter the reader will be able to: Distinguish between

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

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

### Data Modeling. Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4

Data Modeling Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4 Data Modeling Schema: The structure of the data Structured Data: Relational, XML-DTD, etc Unstructured Data: CSV, JSON But where does

### COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model The entity-relationship (E-R) model is a a data model in which information stored

### Overview. Introduction to Database Systems. Motivation... Motivation: how do we store lots of data?

Introduction to Database Systems UVic C SC 370 Overview What is a DBMS? what is a relational DBMS? Why do we need them? How do we represent and store data in a DBMS? How does it support concurrent access

### Logical Schema Design: The Relational Data Model

Logical Schema Design: The Relational Data Model Basics of the Relational Model From Conceptual to Logical Schema Logical Schema Design Select data model Hierarchical data model: hierarchies of record

### CSE 233. Database System Overview

CSE 233 Database System Overview 1 Data Management An evolving, expanding field: Classical stand-alone databases (Oracle, DB2, SQL Server) Computer science is becoming data-centric: web knowledge harvesting,

### Databasesystemer, forår 2005 IT Universitetet i København. Forelæsning 3: Business rules, constraints & triggers. 3. marts 2005

Databasesystemer, forår 2005 IT Universitetet i København Forelæsning 3: Business rules, constraints & triggers. 3. marts 2005 Forelæser: Rasmus Pagh Today s lecture Constraints and triggers Uniqueness

### SQL DDL. Applied Databases. Inclusion Constraints. Key Constraints

Applied Databases Handout 2. Database Design. 5 October 2010 SQL DDL In its simplest use, SQL s Data Definition Language (DDL) provides a name and a type for each column of a table. CREATE TABLE Hikers

### Relational Database Concepts

Relational Database Concepts IBM Information Management Cloud Computing Center of Competence IBM Canada Labs 1 2011 IBM Corporation Agenda Overview Information and Data Models The relational model Entity-Relationship

### LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24 1. A database schema is a. the state of the db b. a description of the db using a

### Databases What the Specification Says

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

### Database Implementation: SQL Data Definition Language

Database Systems Unit 5 Database Implementation: SQL Data Definition Language Learning Goals In this unit you will learn how to transfer a logical data model into a physical database, how to extend or

### Entity Relationship Diagram

Yufei Tao Department of Computer Science and Engineering Chinese University of Hong Kong A primary goal of database design is to decide what tables to create. Usually, there are two principles: 1 Capture

### CS 377 Database Systems. Database Design Theory and Normalization. Li Xiong Department of Mathematics and Computer Science Emory University

CS 377 Database Systems Database Design Theory and Normalization Li Xiong Department of Mathematics and Computer Science Emory University 1 Relational database design So far Conceptual database design

### www.gr8ambitionz.com

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

### Relational Databases

Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 18 Relational data model Domain domain: predefined set of atomic values: integers, strings,... every attribute

### Introduction. Database Management Systems

Introduction Database Management Systems Database Management System (DBMS) Collection of interrelated data and set of programs to access the data Convenient and efficient processing of data Database Application

### DATABASE SCHEMA DESIGN ENTITY-RELATIONSHIP MODEL. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 14

DATABASE SCHEMA DESIGN ENTITY-RELATIONSHIP MODEL CS121: Introduction to Relational Database Systems Fall 2015 Lecture 14 Designing Database Applications 2 Database applications are large and complex A

### TIM 50 - Business Information Systems

TIM 50 - Business Information Systems Lecture 15 UC Santa Cruz March 1, 2015 The Database Approach to Data Management Database: Collection of related files containing records on people, places, or things.

### Relationships between Tables and Entity Relationship Diagrams

Relationships between Tables and Entity Relationship Diagrams Remember Database Terminology A database is a set of tables The structure of a database is displayed in its schema A database instance is the

### Reducing ER Schema to Relational Schema

Reducing ER Schema to Relational Schema Excerpt from Chapter 3, Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Logical DB Design: ER to Relational Entity sets to tables: ssn name Employees

### Review: Participation Constraints

Review: Participation Constraints Does every department have a manager? If so, this is a participation constraint: the participation of Departments in Manages is said to be total (vs. partial). Every did

### Why use a DBMS? (Week 1)

Why use a DBMS? (Week 1) Avoid redundancy and inconsistency Rich (declarative) access to the data Synchronize concurrent data access Recovery after system failures Security and privacy Reduce cost and

### BCA. Database Management System

BCA IV Sem Database Management System Multiple choice questions 1. A Database Management System (DBMS) is A. Collection of interrelated data B. Collection of programs to access data C. Collection of data

### CS143: Query and Update in SQL

CS143: Query and Update in SQL Book Chapters (4th) Chapter 4.1-6, 4.8-10, 3.3.4 (5th) Chapter 3.1-8, 3.10-11 (6th) Chapter 3.1-9, 4.1, 4.3 Things to Learn SQL DML for SQL Structured Query Language The

### COMP5138 Relational Database Management Systems. Databases are Everywhere!

COMP5138 Relational Database Management Systems Week 1: COMP 5138 Intro to Database Systems Professor Joseph Davis and Boon Ooi Databases are Everywhere! Database Application Examples: Banking: all transactions

### HNDIT 1105 Database Management Systems

HNDIT 1105 Database Management Systems Lesson 02: Database Design Process & ER Diagrams By S. Sabraz Nawaz M.Sc. In IS (SLIIT), PGD in IS (SLIIT), BBA (Hons.) Spl. in IS (SEUSL), MIEEE, MAIS Senior Lecturer

### Chapter 1: Introduction. Database Management System (DBMS) University Database Example

This image cannot currently be displayed. Chapter 1: Introduction Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Database Management System (DBMS) DBMS contains information

### The Entity-Relationship Model

The Entity-Relationship Model Chapter 2 Instructor: Vladimir Zadorozhny vladimir@sis.pitt.edu Information Science Program School of Information Sciences, University of Pittsburgh 1 Database: a Set of Relations

### Course: CSC 222 Database Design and Management I (3 credits Compulsory)

Course: CSC 222 Database Design and Management I (3 credits Compulsory) Course Duration: Three hours per week for 15weeks with practical class (45 hours) As taught in 2010/2011 session Lecturer: Oladele,

### Database Design Process. Databases - Entity-Relationship Modelling. Requirements Analysis. Database Design

Process Databases - Entity-Relationship Modelling Ramakrishnan & Gehrke identify six main steps in designing a database Requirements Analysis Conceptual Design Logical Design Schema Refinement Physical

### Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd.

The Entity- Relationship Model R &G - Chapter 2 A relationship, I think, is like a shark, you know? It has to constantly move forward or it dies. And I think what we got on our hands is a dead shark. Woody

### CSE 132A. Database Systems Principles

CSE 132A Database Systems Principles Prof. Victor Vianu 1 Data Management An evolving, expanding field: Classical stand-alone databases (Oracle, DB2, SQL Server) Computer science is becoming data-centric:

### Concepts of Database Management Seventh Edition. Chapter 6 Database Design 2: Design Method

Concepts of Database Management Seventh Edition Chapter 6 Database Design 2: Design Method Objectives Discuss the general process and goals of database design Define user views and explain their function

### IT2305 Database Systems I (Compulsory)

Database Systems I (Compulsory) INTRODUCTION This is one of the 4 modules designed for Semester 2 of Bachelor of Information Technology Degree program. CREDITS: 04 LEARNING OUTCOMES On completion of this

### Lesson 8: Introduction to Databases E-R Data Modeling

Lesson 8: Introduction to Databases E-R Data Modeling Contents Introduction to Databases Abstraction, Schemas, and Views Data Models Database Management System (DBMS) Components Entity Relationship Data

### Exercise 1: Relational Model

Exercise 1: Relational Model 1. Consider the relational database of next relational schema with 3 relations. What are the best possible primary keys in each relation? employ(person_name, street, city)

### Week 1 Part 1: An Introduction to Database Systems. Databases and DBMSs. Why Use a DBMS? Why Study Databases??

Week 1 Part 1: An Introduction to Database Systems Databases and DBMSs Data Models and Data Independence Concurrency Control and Database Transactions Structure of a DBMS DBMS Languages Databases and DBMSs

### Concepts of Database Management, Fifth Edition. Chapter 6: Database Design 2: Design Methodology

Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology Objectives Discuss the general process and goals of database design Define user views and explain their function

### A. TRUE-FALSE: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ:

GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ: Review Quiz will contain very similar question as below. Some questions may even be repeated. The order of the questions are random and are not in order of

### COMP 5138 Relational Database Management Systems. Week 5 : Basic SQL. Today s Agenda. Overview. Basic SQL Queries. Joins Queries

COMP 5138 Relational Database Management Systems Week 5 : Basic COMP5138 "Relational Database Managment Systems" J. Davis 2006 5-1 Today s Agenda Overview Basic Queries Joins Queries Aggregate Functions

### Foundations of Information Management

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

### Oracle Database 10g Express

Oracle Database 10g Express This tutorial prepares the Oracle Database 10g Express Edition Developer to perform common development and administrative tasks of Oracle Database 10g Express Edition. Objectives

### Database Systems. Session 2 Main Theme. Relational Data. & Relational Database Constraints Dr. Jean-Claude Franchitti

Database Systems Session 2 Main Theme Relational Data Model & Relational Database Constraints Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical

### SQL Data Definition. Database Systems Lecture 5 Natasha Alechina

Database Systems Lecture 5 Natasha Alechina In This Lecture SQL The SQL language SQL, the relational model, and E/R diagrams CREATE TABLE Columns Primary Keys Foreign Keys For more information Connolly

### Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

1 Topics for this week: 1. Good Design 2. Functional Dependencies 3. Normalization Readings for this week: 1. E&N, Ch. 10.1-10.6; 12.2 2. Quickstart, Ch. 3 3. Complete the tutorial at http://sqlcourse2.com/

### Winter 2003 1. Winter 2003 2

M Today s Lecture Database design through ER diagrams Creating and modifying relations, specifying integrity constraints using SQL Translate ER diagrams to relations A little on views Winter 2003 1 ai

### Database Design Methodology

Database Design Methodology Three phases Database Design Methodology Logical database Physical database Constructing a model of the information used in an enterprise on a specific data model but independent

### Gov 1008 Introduction to Geographical Information Systems

Gov 1008 Introduction to Geographical Information Systems Lecture 5: Creating Data and Maintaining Databases Sumeeta Srinivasan References include: Bolstad; Worboys; NCGIA Core Curriculum: csiss.org/learning_resources/content/giscc/giscc_contents.html;

### Basic Concepts of Database Systems

CS2501 Topic 1: Basic Concepts 1.1 Basic Concepts of Database Systems Example Uses of Database Systems - account maintenance & access in banking - lending library systems - airline reservation systems

### CPS352 Database Systems: Design Project

CPS352 Database Systems: Design Project Purpose: Due: To give you experience with designing and implementing a database to model a real domain Various milestones due as shown in the syllabus Requirements

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

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

### Topics. Introduction to Database Management System. What Is a DBMS? DBMS Types

Introduction to Database Management System Linda Wu (CMPT 354 2004-2) Topics What is DBMS DBMS types Files system vs. DBMS Advantages of DBMS Data model Levels of abstraction Transaction management DBMS

### Tutorial on Relational Database Design

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

### Answers included WORKSHEET: INTEGRITY CONTROL IN RELATIONAL DATABASES

CS27020: Modelling Persistent Data WORKSHEET: INTEGRITY CONTROL IN RELATIONAL DATABASES Time allowed: 40 minutes Calculators are not allowed in this worksheet. Answer all questions 1. Briefly explain what

### Relational Databases. Christopher Simpkins chris.simpkins@gatech.edu

Relational Databases Christopher Simpkins chris.simpkins@gatech.edu Relational Databases A relational database is a collection of data stored in one or more tables A relational database management system

### Basic Database Concepts

Tore Risch Uppsala University, Sweden UDBL Basic Database Concepts What is a database? A database is a collection of related data stored in a computer managed by a DBMS. What is a DBMS, Database Management

### In This Lecture. SQL Data Definition SQL SQL. Notes. Non-Procedural Programming. Database Systems Lecture 5 Natasha Alechina

This Lecture Database Systems Lecture 5 Natasha Alechina The language, the relational model, and E/R diagrams CREATE TABLE Columns Primary Keys Foreign Keys For more information Connolly and Begg chapter

### The core theory of relational databases. Bibliography

The core theory of relational databases Slide 1 La meilleure pratique... c est une bonne théorie Bibliography M.Levene, G.Loizou, Guided Tour of Relational Databases and Beyond, Springer, 625 pages,1999.

### Entity-Relationship Model

UNIT -2 Entity-Relationship Model Introduction to ER Model ER model is represents real world situations using concepts, which are commonly used by people. It allows defining a representation of the real

### History of SQL. Relational Database Languages. Tuple relational calculus ALPHA (Codd, 1970s) QUEL (based on ALPHA) Datalog (rule-based, like PROLOG)

Relational Database Languages Tuple relational calculus ALPHA (Codd, 1970s) QUEL (based on ALPHA) Datalog (rule-based, like PROLOG) Domain relational calculus QBE (used in Access) History of SQL Standards:

### GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: DATABASE MANAGEMENT (Code: 3341605 ) Information Technology

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT COURSE CURRICULUM COURSE TITLE: DATABASE MANAGEMENT (Code: 3341605 ) Diploma Programme in which this course is offered Information Technology Semester

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

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

### IT2304: Database Systems 1 (DBS 1)

: Database Systems 1 (DBS 1) (Compulsory) 1. OUTLINE OF SYLLABUS Topic Minimum number of hours Introduction to DBMS 07 Relational Data Model 03 Data manipulation using Relational Algebra 06 Data manipulation