dbm exam 3 - database construction

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

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.

14 Terms

1
New cards

How are indices created in MySQL?

They’re automatically made on foreign keys, primary keys, and UNIQUE constraints.

2
New cards

types of indices in MySQL server

  1. B-tree

  2. hash

  3. R-tree

3
New cards
<p></p>

b-tree indexing

4
New cards

What is an SQL view? What purposes do views serve?

A virtual table made from other tables. They allow simplified looks into complex databases.

5
New cards

CREATE VIEW EmployeePhoneView AS

SELECT 

    EMPLOYEE.LastName AS EmployeeLastName

    EMPLOYEE.FirstName AS EmployeeFirstName 

    EMPLOYEE.OfficePhone AS EmployeePhone 

FROM EMPLOYEE;

Consider that you have run the above statement to create the view. Now, to test the view, write an appropriate SQL SELECT statement.

SELECT * FROM EmployeePhoneView;

6
New cards

user-defined function

stored set of SQL statements that is called by name from another SQL statement

7
New cards
<p>What is this code doing? </p>

What is this code doing?

creating a user-defined function to concatenate FirstName and LastName

8
New cards

trigger

stored program that is executed by the DBMS whenever a specified event occurs

9
New cards

trigger types

  1. BEFORE

  2. INSTEAD OF

  3. AFTER

10
New cards

SQL triggers are used with what language keywords?

DML (INSERT, UPDATE, DELETE)

11
New cards

stored procedure

program stored within the database and is compiled when used

12
New cards

A _ is assigned to a table or view and does not take parameters.

trigger

13
New cards

A _ is called by a user or DBA. It is assigned to a database, not a table or view.

stored procedure

14
New cards

A _ cannot invoke a trigger, accepts parameters, and gives a return value(s).

user-defined functions