Database Concepts and SQL

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

1/86

flashcard set

Earn XP

Description and Tags

Flashcards based on lecture notes to help students review and prepare for exams.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

87 Terms

1
New cards

What increases a user's knowledge through processed data?

Information

2
New cards

What are facts concerning objects and events recorded on computer media called?

Data

3
New cards

What is established between entities in a structured database to retrieve information?

Relationships

4
New cards

What type of attribute can be broken down into smaller parts?

Composite

5
New cards

An attribute or a combination of attributes that uniquely identifies each row in a relation.

Primary key

6
New cards

What is a generic entity type with relationships with one or more subtypes?

Supertype

7
New cards

What are some properties of relations?

Each attribute has a unique name, no two rows are identical, and there are no multivalued attributes.

8
New cards

What is an operation to join a table to itself called?

Self-join

9
New cards

What rule states that each foreign key value must match a primary key value?

Referential integrity constraint

10
New cards

When all multivalued attributes are removed, what normal form is it in?

First normal form

11
New cards

Which command may reverse any create command?

Drop

12
New cards

What is a reusable template data model called?

Pre-packaged data model

13
New cards

In a supertype/subtype hierarchy, how many supertypes does each subtype have?

Only one supertype

14
New cards

Which SQL command adds new columns to a table?

Alter table

15
New cards

What is the wildcard operator in SQL statements?

%

16
New cards

What is a single value returned from an SQL query with an aggregate function called?

Scalar aggregate

17
New cards

What is a join operation?

Causes two tables with a common domain to be combined into a single table or view.

18
New cards

What is an entity that associates instances of entity types and contains specific attributes?

Associative entity

19
New cards

What is a rule that cannot be violated by users?

Constraint

20
New cards

What rule specifies that each supertype instance must be a member of some subtype?

Total specialization

21
New cards

To eliminate duplicate rows in a query, the ________ qualifier is
used in the SQL

Distinct

22
New cards

What does a curly brace mean in sql?

a multivalued attribute.

23
New cards
<p>Refer to the EMPLOYEE information, which attribute is multivalued?</p>

Refer to the EMPLOYEE information, which attribute is multivalued?

Skill

24
New cards
<p>For employee and deparment, which is true?</p>

For employee and deparment, which is true?

A department can have more than one employee.

25
New cards
<p>What is true about the CARE CENTER relationship?</p>

What is true about the CARE CENTER relationship?

NurseInCharge is a foreign key to NurseID in NURSE entity

26
New cards
<p>To what entities are CAR and TRUCK generalized?</p>

To what entities are CAR and TRUCK generalized?

Vehicle

27
New cards
<p>What form of normalization are we in?</p>

What form of normalization are we in?

first normal form

28
New cards
<p><span>In the figure below, the primary key for "Order Line" is which type of key?</span></p>

In the figure below, the primary key for "Order Line" is which type of key?

Composite

29
New cards
<p>In the PART figure, what is the subtype discriminator?</p>

In the PART figure, what is the subtype discriminator?

Part_Type.

30
New cards

What does the following SQL statement do?

ā€œDelete from Customer_T where state = 'HI';ā€

Deletes all records from Customer_T where the state is equal to HI

31
New cards

What action does the SQL statement do?

SELECT * FROM EMPLOYEE

Lists all of the information from the Employee table

32
New cards

Given a table named store with 5 fields:


store_id, address, city, state, zipcode,


why would the following insert command not work?:
insert into store values ('234 Park Street')

You must specify the fields to insert if you are only inserting some of the fields

33
New cards

What does the following SQL statement do?

ā€œDelete from Customer_T where state = 'HI';ā€

Deletes all records from Customer_T where the state is equal to HI

34
New cards

What results will be produced by the following SQL query?

Select sum(standardprice) as TotalPrice from ProductV where ProductType = 'WOOD';

The total price of all products that are of type wood

35
New cards

A way to represent possible values for relationships constraints

Cardinality Constraints

36
New cards

Associative, Simple, Composite, and Complex are all types of?

Attributes

37
New cards

Column, Foreign field, Primary key, and Duplicate key refers to?

Keys

38
New cards

Megatype, Supertype, Subgroup, Class refers to?

Entity type

39
New cards

Sufficient-join, Inner join, Outer join, Self-join are types of?

Joins

40
New cards

Truncate, drop, delete and unpack are types of?

Commands

41
New cards

Create table, alter table, create view and create relationship are ?

SQL commands

42
New cards
<p><span>The following figure shows an example of:</span></p>

The following figure shows an example of:

composite attribute

43
New cards
<p><span>In the figure shown below, which of the following is true?</span></p>

In the figure shown below, which of the following is true?

A person can marry at most one person.

44
New cards
<p>The figure below is a</p>

The figure below is a

Schema Layout Diagram

45
New cards

What does the following SQL statement do?
Alter Table Customer_T
Add (Type Varchar (2));
-Alters the Customer_T table to accept Type 2 Varchars
- Alters the Customer_T table to be a Type 2 Varchar
- Alters the Customer_T table, and adds a field called "Type"
- Alters the Customer_T table by adding a 2-byte field called
"Varchar"


Alters the Customer_T table, and adds a field called "Type"

46
New cards

What does the following SQL statement do?
SELECT * FROM EMPLOYEE;

List all of the information from the Employee table

47
New cards

Given a table named store with 5 fields:
store_id, address, city, state, zipcode,
why would the following insert command not work?
insert into store values ('234 Park Street')
• It would work just fine.
• You must specify the fields to insert if you are only inserting some of the
fields.
• There is no table keyword.
• None of the above.

You must specify the fields to insert if you are only inserting some of the fields.

48
New cards

What does the following SQL statement do?
Delete from Customer_T where state = 'HI';
• Deletes all records from customer_t where the state is equal to HI
• Removes the Customer_T table from the database
• Deletes all records from the Customer_T table
• Deletes no record from the Customer_T table

Deletes all records from Customer_T where the state is equal to HI

49
New cards
<p>the following figure is an example of</p>

the following figure is an example of

total specialization

50
New cards

What result will the following SQL statement produce?

Select Avg(standard_price) as average from Product_V;


• The average of all products in Product_V
• The average Standard_Price of all products in Product_V
• The average price of all products
• The sum of all of the standard_price for Product_V

The average Standard_Price of all products in Product_V

51
New cards

What results will be produced by the following SQL query?


Select sum(standard_price) as Total_Price
from Product_V
where Product_Type = 'WOOD';

• The total price of all products that are of type wood
• The total price of all products
• The Standard_Price of the first wood product in the table
• The Standard_Price of any wood product in the table

The total price of all products that are of type wood

52
New cards

A simultaneous relationship among the instances of
three entity types is called a(n) ________
relationship

ternary

53
New cards

The property by which subtype entities possess the values of all attributes of a

Attribute inheritance

54
New cards

A person, place, an object , an event or concept about which the organization wishes to maintain data is called a(n):

Entity

55
New cards

In an E-R diagram, there are ________ business
rule(s) for every relationship

Two

56
New cards

Customers, cars, and parts are examples of:

entities

57
New cards

A characteristic of an entity type that is of interest to the organization is called a(n):

Attribute

58
New cards

The ________ rule specifies that an entity can be a
member of only one subtype at a time, not both subtypes.

disjoint

59
New cards

A generic or template data model that can be reused
as a starting point for a data modeling project is

Universal data model

60
New cards

The process of defining a more general entity type
from a set of more specialized entity types is called

generalization

61
New cards

A relationship where the minimum and maximum
cardinality are both one is a(n) ________ relationship.

Mandatory one

62
New cards

The SDLC phase in which every data attribute is
defined, every category of data is listed and every
business relationship between data entities is defined
is called the ________ phase.

Design

63
New cards

The process of defining one or more subtypes of the
supertype and forming supertype/subtype relationships.

Specialization

64
New cards

An attribute in a relation that serves as the primary key of
another relation in the same database.

Foreign Key

65
New cards

A rule that specifies the number of instances of one entity
that can (or must) be associated with each instance of
another entity.

Cardinality Constrain

66
New cards
term image

Each employee can supervise one employee, no employees or many employees

67
New cards

The ________ rule specifies that an entity instance of a
supertype that doesn't have to belong to any subtype.

partial-specialization

68
New cards

A rental unit must be either an apartment or a house, and could be both.

69
New cards

A database is an organized collection of ________ related
data.

ogically

70
New cards
<p>Name an example of a composite attribute from this ER diagram</p>

Name an example of a composite attribute from this ER diagram

Customer Address (has multiple attributes in it)

71
New cards
<p>This is an example of what type of schema?</p>

This is an example of what type of schema?

Unary (involves one entity type)

72
New cards
73
New cards
74
New cards
75
New cards

A serial number or other system-assigned primary key for a relationĀ 

Surrogate primary key

76
New cards

What is normalization?

The process of decomposing relations with anomalies to produce smaller, well-structured relationsĀ 

77
New cards

Which of the following is an integrated decision support database with content derived from various operational databases?Ā 

Data warehouse (an integrated decision support system designed for analysis and reporting)

78
New cards

A database is an organized collection of ________ related data

logically

79
New cards
<p>What business rule is shown here</p>

What business rule is shown here

Customers place zero or more Orders

80
New cards
<p>The figure is an example of __</p>

The figure is an example of __

total specialization (two lines)

81
New cards

What is the users front end that accesses a database system.

Database Application

82
New cards

What is the next thing that we build in the Database development process after the Business Rules are established?

Entity relationship tabel modle

83
New cards

Two (or more) attributes that have different names but the same meaningĀ 

synonyms

84
New cards

Ā An attribute that must have a value for every entity (or relationship)

Required attribute

85
New cards

An error or inconsistency that may result when a user attempts to update a table that contains redundant data.

Anomoly

86
New cards

A relation in first normal form in which every non-key attribute is fully functionally dependent on the primary keyĀ 

second normal form

87
New cards

The maximum number of instances of one entity that may be associated with each instance of another entityĀ 

Maximum Cardinality