Introduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure

Similar documents
Chapter 4. The Relational Model

File Processing Approaches

Relational Model. Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS IIT, Abbottabad Pakistan

RELATIONAL DATA MODEL

Lecture 03. Spring 2018 Borough of Manhattan Community College

Chapter 3. The Relational database design

Lecture 03. Fall 2017 Borough of Manhattan Community College

Relational Data Model ( 관계형데이터모델 )

ER Model. Objectives (2/2) Electricite Du Laos (EDL) Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 1

CS317 File and Database Systems

The Relational Data Model. Data Model

Relational Model Concepts

Database Management System 9

Chapter 2 Introduction to Relational Models

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

COSC344 Database Theory and Applications. σ a= c (P) Lecture 3 The Relational Data. Model. π A, COSC344 Lecture 3 1

ITCS 3160 DATA BASE DESIGN AND IMPLEMENTATION

The Basic (Flat) Relational Model. Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Chapter 2: Intro to Relational Model

Relational Model. Topics. Relational Model. Why Study the Relational Model? Linda Wu (CMPT )

Relational Model History. COSC 416 NoSQL Databases. Relational Model (Review) Relation Example. Relational Model Definitions. Relational Integrity

Running Example Tables name location

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

CS 377 Database Systems

A database can be modeled as: + a collection of entities, + a set of relationships among entities.

Review for Exam 1 CS474 (Norton)

The Entity Relationship Model

The Relational Model

DATABASE TECHNOLOGY - 1DL124

Relational Model History. COSC 304 Introduction to Database Systems. Relational Model and Algebra. Relational Model Definitions.

Database Applications (15-415)

Relational Data Model

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

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

CS275 Intro to Databases

Relational data model

Databases 1. Daniel POP

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

Chapter 2: Relational Model

U1. Data Base Management System (DBMS) Unit -1. MCA 203, Data Base Management System

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

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

DATABASE DESIGN I - 1DL300

THE RELATIONAL DATABASE MODEL

The Relational Model

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

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

Introduction to Data Management. Lecture #4 (E-R Relational Translation)

The Relational Model. Chapter 3

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

Database Management Systems. Chapter 3 Part 1

The Relational Model. Chapter 3. Database Management Systems, R. Ramakrishnan and J. Gehrke 1

The Relational Model. Chapter 3. Comp 521 Files and Databases Fall

Solved MCQ on fundamental of DBMS. Set-1

Chapter 11 Database Concepts

Data Models. CS552- Chapter Three

Supplier-Parts-DB SNUM SNAME STATUS CITY S1 Smith 20 London S2 Jones 10 Paris S3 Blake 30 Paris S4 Clark 20 London S5 Adams 30 Athens

The Relational Model Constraints and SQL DDL

CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E)

The Relational Model

CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E)

Systems Analysis and Design Methods Chapter 7: Data Modeling and Analysis

DATABASE MANAGEMENT SYSTEM SHORT QUESTIONS. QUESTION 1: What is database?

Database Systems. Lecture2:E-R model. Juan Huo( 霍娟 )

COURSE OVERVIEW THE RELATIONAL MODEL. CS121: Relational Databases Fall 2017 Lecture 1

Introduction to Database Management Systems

Lecture Notes for 3 rd August Lecture topic : Introduction to Relational Model. Rishi Barua Shubham Tripathi

COURSE OVERVIEW THE RELATIONAL MODEL. CS121: Introduction to Relational Database Systems Fall 2016 Lecture 1

DBMS. Relational Model. Module Title?

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

Database Systems ( 資料庫系統 )

Chapter 2: Intro to Relational Model

CPS510 Database System Design Primitive SYSTEM STRUCTURE

Assignment Session : July-March

Comp 5311 Database Management Systems. 2. Relational Model and Algebra

DATABASE TECHNOLOGY - 1MB025 (also 1DL029, 1DL300+1DL400)

The Relational Model. Roadmap. Relational Database: Definitions. Why Study the Relational Model? Relational database: a set of relations

Chapter 17. Methodology Logical Database Design for the Relational Model

Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

Why Study the Relational Model? The Relational Model. Relational Database: Definitions. The SQL Query Language. Relational Query Languages

1.3. Joins Introduction Access across relations Miniworld approximation Pointing mechanism

CS 4400 Exam 2 ANSWER KEY

Chapter 3: The Relational Database Model

The Relational Model. 3/1/2010 Database Management Systems, Roya Choupani 1

Basant Group of Institution

Mahathma Gandhi University

The Relational Model. Outline. Why Study the Relational Model? Faloutsos SCS object-relational model

The Relational Data Model and Relational Database Constraints

Administrivia. The Relational Model. Review. Review. Review. Some useful terms

The Relational Model. Chapter 3. Comp 521 Files and Databases Fall

Relational Model. CS 377: Database Systems

Chapter 1: Introduction

Let s briefly review important EER inheritance concepts

Lecture 2: Chapter Objectives. Relational Data Structure. Relational Data Model. Introduction to Relational Model & Structured Query Language (SQL)

The Relational Model 2. Week 3

Introduction to Database Systems. The Relational Data Model

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

Lecture 2: Chapter Objectives

Relational Data Model. Christopher Simpkins

Modern Systems Analysis and Design Sixth Edition

Transcription:

Databases databases Terminology of relational model Properties of database relations. Relational Keys. Meaning of entity integrity and referential integrity. Purpose and advantages of views. The relational approach was originally proposed in 1970 s. The first project that proved the practicality of the relational model is System R, developed at IBM s San Jose Research Laboratory in 1976. examples oracle, Sybase, access Databases cont: The model was proposed as a disciplined way of handling data using the rigour of mathematics, particularly set theory. This would enhance the concept of program-data independence and improve programmer activities. Databases cont: The relational model will have only values. Even references between data in different sets (relations) are represented by means of values. In the hierarchical and network model there are explicit references (pointers), which make them more complicated. Relational Data structure The Relational approach is based on elementary mathematical relation theory. Its basic construct is a A relation is also called a table. The data is organized in tables. The table has columns and rows. Relational Model Terminology A relation is a table with columns and rows. Only applies to logical structure of the database, not the physical structure. Attribute is a named column of a Domain is the set of allowable values for one or more attributes. 1

Relational Model Terminology Cont: Instances of Branch and Staff (part) Relations Tuple is a row of a Degree is the number of attributes in a Cardinality is the number of tuples in a Relational Database is a collection of normalized relations with distinct relation names. Examples of Attribute Domains Alternative Terminology for Relational Model Database Relations Relation schema Named relation defined by a set of attribute and domain name pairs. Relational database schema Set of relation schemas, each with a distinct name. Properties of Relations Relation name is distinct from all other relation names in relational schema. Each cell of relation contains exactly one atomic (single) value. Each attribute has a distinct name. Values of an attribute are all from the same domain. 2

Properties of Relations Each tuple is distinct; there are no duplicate tuples. Order of attributes has no significance. Order of tuples has no significance, theoretically. Relational Keys Superkey An attribute, or a set of attributes, that uniquely identifies a tuple within a Candidate Key Superkey (K) such that no proper subset is a superkey within the In each tuple of R, values of K uniquely identify that tuple (uniqueness). No proper subset of K has the uniqueness property (irreducibility). Relational Keys Primary Key Candidate key selected to identify tuples uniquely within Alternate Keys Candidate keys that are not selected to be primary key. Foreign Key Attribute, or set of attributes, within one relation that matches candidate key of some (possibly same) Null Represents value for an attribute that is currently unknown or not applicable for tuple Deals with incomplete or exceptional data. Represents the absence of a value and is not the same as zero or spaces, which are values. Entity Integrity In a base relation, no attribute of a primary key can be null. Referential Integrity If foreign key exists in a relation, either foreign key value must match a candidate key value of some tuple in its home relation or foreign key value must be wholly null. Enterprise Constraints Additional rules specified by users or database administrators. 3

Views Base Relation Named relation corresponding to an entity in conceptual schema, whose tuples are physically stored in database. View Dynamic result of one or more relational operations operating on base relations to produce another Views A virtual relation that does not necessarily actually exist in the database but is produced upon request, at time of request. Contents of a view are defined as a query on one or more base relations. Views are dynamic, meaning that changes made to base relations that affect view attributes are immediately reflected in the view. Purpose of Views Provides powerful and flexible security mechanism by hiding parts of database from certain users. Permits users to access data in a customized way, so that same data can be seen by different users in different ways, at same time. Can simplify complex operations on base relations. All updates to a base relation should be immediately reflected in all views that reference that base If view is updated, underlying base relation should reflect change. There are restrictions on types of modifications that can be made through views: Updates are allowed if query involves a single base relation and contains a candidate key of base Updates are not allowed involving multiple base relations. Updates are not allowed involving aggregation or grouping operations. Classes of views are defined as: theoretically not updateable theoretically updateable partially updateable. 4

5