Course Hero Logo

chapter4 - Database: Chapter 4 : Intermediate SQL 1. Join...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 4 out of 6 pages.

Database:: Chapter 4 :: Intermediate SQL1.Joined RelationsJoin operations take two relations and return as a result another relation.These additional operations are typically used as subquery expressions in the from clauseJoin condition – defines which tuples in the two relations match, and what attributes arepresent in the result of the join.Join type – defines how tuples in each relation that do not match any tuple in the otherrelation (based on the join condition) are treated.2.Outer JoinAn extension of the join operation that avoids loss of information.Computes the join and then adds tuples form one relation that does not match tuples in theother relation to the result of the join.Uses null values.Left Outer JoinLeft Outer Join Queries
Database:: Chapter 4 :: Intermediate SQLRight Outer JoinFull Outer Join3.ViewsIn some cases, it is not desirable for all users to see the entire logical model (that is, all theactual relations stored in the database.)Consider a person who needs to know an instructors name and department, but not thesalary. This person should see a relation described, in SQL, byA view provides a mechanism to hide certain data from the view of certain users.Any relation that is not of the conceptual model but is made visible to a user as a “virtualrelation” is called a view.View DefinitionA view is defined using the create view statement which has the formoWhere <query expression> is any legal SQL expression. The view name isrepresented by v.Once a view is defined, the view name can be used to refer to the virtual relation that theview generates.View definition is not the same as creating a new relation
Database:: Chapter 4 :: Intermediate SQLoRather, a view definition causes the saving of an expression; the expression issubstituted into queries using the view.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 6 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
Dr.
Tags
Relational model, relation, Intermediate SQL

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture