Docsity

Relational Data Model - Data Base Management System - Lecture Slides, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Relational Data Model - Data Base Management System - Lecture Slides and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Relational Data Model

What’s a data model?

  • Data model is a notation for describing data or information.
  • The description generally consists of three parts: ---------------Structure of the data ---------------Operation on the data ---------------Constraints on the data

Basics of the relational model

    1. Attributes:
    1. Schemas:
    1. Tuples:
    1. Domains:
    1. constraints

Relational model illustrated

Data types

  • Char
  • Bit
  • Boolean
  • Int
  • Float
  • Date, Time

Table declarations

  • Create Table table name (
  • title CHAR(100),
  • year INT,
  • length INT,
  • genre CHAR(10),
  • );

Modifying relation schemas

    1. drop table R
    1. Alter table movies ADD producer INT;
    1. Alter Table Movies Drop length;

Relational Algebra

  • It’s the data-manipulating aspect of the relational model
  • It’s the core of SQL language and every query in SQL gets translated to relational algebra.