SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Data Models

Objectives
In this lesson, you will learn to:
 Define a Database Management System (DBMS)
 Describe the types of data models
 Create an entity-relationship model
 List the types of relationships between entities
 Define the Relational Database Management System (RDBMS)
 Describe the operators that work on relations




©NIIT                                       RDBMS/Lesson 1/Slide 1 of 35
Data Models

Database Management Systems
 A database is a collection of logically related information
 Database Management is the task of maintaining databases
  so that information is readily available
 The software required to perform the task of database
  management is called a Database Management System
  (DBMS)




©NIIT                                       RDBMS/Lesson 1/Slide 2 of 35
Data Models

Data Models
 Can be classified into two categories:
     Object-based logical model – focuses on describing the
      data, the relationship among the data, and any
      constraints defined
     Record-based logical model – focuses on describing the
      data structure and the access techniques in the Database
      Management System




©NIIT                                      RDBMS/Lesson 1/Slide 3 of 35
Data Models

Object-based Logical Model
 There are various object-based models. The most widely
  used is the entity-relationship model (E/R model)




©NIIT                                   RDBMS/Lesson 1/Slide 4 of 35
Data Models

The Entity-relationship Model
 Introduced by Peter Chen
     Chen introduced not only the E/R model, but also a
      corresponding diagramming technique




©NIIT                                     RDBMS/Lesson 1/Slide 5 of 35
Data Models

Entities
 Chen defined an entity as “a thing, which can be easily
  identified”
 An entity is any object, place, person, or activity about which
  data is recorded
 In the diagramming technique, entities are named and
  represented inside a box
 An entity type is a set of things that share common
  properties
     STUDENT, COURSE, and GRADE are examples of entity
      type
     An entity type is usually in uppercase
©NIIT                                          RDBMS/Lesson 1/Slide 6 of 35
Data Models

Entities (Contd.)
 Types of Entities
    Dependent entity
      ® Is an entity whose existence depends on the existence
        of another entity and are also called weak entities
    Independent entity
      ® Is an entity which does not depend on any other entity
        for existence and are also called regular entities




©NIIT                                     RDBMS/Lesson 1/Slide 7 of 35
Data Models

Relationships
 Chen defines a relationship as “an association among
  entities”.
     For example, the relationship between students and
      instructors represents the fact that an instructor teaches
      several students and a student is taught by several
      instructors. This relationship could be named TEACH.
 Relationships are depicted as a diamond with the name of
  the relationship type.




©NIIT                                       RDBMS/Lesson 1/Slide 8 of 35
Data Models

Relationships (Contd.)
 A relationship type is an association of entity types
  (STUDENT-INSTRUCTOR).
 A relationship can associate an entity with itself. For
  example, one instructor in a university may marry another
  instructor.
 Multiple relationships can also exist between the same
  entities.




©NIIT                                       RDBMS/Lesson 1/Slide 9 of 35
Data Models

Just a Minute…
 The following statement has been extracted from a case
  presented by a manufacturer regarding the maintenance of
  their data: “A supplier ships certain parts.” Identify the
  entities mentioned in this statement, and their relationship.
  Draw a diagram depicting the relationship.




©NIIT                                     RDBMS/Lesson 1/Slide 10 of 35
Data Models

Types of Relationships
 There are three types of relationships:
     One-to-One
     One-to-Many (or Many-to-One)
     Many-to-Many




©NIIT                                       RDBMS/Lesson 1/Slide 11 of 35
Data Models

One-to-One Relationship
 Consider the example of a university. For one
  DEPARTMENT (like the department of social sciences) there
  can be only one department head. This is a one-to-one
  relationship.




©NIIT                                  RDBMS/Lesson 1/Slide 12 of 35
Data Models

Many-to-One Relationship
 A STUDENT can MAJOR in only one course, but
  many STUDENTs would have registered for a given
  MAJOR course. This is a many-to-one relationship.




©NIIT                                  RDBMS/Lesson 1/Slide 13 of 35
Data Models

Many-to-Many Relationship
 A STUDENT can take many COURSEs and many
  STUDENTs can register for a given COURSE. This is
  a many-to-many relationship.




©NIIT                                 RDBMS/Lesson 1/Slide 14 of 35
Data Models

Just a Minute…
 What do the following E/R diagrams represent?




©NIIT                                  RDBMS/Lesson 1/Slide 15 of 35
Data Models

Just a Minute… (Contd.)
2. Consider the following statement of a manufacturing
   company:
   “A supplier ships certain parts. A particular part is not
  necessarily shipped by only one supplier. No supplier ships
  only a single part.”
    What type of relationship is this? Draw a diagram to depict
  the relationship.




©NIIT                                     RDBMS/Lesson 1/Slide 16 of 35
Data Models

Attributes
 Attributes are a property of a given entity
 Attributes are depicted as ellipses, labeled with the name of
  the property




©NIIT                                      RDBMS/Lesson 1/Slide 17 of 35
Data Models

Just a Minute…
 A manufacturer needs to maintain the following details
  about the supplier:
    a. Name
    b. Address
    c. Credit Status
    d. Assigned code number
    Draw a diagram to show this information.




©NIIT                                    RDBMS/Lesson 1/Slide 18 of 35
Data Models

Subtypes and Supertypes
 Subtype:
     Is a subset of another entity. It is always dependent on
      the supertype for its existence.
     Is connected to the supertype by an unnamed
      relationship.
 Supertype:
     Is connected to the relationship with a line containing a
      crossbar.
     Is described by attributes that belong to all subtypes. The
      subtype is described by the attributes that are unique to
      it.

©NIIT                                       RDBMS/Lesson 1/Slide 19 of 35
Data Models

Just a Minute…
 There are two types of suppliers. One type of supplier allows
  credit, while the other type insists on payment in cash before
  delivery. The manufacturer wishes to maintain separate
  information on these two types of suppliers. For the credit
  supplier, “credit period” and “credit limit” have to be
  recorded. For the cash supplier, “date of payment” has to be
  stored. Represent this diagrammatically.




©NIIT                                     RDBMS/Lesson 1/Slide 20 of 35
Data Models

Record-based Logical Model
 The three types of record-based models are:
     Hierarchical model
        ® Ina hierarchical model, data is represented in the form
         of a tree
     Network model
        ®A network model is similar to a hierarchical model in
         the way that data and the relationships among them
         are represented in the form of records and links
     Relational model
        ® Inthe relational model, the database is structured in
         fixed-format records of several types
©NIIT                                       RDBMS/Lesson 1/Slide 21 of 35
Data Models

Relational Model
 Dr.E. F. Codd first described the relational model in 1970
 Relational model is an attempt to simplify the database
  structure
     It represents all data in the database as simple tables in
      the row-column format




©NIIT                                       RDBMS/Lesson 1/Slide 22 of 35
Data Models

RDBMS
 RDBMS can be defined as a database management system
  where all data visible to the user is organized strictly as
  tables of data values and where all database operations
  work on these tables




©NIIT                                    RDBMS/Lesson 1/Slide 23 of 35
Data Models

Relational Data Structure
 The organizing principle in a relational database is the table,
  a tabular arrangement of data values
     A table is called a relation
     The row (or record) in the table is called a tuple
     The column (or field) is called an attribute
     The number of tuples is called the cardinality, and the
      number of attributes is called the degree of the table
     Rows are unordered and each row must have some
      columns or a combination of columns that uniquely
      identifies each row, called the primary key of the table


©NIIT                                       RDBMS/Lesson 1/Slide 24 of 35
Data Models

Relational Data Structure (Contd.)
     A domain is a pool of values from which one or more
      attributes (columns) draw their actual values




©NIIT                                    RDBMS/Lesson 1/Slide 25 of 35
Data Models

Representing Missing Information
 Missing or unknown information is represented as NULL in a
  relational system
     NULL is not the same as space or zero




©NIIT                                   RDBMS/Lesson 1/Slide 26 of 35
Data Models

Representing Relationships in an RDBMS
 At any given time, no two rows of the table contain the same
  values in a column or column combination. This column (or
  columns) is called the primary key of the table.
 A column in one table whose value matches the primary key
  in some other table is called a foreign key
     Together, a primary key and a foreign key create a
      parent-child relationship between the tables that connects
      them




©NIIT                                     RDBMS/Lesson 1/Slide 27 of 35
Data Models

Relational Operators
 The relational model is based on the principle of relational
  algebra
     It is a collection of operators operating on relations.
     Each operator takes one or two relations as its input and
      produces a new relation as its output.
 Relational Operators are of the following types:
     RESTRICT: Extracts specified tuples or rows from a
      given relation, based on a condition.
     PROJECT: Extracts specified attributes or columns from
      a given relation.

©NIIT                                        RDBMS/Lesson 1/Slide 28 of 35
Data Models

Relational Operators (Contd.)
     PRODUCT: Builds a relation from two specified relations.
      It consists of all possible combinations of tuples, one from
      each of the two relations.
     UNION: Builds a relation from tuples appearing in either
      or both of the specified relations. To be union compatible,
      the two tables should have the same types of attributes.
     INTERSECT: Builds a relation consisting of tuples that
      appear in both relations.
     DIFFERENCE: Builds a relation of tuples appearing in the
      first but not the second of two specified relations.



©NIIT                                       RDBMS/Lesson 1/Slide 29 of 35
Data Models

Relational Operators (Contd.)
     JOIN: Builds a relation from two specified relations which
      consists of all possible combinations of tuples, one from
      each relation, that satisfy the specified condition.
     DIVIDE: The Divide operator takes two relations and
      builds another relation consisting of values of an attribute
      of one relation that match all the values in the other
      relation.




©NIIT                                       RDBMS/Lesson 1/Slide 30 of 35
Data Models

Applications of an RDBMS
 Some typical applications of an RDBMS are:
     Airline and railway reservations
     Banking applications
     Manufacturing industry
     Order processing
     Hospital management systems
     Library management systems
     Hotel industry


©NIIT                                    RDBMS/Lesson 1/Slide 31 of 35
Data Models

Applications of an RDBMS (Contd.)
 Several RDBMS products are available today. Some popular
  products are:
     Sybase
     Oracle
     Microsoft SQL Server
     Ingress
     DB2




©NIIT                                 RDBMS/Lesson 1/Slide 32 of 35
Data Models

Summary
In this lesson, you learned that:
 Data models can be classified as:
    Object-based models
    Record-based models
 In the entity-relationship diagramming technique:
    Entities are represented as rectangles
    Relationships are represented as diamonds
    Attributes are represented as ellipses
 Relationships, whether many-to-many, one-to-many, or one-
  to-one, are represented symbolically RDBMS/Lesson 1/Slide 33 of 35
©NIIT
Data Models

Summary (Contd.)
 Weak entities are represented in double-lined boxes
 Subtypes are connected to the supertype by an unnamed
  relationship, marked with a crossbar on top
 In the relational model, data is represented in tables
  (relations) of rows (tuples) and columns (attributes)
 The number of tuples is called the cardinality of the relation,
  and the number of attributes is called the degree of the
  relation
 An attribute (or set of attributes) that is unique in every tuple
  is called the primary key

©NIIT                                        RDBMS/Lesson 1/Slide 34 of 35
Data Models

Summary (Contd.)
 Unknown or missing information is represented by a NULL in
  a table
 The foreign key is a column in one table that matches the
  primary key of another table
 The relational model is based on the principle of relational
  algebra
 The eight operators that operate on relations are restrict,
  project, product, union, intersect, difference, join, and divide




©NIIT                                       RDBMS/Lesson 1/Slide 35 of 35

Weitere ähnliche Inhalte

Was ist angesagt?

Object Storage 1: The Fundamentals of Objects and Object Storage
Object Storage 1: The Fundamentals of Objects and Object StorageObject Storage 1: The Fundamentals of Objects and Object Storage
Object Storage 1: The Fundamentals of Objects and Object StorageHitachi Vantara
 
Basics of storage Technology
Basics of storage TechnologyBasics of storage Technology
Basics of storage TechnologyLopamudra Das
 
Impact of cloud computing on health industry
Impact of cloud computing on health industryImpact of cloud computing on health industry
Impact of cloud computing on health industrySuyati Technologies
 
Relational database management system (rdbms) i
Relational database management system (rdbms) iRelational database management system (rdbms) i
Relational database management system (rdbms) iRavinder Kamboj
 
Information storage and management
Information storage and managementInformation storage and management
Information storage and managementAkash Badone
 
Arquitectura de la nube: MODELOS DE SERVICIO Y DESPLIEGUE
Arquitectura de la nube: MODELOS DE SERVICIO Y DESPLIEGUEArquitectura de la nube: MODELOS DE SERVICIO Y DESPLIEGUE
Arquitectura de la nube: MODELOS DE SERVICIO Y DESPLIEGUEStephanie Suazo
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Userssontumax
 
File system-and-database-chapter01-connoly
File system-and-database-chapter01-connolyFile system-and-database-chapter01-connoly
File system-and-database-chapter01-connolyTemma Tems
 
Intro to Distributed Database Management System
Intro to Distributed Database Management SystemIntro to Distributed Database Management System
Intro to Distributed Database Management SystemAli Raza
 
Multimedia database
Multimedia databaseMultimedia database
Multimedia databaseRashmi Agale
 
Slides cloud computing
Slides cloud computingSlides cloud computing
Slides cloud computingHaslina
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationJafar Nesargi
 
Distributed databases and dbm ss
Distributed databases and dbm ssDistributed databases and dbm ss
Distributed databases and dbm ssMohd Arif
 

Was ist angesagt? (20)

Object Storage 1: The Fundamentals of Objects and Object Storage
Object Storage 1: The Fundamentals of Objects and Object StorageObject Storage 1: The Fundamentals of Objects and Object Storage
Object Storage 1: The Fundamentals of Objects and Object Storage
 
Basics of storage Technology
Basics of storage TechnologyBasics of storage Technology
Basics of storage Technology
 
database and database types
database and database typesdatabase and database types
database and database types
 
Types of database
Types of databaseTypes of database
Types of database
 
Impact of cloud computing on health industry
Impact of cloud computing on health industryImpact of cloud computing on health industry
Impact of cloud computing on health industry
 
Chapt 1 odbms
Chapt 1 odbmsChapt 1 odbms
Chapt 1 odbms
 
Raid
RaidRaid
Raid
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Relational database management system (rdbms) i
Relational database management system (rdbms) iRelational database management system (rdbms) i
Relational database management system (rdbms) i
 
Information storage and management
Information storage and managementInformation storage and management
Information storage and management
 
Arquitectura de la nube: MODELOS DE SERVICIO Y DESPLIEGUE
Arquitectura de la nube: MODELOS DE SERVICIO Y DESPLIEGUEArquitectura de la nube: MODELOS DE SERVICIO Y DESPLIEGUE
Arquitectura de la nube: MODELOS DE SERVICIO Y DESPLIEGUE
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Users
 
File system-and-database-chapter01-connoly
File system-and-database-chapter01-connolyFile system-and-database-chapter01-connoly
File system-and-database-chapter01-connoly
 
Intro to Distributed Database Management System
Intro to Distributed Database Management SystemIntro to Distributed Database Management System
Intro to Distributed Database Management System
 
Multimedia database
Multimedia databaseMultimedia database
Multimedia database
 
Slides cloud computing
Slides cloud computingSlides cloud computing
Slides cloud computing
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
 
Distributed databases and dbm ss
Distributed databases and dbm ssDistributed databases and dbm ss
Distributed databases and dbm ss
 
Data storage and indexing
Data storage and indexingData storage and indexing
Data storage and indexing
 

Andere mochten auch

02 rdbms session02
02 rdbms session0202 rdbms session02
02 rdbms session02Niit Care
 
Relational database management system
Relational database management systemRelational database management system
Relational database management systemMuhammad Bilal Tariq
 
11 ds and algorithm session_16
11 ds and algorithm session_1611 ds and algorithm session_16
11 ds and algorithm session_16Niit Care
 
15 ooad uml-20
15 ooad uml-2015 ooad uml-20
15 ooad uml-20Niit Care
 
Vb.net session 09
Vb.net session 09Vb.net session 09
Vb.net session 09Niit Care
 
09 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_1309 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_13Niit Care
 
Jdbc session01
Jdbc session01Jdbc session01
Jdbc session01Niit Care
 
14 ooad uml-19
14 ooad uml-1914 ooad uml-19
14 ooad uml-19Niit Care
 
Deawsj 7 ppt-2_c
Deawsj 7 ppt-2_cDeawsj 7 ppt-2_c
Deawsj 7 ppt-2_cNiit Care
 
Java Garbage Collection - How it works
Java Garbage Collection - How it worksJava Garbage Collection - How it works
Java Garbage Collection - How it worksMindfire Solutions
 
Understanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About ItUnderstanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About ItAzul Systems Inc.
 
Aae oop xp_06
Aae oop xp_06Aae oop xp_06
Aae oop xp_06Niit Care
 
JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)Prof. Erwin Globio
 
Chapter 21 c language
Chapter 21 c languageChapter 21 c language
Chapter 21 c languageHareem Aslam
 

Andere mochten auch (20)

02 rdbms session02
02 rdbms session0202 rdbms session02
02 rdbms session02
 
Relational database management system
Relational database management systemRelational database management system
Relational database management system
 
11 ds and algorithm session_16
11 ds and algorithm session_1611 ds and algorithm session_16
11 ds and algorithm session_16
 
Dacj 2-2 c
Dacj 2-2 cDacj 2-2 c
Dacj 2-2 c
 
Oops recap
Oops recapOops recap
Oops recap
 
 
15 ooad uml-20
15 ooad uml-2015 ooad uml-20
15 ooad uml-20
 
Vb.net session 09
Vb.net session 09Vb.net session 09
Vb.net session 09
 
09 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_1309 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_13
 
OOP Java
OOP JavaOOP Java
OOP Java
 
Jdbc session01
Jdbc session01Jdbc session01
Jdbc session01
 
14 ooad uml-19
14 ooad uml-1914 ooad uml-19
14 ooad uml-19
 
Deawsj 7 ppt-2_c
Deawsj 7 ppt-2_cDeawsj 7 ppt-2_c
Deawsj 7 ppt-2_c
 
Java Garbage Collection - How it works
Java Garbage Collection - How it worksJava Garbage Collection - How it works
Java Garbage Collection - How it works
 
Ds 8
Ds 8Ds 8
Ds 8
 
Understanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About ItUnderstanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About It
 
Aae oop xp_06
Aae oop xp_06Aae oop xp_06
Aae oop xp_06
 
Dacj 1-1 a
Dacj 1-1 aDacj 1-1 a
Dacj 1-1 a
 
JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)
 
Chapter 21 c language
Chapter 21 c languageChapter 21 c language
Chapter 21 c language
 

Ähnlich wie Rdbms xp 01

What is the difference between Data and Information give an exa
What is the difference between Data and Information give an exaWhat is the difference between Data and Information give an exa
What is the difference between Data and Information give an exavictorring
 
DBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental conceptsDBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental conceptsKuntal Bhowmick
 
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...Dipen Parmar
 
DBMS-2.pptx
DBMS-2.pptxDBMS-2.pptx
DBMS-2.pptxkingVox
 
Database Management Systems Tutorial
Database Management Systems TutorialDatabase Management Systems Tutorial
Database Management Systems TutorialSachin MK
 
17032658 database-management-systems-tutorial-090917034406-phpapp02
17032658 database-management-systems-tutorial-090917034406-phpapp0217032658 database-management-systems-tutorial-090917034406-phpapp02
17032658 database-management-systems-tutorial-090917034406-phpapp02Samina Sam Sam
 
PP DBMS - 1 (2).pptx
PP DBMS - 1 (2).pptxPP DBMS - 1 (2).pptx
PP DBMS - 1 (2).pptxskilljiolms
 
PP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxPP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxskilljiolms
 
PP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxPP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxskilljiolms
 
Technical Note on DBMS
Technical Note on DBMSTechnical Note on DBMS
Technical Note on DBMSKr Shrishant
 
Database Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docxDatabase Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docxtheodorelove43763
 

Ähnlich wie Rdbms xp 01 (20)

Db lec 01
Db lec 01Db lec 01
Db lec 01
 
Rdbms xp 02
Rdbms xp 02Rdbms xp 02
Rdbms xp 02
 
parth presentation
parth presentationparth presentation
parth presentation
 
Erd1
Erd1Erd1
Erd1
 
Sq lite module3
Sq lite module3Sq lite module3
Sq lite module3
 
RDBMS_Unit 01
RDBMS_Unit 01RDBMS_Unit 01
RDBMS_Unit 01
 
What is the difference between Data and Information give an exa
What is the difference between Data and Information give an exaWhat is the difference between Data and Information give an exa
What is the difference between Data and Information give an exa
 
DBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental conceptsDBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental concepts
 
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
 
RDBMS_Concept.ppt
RDBMS_Concept.pptRDBMS_Concept.ppt
RDBMS_Concept.ppt
 
DBMS-2.pptx
DBMS-2.pptxDBMS-2.pptx
DBMS-2.pptx
 
Database Management Systems Tutorial
Database Management Systems TutorialDatabase Management Systems Tutorial
Database Management Systems Tutorial
 
17032658 database-management-systems-tutorial-090917034406-phpapp02
17032658 database-management-systems-tutorial-090917034406-phpapp0217032658 database-management-systems-tutorial-090917034406-phpapp02
17032658 database-management-systems-tutorial-090917034406-phpapp02
 
PP DBMS - 1 (2).pptx
PP DBMS - 1 (2).pptxPP DBMS - 1 (2).pptx
PP DBMS - 1 (2).pptx
 
PP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxPP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptx
 
PP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxPP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptx
 
Technical Note on DBMS
Technical Note on DBMSTechnical Note on DBMS
Technical Note on DBMS
 
Data Models.ppt
Data Models.pptData Models.ppt
Data Models.ppt
 
Database Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docxDatabase Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docx
 
Rdbms concepts
Rdbms conceptsRdbms concepts
Rdbms concepts
 

Mehr von Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Rdbms xp 01

  • 1. Data Models Objectives In this lesson, you will learn to: Define a Database Management System (DBMS) Describe the types of data models Create an entity-relationship model List the types of relationships between entities Define the Relational Database Management System (RDBMS) Describe the operators that work on relations ©NIIT RDBMS/Lesson 1/Slide 1 of 35
  • 2. Data Models Database Management Systems A database is a collection of logically related information Database Management is the task of maintaining databases so that information is readily available The software required to perform the task of database management is called a Database Management System (DBMS) ©NIIT RDBMS/Lesson 1/Slide 2 of 35
  • 3. Data Models Data Models Can be classified into two categories: Object-based logical model – focuses on describing the data, the relationship among the data, and any constraints defined Record-based logical model – focuses on describing the data structure and the access techniques in the Database Management System ©NIIT RDBMS/Lesson 1/Slide 3 of 35
  • 4. Data Models Object-based Logical Model There are various object-based models. The most widely used is the entity-relationship model (E/R model) ©NIIT RDBMS/Lesson 1/Slide 4 of 35
  • 5. Data Models The Entity-relationship Model Introduced by Peter Chen Chen introduced not only the E/R model, but also a corresponding diagramming technique ©NIIT RDBMS/Lesson 1/Slide 5 of 35
  • 6. Data Models Entities Chen defined an entity as “a thing, which can be easily identified” An entity is any object, place, person, or activity about which data is recorded In the diagramming technique, entities are named and represented inside a box An entity type is a set of things that share common properties STUDENT, COURSE, and GRADE are examples of entity type An entity type is usually in uppercase ©NIIT RDBMS/Lesson 1/Slide 6 of 35
  • 7. Data Models Entities (Contd.) Types of Entities Dependent entity ® Is an entity whose existence depends on the existence of another entity and are also called weak entities Independent entity ® Is an entity which does not depend on any other entity for existence and are also called regular entities ©NIIT RDBMS/Lesson 1/Slide 7 of 35
  • 8. Data Models Relationships Chen defines a relationship as “an association among entities”. For example, the relationship between students and instructors represents the fact that an instructor teaches several students and a student is taught by several instructors. This relationship could be named TEACH. Relationships are depicted as a diamond with the name of the relationship type. ©NIIT RDBMS/Lesson 1/Slide 8 of 35
  • 9. Data Models Relationships (Contd.) A relationship type is an association of entity types (STUDENT-INSTRUCTOR). A relationship can associate an entity with itself. For example, one instructor in a university may marry another instructor. Multiple relationships can also exist between the same entities. ©NIIT RDBMS/Lesson 1/Slide 9 of 35
  • 10. Data Models Just a Minute… The following statement has been extracted from a case presented by a manufacturer regarding the maintenance of their data: “A supplier ships certain parts.” Identify the entities mentioned in this statement, and their relationship. Draw a diagram depicting the relationship. ©NIIT RDBMS/Lesson 1/Slide 10 of 35
  • 11. Data Models Types of Relationships There are three types of relationships: One-to-One One-to-Many (or Many-to-One) Many-to-Many ©NIIT RDBMS/Lesson 1/Slide 11 of 35
  • 12. Data Models One-to-One Relationship Consider the example of a university. For one DEPARTMENT (like the department of social sciences) there can be only one department head. This is a one-to-one relationship. ©NIIT RDBMS/Lesson 1/Slide 12 of 35
  • 13. Data Models Many-to-One Relationship A STUDENT can MAJOR in only one course, but many STUDENTs would have registered for a given MAJOR course. This is a many-to-one relationship. ©NIIT RDBMS/Lesson 1/Slide 13 of 35
  • 14. Data Models Many-to-Many Relationship A STUDENT can take many COURSEs and many STUDENTs can register for a given COURSE. This is a many-to-many relationship. ©NIIT RDBMS/Lesson 1/Slide 14 of 35
  • 15. Data Models Just a Minute… What do the following E/R diagrams represent? ©NIIT RDBMS/Lesson 1/Slide 15 of 35
  • 16. Data Models Just a Minute… (Contd.) 2. Consider the following statement of a manufacturing company: “A supplier ships certain parts. A particular part is not necessarily shipped by only one supplier. No supplier ships only a single part.” What type of relationship is this? Draw a diagram to depict the relationship. ©NIIT RDBMS/Lesson 1/Slide 16 of 35
  • 17. Data Models Attributes Attributes are a property of a given entity Attributes are depicted as ellipses, labeled with the name of the property ©NIIT RDBMS/Lesson 1/Slide 17 of 35
  • 18. Data Models Just a Minute… A manufacturer needs to maintain the following details about the supplier: a. Name b. Address c. Credit Status d. Assigned code number Draw a diagram to show this information. ©NIIT RDBMS/Lesson 1/Slide 18 of 35
  • 19. Data Models Subtypes and Supertypes Subtype: Is a subset of another entity. It is always dependent on the supertype for its existence. Is connected to the supertype by an unnamed relationship. Supertype: Is connected to the relationship with a line containing a crossbar. Is described by attributes that belong to all subtypes. The subtype is described by the attributes that are unique to it. ©NIIT RDBMS/Lesson 1/Slide 19 of 35
  • 20. Data Models Just a Minute… There are two types of suppliers. One type of supplier allows credit, while the other type insists on payment in cash before delivery. The manufacturer wishes to maintain separate information on these two types of suppliers. For the credit supplier, “credit period” and “credit limit” have to be recorded. For the cash supplier, “date of payment” has to be stored. Represent this diagrammatically. ©NIIT RDBMS/Lesson 1/Slide 20 of 35
  • 21. Data Models Record-based Logical Model The three types of record-based models are: Hierarchical model ® Ina hierarchical model, data is represented in the form of a tree Network model ®A network model is similar to a hierarchical model in the way that data and the relationships among them are represented in the form of records and links Relational model ® Inthe relational model, the database is structured in fixed-format records of several types ©NIIT RDBMS/Lesson 1/Slide 21 of 35
  • 22. Data Models Relational Model Dr.E. F. Codd first described the relational model in 1970 Relational model is an attempt to simplify the database structure It represents all data in the database as simple tables in the row-column format ©NIIT RDBMS/Lesson 1/Slide 22 of 35
  • 23. Data Models RDBMS RDBMS can be defined as a database management system where all data visible to the user is organized strictly as tables of data values and where all database operations work on these tables ©NIIT RDBMS/Lesson 1/Slide 23 of 35
  • 24. Data Models Relational Data Structure The organizing principle in a relational database is the table, a tabular arrangement of data values A table is called a relation The row (or record) in the table is called a tuple The column (or field) is called an attribute The number of tuples is called the cardinality, and the number of attributes is called the degree of the table Rows are unordered and each row must have some columns or a combination of columns that uniquely identifies each row, called the primary key of the table ©NIIT RDBMS/Lesson 1/Slide 24 of 35
  • 25. Data Models Relational Data Structure (Contd.) A domain is a pool of values from which one or more attributes (columns) draw their actual values ©NIIT RDBMS/Lesson 1/Slide 25 of 35
  • 26. Data Models Representing Missing Information Missing or unknown information is represented as NULL in a relational system NULL is not the same as space or zero ©NIIT RDBMS/Lesson 1/Slide 26 of 35
  • 27. Data Models Representing Relationships in an RDBMS At any given time, no two rows of the table contain the same values in a column or column combination. This column (or columns) is called the primary key of the table. A column in one table whose value matches the primary key in some other table is called a foreign key Together, a primary key and a foreign key create a parent-child relationship between the tables that connects them ©NIIT RDBMS/Lesson 1/Slide 27 of 35
  • 28. Data Models Relational Operators The relational model is based on the principle of relational algebra It is a collection of operators operating on relations. Each operator takes one or two relations as its input and produces a new relation as its output. Relational Operators are of the following types: RESTRICT: Extracts specified tuples or rows from a given relation, based on a condition. PROJECT: Extracts specified attributes or columns from a given relation. ©NIIT RDBMS/Lesson 1/Slide 28 of 35
  • 29. Data Models Relational Operators (Contd.) PRODUCT: Builds a relation from two specified relations. It consists of all possible combinations of tuples, one from each of the two relations. UNION: Builds a relation from tuples appearing in either or both of the specified relations. To be union compatible, the two tables should have the same types of attributes. INTERSECT: Builds a relation consisting of tuples that appear in both relations. DIFFERENCE: Builds a relation of tuples appearing in the first but not the second of two specified relations. ©NIIT RDBMS/Lesson 1/Slide 29 of 35
  • 30. Data Models Relational Operators (Contd.) JOIN: Builds a relation from two specified relations which consists of all possible combinations of tuples, one from each relation, that satisfy the specified condition. DIVIDE: The Divide operator takes two relations and builds another relation consisting of values of an attribute of one relation that match all the values in the other relation. ©NIIT RDBMS/Lesson 1/Slide 30 of 35
  • 31. Data Models Applications of an RDBMS Some typical applications of an RDBMS are: Airline and railway reservations Banking applications Manufacturing industry Order processing Hospital management systems Library management systems Hotel industry ©NIIT RDBMS/Lesson 1/Slide 31 of 35
  • 32. Data Models Applications of an RDBMS (Contd.) Several RDBMS products are available today. Some popular products are: Sybase Oracle Microsoft SQL Server Ingress DB2 ©NIIT RDBMS/Lesson 1/Slide 32 of 35
  • 33. Data Models Summary In this lesson, you learned that: Data models can be classified as: Object-based models Record-based models In the entity-relationship diagramming technique: Entities are represented as rectangles Relationships are represented as diamonds Attributes are represented as ellipses Relationships, whether many-to-many, one-to-many, or one- to-one, are represented symbolically RDBMS/Lesson 1/Slide 33 of 35 ©NIIT
  • 34. Data Models Summary (Contd.) Weak entities are represented in double-lined boxes Subtypes are connected to the supertype by an unnamed relationship, marked with a crossbar on top In the relational model, data is represented in tables (relations) of rows (tuples) and columns (attributes) The number of tuples is called the cardinality of the relation, and the number of attributes is called the degree of the relation An attribute (or set of attributes) that is unique in every tuple is called the primary key ©NIIT RDBMS/Lesson 1/Slide 34 of 35
  • 35. Data Models Summary (Contd.) Unknown or missing information is represented by a NULL in a table The foreign key is a column in one table that matches the primary key of another table The relational model is based on the principle of relational algebra The eight operators that operate on relations are restrict, project, product, union, intersect, difference, join, and divide ©NIIT RDBMS/Lesson 1/Slide 35 of 35