Preview

Mister

Good Essays
Open Document
Open Document
1807 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Mister
ITRW 311 Mr R Botes Building 6-105 (Office hours will still be given) romeo.botes@nwu.ac.za

DATABASES I

1

Chapter 4 The Relational Database Model
Textbook p116-121 Study Unit: 4

2

In this chapter, you will learn:
• What is meant by relational algebra? • How to manipulate database tables using relational set operators • How the DBMS supports the key relational operators: select, project and join. • The different types of joins. • How to write queries using relational algebra expressions.

3

Relational Algebra
• Relational algebra and relational calculus are the mathematical basis for ‘relational databases’. • Relational algebra…….
– Defines theoretical way of manipulating table contents using relational operators – Use of relational algebra operators on existing tables (relations) produces new relations

• Codd defined eight relational operators:

4

Relational Algebra Operators
• SELECT • PROJECT

• UNION
• INTERSECT

• DIFFERENCE • DIVIDE • PRODUCT
• JOIN

5

Re-visiting Set Theory

6

SELECT
• Yields values for all rows found in a table • Can be used to list either all row values or it can yield only those row values that match a specified criterion • Yields a horizontal subset of a table

7

SELECT (continued)
• The SELECT operator denoted by σθ , is formally defined as: σθ (R) or σ (RELATION)

• where σθ (R) is the set of specified tuples of the relation R and θ is the predicate (or criterion) to extract the required tuples.

8

SELECT (continued)

9

SELECT (continued)

10

PROJECT
• Project
– Yields all values for selected attributes – Yields a vertical subset of a table

11

PROJECT (continued)
• The PROJECT operator, denoted by ∏, is formally defined as:
∏ a1…an (R) or ∏ (Relation)

• where the projection of the relation R, denoted by ∏ a1…an (R) is the set of specified attributes a1…an of the relation R.

12

PROJECT (continued)

13

Union
• Union:

You May Also Find These Documents Helpful

  • Satisfactory Essays

    cis3730_Exam1_Studyguide

    • 512 Words
    • 2 Pages

    You will be asked to write SQL scripts to display required information, like we did in the homework.…

    • 512 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    unit 6

    • 360 Words
    • 2 Pages

    6) The * in SELECT * clause of an SQL statement is a wildcard for returning all columns in a table.…

    • 360 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    • Define relational database architecture. Consider Microsoft® Access*', Microsoft SQL Server®', Oracle®, IBM DB2®, and so on.…

    • 352 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    pt2520 assignment 1

    • 466 Words
    • 2 Pages

    Let’s get the definition out the way, the standard meaning if you will SQL or “sequel” to some is a special-purpose programming language designed for managing data held in a relational database management system (RDBMS). Now that we got that out the way, let’s get to the first question.…

    • 466 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    IST223 Crib sheet

    • 3425 Words
    • 7 Pages

    rectangles, and relationships are shown by lines between the rectangles. Attributes are generally listed within the rectangle. The many side of many relationships is represented by a crows footentity-relationship (E-R) modelA set of constructs and conventions used to create data models. The things in the users world are represented by entities, and the associations among those things are represented by relationships. The results are usually documented in an entity-relationship (E-R) diagramID-dependent entityan entity whose identifier includes the identifier of another entityidentifierwhich are attributes that name, or identify, entity instancesidentifying relationshipIn such relationships, the parent is always required, but the child (the ID-dependent entity) may or may not be required, depending on application requirements. Identifying relationships are shown with solid lines in E-R diagrams.is-aRelationships among supertype/subtype entitiesmandatoryat least one entity instance must participate in the relationshipmaximum cardinalityThe maximum cardinality is the maximum number of entity instances that can participate in a relationship instance.minimum cardinalityThe minimum cardinality is the minimum number of entity instances that must participate in a relationship instance.nonidentifying relationshiprelationship drawn with a dashed line (refer to Figure 5-7) is used between strong entities and is called a nonidentifying relationship because there are no ID-dependent entities in the relationship.null valueare a problem because they are ambiguous. They can mean that a value is inappropriate, unknown, or known, but not yet been entered into the databaseparentAn entity or row on the one side of a one-to-many relationshiprecursive relationshipoccurs when an entity type has a relationship to itself.relationship classAssociations among entity classesrelationship instanceassociations among entity instances.strong entityan entity that represents something that can exist…

    • 3425 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    One benefit of a relational database management system is that it contains a built-in query language, which lets you obtain immediate answers to the questions you ask about your data. _________________________…

    • 585 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    cheat sheet

    • 1430 Words
    • 6 Pages

     The actual specification of attributes for a given relation is driven by an analysis of “Functional Dependencies” amongst attributes of the proposed relation…

    • 1430 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    Database concepts

    • 586 Words
    • 3 Pages

    In database normalization, one of the important features of third normal form is that it excludes certain types of transitive dependencies. E.F. Codd, the inventor of the relational model, introduced the concepts of…

    • 586 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Ic3 Study Guide

    • 2207 Words
    • 9 Pages

    4. What editable entity is created by the intersection of a row and a column in a table?…

    • 2207 Words
    • 9 Pages
    Good Essays
  • Good Essays

    Cis 111

    • 790 Words
    • 4 Pages

    “The benefits of using the relational model would result in an easy to use, flexible, high performance database at a low cost.” (Anita, 2010) Therefore, allowing them to participate in the entire design process of the logical construction. The relational model provides an easy and flexible way of manipulating data with a system that offers:…

    • 790 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    MIS 535 Final Exam

    • 592 Words
    • 3 Pages

    8. (TCO C) What types of relationships are possible in a relational database? Describe and give an example of each.…

    • 592 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    DBM 380 Syllabus

    • 623 Words
    • 4 Pages

    This course covers database concepts. Topics include data analysis, the principal data models with emphasis on the relational model, entity-relationship diagrams, database design, normalization, and database administration.…

    • 623 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Relational Database Paper

    • 547 Words
    • 3 Pages

    A relationship is an important component of a relational database. A relationship exists between two tables when one or more key fields from one table are matched to one or more key fields in another table. The fields in both tables usually have the same name, data type, and size. It also helps to further refine table structures and minimize redundant data.…

    • 547 Words
    • 3 Pages
    Satisfactory Essays
  • Better Essays

    The differences in the architectures are based on how the tables and records are related. Relational architecture is a very popular database. It is also the most mature and widely used database system in production. Relational databases can be used to track patient care in the form of treatments, outcomes of those treatments, and critical indicators of a patient 's current state such as blood pressure, heart rate, and blood glucose levels. They can also be used to interconnect with multiple informational systems throughout a healthcare facility. Relational databases have the potential to eliminate paper storage and transfer of information and to answer important questions about healthcare efficacy. Relational systems serve as the repositories of record behind nearly all online transactions and most online content management systems including social networks. This database also serves as a well-understood point of reference for new extensions and revolutions in database systems that may arise in the future. Another type of database architecture is the Object-oriented model. This model is powerful and quite complex. With the relatively new object-relational database model is the wide spread and simple relational database model extended by some basic object-oriented concepts. These allow them to work with the relational database model but also have some advantages of the…

    • 754 Words
    • 4 Pages
    Better Essays
  • Good Essays

    Relational Model

    • 406 Words
    • 2 Pages

    Figure 2. Relational Model provides an overview of the table content, table column/attributes and the relationships that connects them. The identified relationships are as follow: a single customer can make multiple sales (1:M), a single sale contains specific set of sales details (1:1), the same payment could be used for multiple sales (1:M). Furthermore, an order details can contain multiple books or product items (1:M), a single author can have multiple books in the store (1:M) just as a single publisher can publish many different books and authors (1:M).…

    • 406 Words
    • 2 Pages
    Good Essays