Database solutions Chosen aspects of the relational model Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology.

Slides:



Advertisements
Similar presentations
The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
Advertisements

Monash University Week 7 Data Modelling Relational Database Theory IMS1907 Database Systems.
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
The Relational Database Model
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
Database Management System Lecture 6 The Relational Database Model – Keys, Integrity Rules.
RAJIKA TANDON DATABASES CSE 781 – Database Management Systems Instructor: Dr. A. Goel.
CSCI 3140 Module 2 – Conceptual Database Design Theodore Chiasson Dalhousie University.
Concepts and Terminology Introduction to Database.
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Methodology - Conceptual Database Design. 2 Design Methodology u Structured approach that uses procedures, techniques, tools, and documentation aids to.
CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
Relational Database. Database Management System (DBMS)
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Chapter 10 Normalization Pearson Education © 2009.
Database Systems, 9th Edition 1.  In this chapter, students will learn: That the relational database model offers a logical view of data About the relational.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
The Relational Model. 2 Relational Model Terminology u A relation is a table with columns and rows. –Only applies to logical structure of the database,
3 1 Database Systems The Relational Database Model.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
Logical Database Design and Relation Data Model Muhammad Nasir
Normalization. Overview Earliest  formalized database design technique and at one time was the starting point for logical database design. Today  is.
Chapter 4 The Relational Model Pearson Education © 2009.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
April 20022/CS/3X1 Database Design Design method John Wordsworth Department of Computer Science The University of Reading Room.
COP Introduction to Database Structures
Getting started with Accurately Storing Data
Logical Database Design and the Rational Model
Chapter 5 Database Design
The Relational Database Model
Database Systems: Design, Implementation, and Management Tenth Edition
Database Management Systems (DBMS)
Chapter 4 Relational Model Characteristics
CIS 207 The Relational Database Model
Chapter 4 Relational Databases
Translation of ER-diagram into Relational Schema
Referential Integrity
Entity-Relationship Model and Diagrams (continued)
A SIMPLE GUIDE TO FIVE NORMAL FORMS (See the next slide for required reading) Prof. Ghandeharizadeh 2018/11/14.
Normalization Referential Integrity
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 14 Normalization – Part I Pearson Education © 2009.
The Relational Model Transparencies
Chapter 4 The Relational Model Pearson Education © 2009.
Entities Things about which you need to store data. One entity for each different thing. At least two attributes At least two occurrences Not a property.
Chapter 4 The Relational Model Pearson Education © 2009.
The Relational Database Model
國立臺北科技大學 課程:資料庫系統 2015 fall Chapter 14 Normalization.
Relational Database Design
DCT 2053 DATABASE CONCEPT Chapter 2.2 CONTINUE
Design tools and techniques for a relational database system
Guide to Modeling Keys to E-R diagrams.
Chapter 4 The Relational Model Pearson Education © 2009.
Guide to Modeling Keys to E-R diagrams.
Chapter 3 The Relational Model
Presentation transcript:

Database solutions Chosen aspects of the relational model Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology rooms: 3.21 C, 15 C

Lecture materials kis.tu.kielce.pl/bd (click the link Materiały dydaktyczne at the page bottom), download (not open) the files on a local disk.

Logical database design Database methodology Database methodology is a structural approach in which procedures, techniques, tools, and documentation aids are used to support and facilitate the process of the development of a database project. Conceptual database design Logical database design Physical database design

Database design Conceptual database design is a global view of the database as seen by high-level managers and decision makers. It is independent of all physical considerations, including a database model. Logical database design refers to a complete view of a logical data representation. This level describes what data are stored in the database. all entities, their attributes, and relationships, the constraints on the data, semantic information about the data, security and integrity information. Physical database design refers to a complete definition of physical data representation. This level describes how data are stored in a database.

Concept of a key Superkey. An attribute or a set of attributes that uniquely identifies each entity occurrence. Candidate key. A superkey that contains only the minimum number of attributes necessary for the unique identification. Simple key. A key that consists of one attribute. Composite key. A key that consists of more than one. Primary key. A candidate key that is selected to identify each entity occurrence / to identify records uniquely within the table. Alternate key. The candidate key that are not selected to be a primary key. Foreign key. An attribute or a set of attributes within one table that matches the primary key in a related table.

Concept of a key - illustration

Database relational integrity Database integrity refers to the correctness and consistency of stored data. The relational integrity rules: entity integrity, referential integrity, domain constraints, business rules. Null represents an absence of a value. It can appear in any cell of any column in a table. Null value is used when that there is no value for that record or the value is unknown or missing.

Integrity rules Entity integrity is the rule according to which no attribute that is a part of a primary key may accept null value. The rule guarantees that one record can be distinguish from another, which means that all values of the primary key within a table are unique. Referential integrity is the rule according to which if a foreign key exists in a table, either the foreign key value must match the value of the primary key for some row of the home table or must be null. Domain constraints is the form of restrictions on the set of values allowed for the columns of tables. Business rules cover all remaining (additional) constraints that the database must satisfy. przerwane

Anomalies in a table design Anomalies in a table design are abnormalities (irregulations, inadequacies, deficiencies) that cause problems in the database management. The problems are connected mainly with data redundancy. Data redundancy is a multiple appearance of the same data in a table or the appearance of duplicated data stored in more than one table. Tables that have redundant data suffer from update anomalies, which are classified into the categories: insertion anomalies, deletion anomalies, modification anomalies.

Categories of anomalies Insertion anomaly is a design incorrectness when a new record is inserted into a table and at least one of the following actions are undertaken: some values already existing in the table are to be duplicated, thus causing potential data inconsistency, nulls are to be entered for some attributes in certain rows, which can violate the entity integrity if one of the attribute defines the primary key. Deletion anomaly is a design incorrectness that occur when the deletion of a record from a table causes that some important details are lost unintentionally (unwillingly). Modification anomaly is a design incorrectness that occur when the change of an attribute value for a record requires changing relative values in other records – if the change is not done, the database will become inconsistent.

Illustration of anomalies Insertion anomaly: new project participant (duplication), new prepared project (null value in an attribute key), Deletion anomaly: deletion the U3 participant  deletion the P2 project Modification anomaly: changing the phone number of the P3project office (possible inconsistency).