csci 4333 database design and implementation exercise 2 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CSCI 4333 Database Design and Implementation – Exercise (2) PowerPoint Presentation
Download Presentation
CSCI 4333 Database Design and Implementation – Exercise (2)

Loading in 2 Seconds...

play fullscreen
1 / 9

CSCI 4333 Database Design and Implementation – Exercise (2) - PowerPoint PPT Presentation


  • 121 Views
  • Uploaded on

CSCI 4333 Database Design and Implementation – Exercise (2). Xiang Lian The University of Texas – Pan American Edinburg, TX 78539 lianx@utpa.edu. Relational Algebra and SQL (1). Find ids of sailors who’ve reserved boat with bid 103 Sailors ( sid , sname ) Reserves ( sid , bid, date )

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CSCI 4333 Database Design and Implementation – Exercise (2)' - levana


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
csci 4333 database design and implementation exercise 2

CSCI 4333 Database Design and Implementation – Exercise (2)

Xiang Lian

The University of Texas – Pan American

Edinburg, TX 78539

lianx@utpa.edu

relational algebra and sql 1
Relational Algebra and SQL (1)
  • Find ids of sailors who’ve reserved boat with bid 103
    • Sailors (sid, sname)
    • Reserves (sid, bid, date)
    • Boats (bid, bname, color)

1. Relational algebra (s and p):

2. SQL:

relational algebra and sql 2
Relational Algebra and SQL (2)
  • Find the names of sailors who’ve reserved boat with bid 103
    • Sailors (sid, sname)
    • Reserves (sid, bid, date)
    • Boats (bid, bname, color)

1. Relational algebra (s and p):

2. SQL:

relational algebra and sql 3
Relational Algebra and SQL (3)
  • Find the names of sailors who’ve reserved a red boat
    • Sailors (sid, sname)
    • Reserves (sid, bid, date)
    • Boats (bid, bname, color)

1. Relational algebra (s and p):

2. SQL:

relational algebra and sql 4
Relational Algebra and SQL (4)
  • Find the names of sailors who’ve reserved a red or a green boat
    • Sailors (sid, sname)
    • Reserves (sid, bid, date)
    • Boats (bid, bname, color)

1. Relational algebra (s and p):

2. SQL:

relational algebra and sql 5
Relational Algebra and SQL (5)
  • Find the names of sailors who’ve reserved a red and a green boat
    • Sailors (sid, sname)
    • Reserves (sid, bid, date)
    • Boats (bid, bname, color)

1. Relational algebra (s and p):

2. SQL:

relational algebra and sql 6
Relational Algebra and SQL (6)
  • Find the ids of sailors who have made at least two reservations on the same date
    • Sailors (sid, sname)
    • Reserves (sid, bid, date)
    • Boats (bid, bname, color)

1. Relational algebra (s and p):

2. SQL:

relational algebra and sql 7
Relational Algebra and SQL (7)
  • 1. Find the ids of sailors who’ve reserved allboats
  • 2. Find the ids of sailors who’ve reserved allred boats
  • 3. Find the names of sailors who’ve reserved allred boats
    • Sailors (sid, sname)
    • Reserves (sid, bid, date)
    • Boats (bid, bname, color)

1. Relational algebra (s and p):

2. SQL: