MIS 315 Final Exam

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
GameKnowt Play
New
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/17

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

18 Terms

1
New cards

DDL statements are used to

create and modify the structure of the database

2
New cards

Examples of DDL commands

CREATE, ALTER, DROP

3
New cards

DML statements are used to

manipulate the data within the database

4
New cards

DML statements include

INSERT INTO, UPDATE, DELETE, SELECT

5
New cards

DML statements also include the following command for data retrieval

SELECT

6
New cards

What would be used to populate a table with data

INSERT INTO

7
New cards

What statement would be used to change a value in a record of a table

UPDATE

8
New cards

Observe the table STUDENT:

STUDENT

StudentID ย ย ย ย ย ย ย ย ย  SSNย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  Nameย ย ย ย ย ย ย ย ย ย ย ย ย  Class
D111ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  111-11-1111ย ย ย ย ย ย ย ย ย ย  Connorย ย ย ย ย ย ย ย ย  Freshman
D222ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  222-22-2222ย ย ย ย ย ย ย ย ย ย  Trevorย ย ย ย ย ย ย ย ย ย  Freshman
D333ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  333-33-3333ย ย ย ย ย ย ย ย ย ย  Connorย ย ย ย ย ย ย ย ย  Sophomore
D444ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  444-44-4444ย ย ย ย ย ย ย ย ย ย  Parkerย ย ย ย ย ย ย ย ย ย  Sophomore
D555ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  555-55-5555ย ย ย ย ย ย ย ย ย ย  Connorย ย ย ย ย ย ย ย ย  Sophomore

ย 

Which of the following queries on table STUDENT will return three values?ย 

SELECT DISTINCT name FROM student;

9
New cards

Observe the table STUDENT:

STUDENT

StudentID ย ย ย ย ย ย ย ย ย  SSNย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย Nameย ย ย ย ย ย ย ย ย ย ย ย ย  Class

D111ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  111-11-1111ย ย ย ย ย ย ย ย ย ย  Connorย ย ย ย ย ย ย ย ย  Freshman
D222ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  222-22-2222ย ย ย ย ย ย ย ย ย ย  Trevorย ย ย ย ย ย ย ย ย ย  Freshman
D333ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  333-33-3333ย ย ย ย ย ย ย ย ย ย  Connorย  ย  ย  ย  ย Sophomore
D444ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  444-44-4444ย ย ย ย ย ย ย ย ย ย  Parkerย ย ย ย ย ย ย ย ย ย  Sophomore
D555ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  555-55-5555ย ย ย ย ย ย ย ย ย ย  Connorย  ย  ย  ย  ย Sophomore

ย 

How many records will the following query on table STUDENT return?ย 

SELECT * 
FROM student 
WHERE name LIKE '%or%';

4

10
New cards

Observe the table STUDENT:

ย 

STUDENT

StudentID ย ย ย ย ย ย ย ย ย  SSNย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  Nameย ย ย ย ย ย ย ย ย ย ย ย ย  Class
D111ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  111-11-1111ย ย ย ย ย ย ย ย ย ย  Connorย  ย  ย  ย  ย Freshman
D222ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  222-22-2222ย ย ย ย ย ย ย ย ย ย  Trevorย ย ย ย ย ย ย ย ย ย  Freshman
D333ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  333-33-3333ย ย ย ย ย ย ย ย ย ย  Connorย  ย  ย  ย  ย Sophomore
D444ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  444-44-4444ย ย ย ย ย ย ย ย ย ย  Parkerย ย ย ย ย ย ย ย ย ย  Sophomore
D555ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  555-55-5555ย ย ย ย ย ย ย ย ย ย  Connorย ย ย ย ย ย ย ย ย  Sophomore

ย 

What will be the result of the following query on table STUDENT?

SELECT COUNT( *) 
FROM student 
GROUP BY class 
HAVING COUNT(*) <3;

There will be two groups of classes

11
New cards

Observe the DOCTORS AND SPECIALTIES database:

DOCTOR

DocID

DocName

NoOfPatients

SpecID

111

Jill

20

SUR

222

Linda

20

SUR

333

Lisa

30

RAD

444

Sue

15

ANE

555

Lola

15

ย 

ย 

SPECIALTY

SpecID

SpecName

SUR

Surgery

RAD

Radiology

ANE

Anesthesiology

ย 

How many rows will the following query return?

SELECT * 
FROM doctor JOIN specialty
ย  ON doctor.specid = specialty.specid;

4

12
New cards

Explain this code

SELECT * 
FROM doctor JOIN specialty
ย  ON doctor.specid = specialty.specid;

The join operation produces a table that combines rows from both tables where SPECID values match the DOCTOR values

13
New cards

Observe the DOCTORS AND SPECIALTIES database:

DOCTOR

DocID

DocName

NoOfPatients

SpecID

111

Jill

20

SUR

222

Linda

20

SUR

333

Lisa

30

RAD

444

Sue

15

ANE

555

Lola

15

ย 

ย 

SPECIALTY

SpecID

SpecName

SUR

Surgery

RAD

Radiology

ANE

Anesthesiology

How many rowsย will the following query return?

SELECT *
FROM doctor LEFT JOIN specialty
ย  ON doctor.specid = specialty.specid;

5

14
New cards

Explain this code

SELECT *
FROM doctor LEFT JOIN specialty
ย  ON doctor.specid = specialty.specid;

The LEFT JOIN statement ensures that all rows from the DOCTOR table are included in the result regardless of whether there is a match to the SPECIALTY table

15
New cards

Assume that Table B has a foreign key referring to a primary key in Table A.ย  Which of the following options may result in the following: deleting a row in Table A will cause a deletion of a row in Table B?

DELETE CASCADE

16
New cards

Observe the HOMETOWN REALESTATE database:

SELLER

SellerID

SellerName

RealtorID

S111

Paul

R1

S222

Carly

R1

S333

Ana

R2

S444

Charlotte

R2

S555

Aidan

R3

C666

Eric

R1

C777

Christina

R1

ย 

REALTOR

RealtorID

RealtorName

R1

Claire

R2

Kate

R3

Cliff

R4

William

ย 

Suppose a DBMS enforces a DELETE RESTRICT option on the database's referential integrity constraint between SELLER and REALTOR. What will be the outcome after a user tries to delete the first record (R1, Claire) from REALTOR?

SELLER will have 7 records, REALTOR will have 4 records

17
New cards

Delete restrict

Does not allow a record to be deleted if its primary key value is referred to by a foreign key

18
New cards

Observe the HOMETOWN REALESTATE database:

ย 

SELLER

SellerID

SellerName

RealtorID

S111

Paul

R1

S222

Carly

R1

S333

Ana

R2

S444

Charlotte

R2

S555

Aidan

R3

C666

Eric

R1

C777

Christina

R1

ย 

REALTOR

RealtorID

RealtorName

R1

Claire

R2

Kate

R3

Cliff

R4

William

ย 

Suppose a DBMS enforces an UPDATE SET-TO-NULL option on the database's referential integrity constraint between SELLER and REALTOR. What will be the outcome after a user tries to update the RealtorID value in the table REALTOR from R3 to R5?

Value R5 appears once in column RealtorID in REALTOR, and value R5 does not appear in column RealtorID in table SELLER

Explore top flashcards