Question

1. List the numbers of the boxes below and their contents to show how the binary...

1. List the numbers of the boxes below and their contents to show how the binary tree below appears in memory when stored without points using a block of contiguous memory cells.

Ferb
         /    \
   Isabella   Perry
    /           \
  Candace      Phineas

____  ____ ____ ____ ____ ____ ____
1      2    3     4     5     6     7

2. Translate this query for the above database into SQL:

For which trip was Rudolf the leader of Santa's team?

SELECT Name
FROM Assignment, Reindeer
WHERE Reindeer.ID = Assignment.ID and Trip <> '1932';

SELECT Trip
FROM Assignment, Job, Reindeer
WHERE Reindeer.ID = Assignment.ID
and Assignment.JobID = Job.JobID
and Name = 'Rudolf';

SELECT JobID
FROM Assignment, Reindeer
WHERE Reindeer.ID = Assignment.ID
and Trip = '2009';

SELECT Trip
FROM Assignment, Reindeer
WHERE Reindeer.ID = Assignment.ID
and Name = 'Rudolf;

3. Describe the effect the following SQL statement would have on the database displayed above:

    INSERT INTO Reindeer
    VALUES ('234', 'Cupid', '36');

Updates Cupid's row in the Reindeer Table.

Adds a row to the Assignment Table.

Adds a row to the Reindeer Table.

None of the above.

4.Describe the effect that the following SQL statement would have on the above database:

         UPDATE Assignment
         SET Trip = '1961'
         WHERE ID = '345'
           and JobID = '02';

It would add a new row into the database.

It would have no effect whatsoever.

It would change the year for all the rows to 1961.

It would change only the first entry to 1961.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.

Ferb Isabella Perry Candace \0 \0 Phineas

2.

SELECT Trip
FROM Assignment, Job, Reindeer
WHERE Reindeer.ID = Assignment.ID
and Assignment.JobID = Job.JobID
and Name = 'Rudolf';

3.

Adds a row to the Reindeer Table.

4.

It would change only the first entry to 1961.

Do ask if any doubt. Please up-vote.

Add a comment
Know the answer?
Add Answer to:
1. List the numbers of the boxes below and their contents to show how the binary...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT