COMP 251 Final Flashcards

1
Q

Relationship level integrity is part of overall data integrity

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

2 tables can participate in multiple types of relationships with each other.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A one-to-many relationship can only exist between 2 tables.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

You will need a Primary Key and a Foreign Key when you establish a 1-M relationship.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

An advantage of relating tables is that you can draw data from multiple tables simultaneously.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

1:M + 1:M = 2:M

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

It is appropriate for a Foreign Key to have the same name as a Primary Key.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Cascading deletes will delete records in a parent table and all associated records in a child table.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

(Open Quiz 2 Diagram image)
The diagram represents a self-referencing relationship.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

(Open Quiz 2 Diagram image)
It is mandatory for employees and mentors to exist in the table.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

(Open Quiz 2 Diagram image)
A deletion rule is present that restricts deletions in certain situations.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

(Open Quiz 2 Diagram image)
A mentor can have only one employee mentee.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

(Open Quiz 2 Diagram image)
Degree of participation is correctly diagramed.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A SQL join is not a physical nor a logical data base structure.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Application oriented rules are not valid business rules.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which item describes a relationship type?
A. one-to-many
B. mandatory
C. maximum
D. cascade
E. referential

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

A relationship exists between two tables that are ___________________ to each other.
A. physically related
B. logically related
C. RDBMS related
D. joined via SQL
E. none of these

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

A table with curved corners represents a __________.
A. data table
B. linking table
C. validation table
D. subset table
E. none of these

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

A table with distinct columns on both the right and left ends represents a _________.
A. data table
B. linking table
C. validation table
D. subset table
E. none of these

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

You completed the process for identifying a relationship between a Client Table and an Account Executives Table. You concluded that a single record in the Account Executives table can have one or more records in the Client Table and that a single record in the Client Table can have one or more records in the Account Executives table. You concluded that you need to:
A. define a one-to-many relationship
B. define a self-referencing relationship
C. define a subset relationship
D. define an alias field for the relationship
E. none of these

A

E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

You have a Foreign Key in Table B that is associated with a Primary Key in Table A. Further, you have a 1-M relationship between Table A and Table B. In the logical elements field specifications for the Foreign Key, you will set the Uniqueness Element as:
A. non-unique
B. unique
C. FK
D. Replica
E. No Nulls

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

You have a parent Table A that has a 1-1 relationship with Table B. You want to ensure that a record in Table A is not deleted and remains active when you have a record in Table B. You establish a deletion rule of:
A. Set Default
B. Nullify
C. Cascade
D. Restrict
E. Deny

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Refer to this SQL for questions 8 and 9.

SELECT employee_number, employee_last_name, employee_first_name, annual_salary
FROM Employee, Salary
WHERE Employee.employee_number = Salary.employee_number;

In this SQL, you will:
A. Get a valid result as long as the right table relationships have been established.
B. Get an error since going across tables in this manner is a relationship violation.
C. Get a valid results set, but the output will be restricted.
D. Get an error since you can’t compare fields across tables on a WHERE clause.
E. “a” and “c”

A

E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Refer to this SQL for questions 8 and 9.

SELECT employee_number, employee_last_name, employee_first_name, annual_salary
FROM Employee, Salary
WHERE Employee.employee_number = Salary.employee_number;

In this SQL, you have:
A. fully qualified column names
B. alias table names
C. outer join syntax
D. “a” and “c”
E. all of these

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

In defining Business Rules for your data base, you can set up rules through:
A. Field Specifications
B. Relationship Characteristics
C. Validation Tables
D. “a” and “b”
E. “a”, “b”, and “c”

A

E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

“Required values = Yes” is an example of business rules set up through:
A. Field Specifications
B. Relationship Characteristics
C. Validation Tables
D. “a” and “b”
E. None of these

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

In your data base design for an International Import and Export Company, you have been asked to restrict the countries that we will trade with on any given month; you further learn that the list of restricted countries can change frequently. Your best approach would be to:
A. Place business rules in the application programs
B. Establish Range of Value in the Field Specification Tables
C. Establish a Validation Table
D. Establish a Linking Table
E. Establish a Subset Table

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Which of the following isn’t a valid join type:
A. Inner Join
B. Left Outer Join
C. Self Join
D. Cross table Join
E. Natural Join

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

A linking table will include:
A. Composite Primary keys that are also primary key in the associated tables
B. More than one foreign key
C. Other non-key fields when appropriate
D. “a” and “b”
E. “a”, “b”, and “c”

A

E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Which of the following is not a recommended diagramming technique for an Entity Relationship Diagram:
A. Note the Index field
B. Relationship line should connect PK and FK
C. Show type of relationship
D. Show degree of participation
E. Show business rules where possible
F. All are recommended

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Types of Cardinality:

A

1-1, 1-M, M-M

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Type of Cardinality: usually a subset table. A single record in Table A related to only one record in Table B (and vice versa)

A

1-1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Type of Cardinality: the most common table relationship
A single record in Table A is related to one or more records in Table B, but a single record in Table B is related to only one record in Table A.

A

1-M

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Type of Cardinality: Single record in Table A can be related to one or more records in Table, and a single record in Table B can be related to one or more records in Table A. Will need a linking table.

A

M-M

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Relationships that exist between recs in the same table (can be any type of cardinality)
Ex: Each employee is tied to a mentor (mentorID would be an alias of employeeID and these two columns would be in the same table)

A

Self-Referencing Relationships (aka recursive relationships)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Type of Table:
For M-M relationships
2 keys serve as this table’s composite primary key (CPK) as well as FK’s

A

Linking Table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Relational database’s leading advantage is speed of processing

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

In a relational DB, it is important to know where the RDBMS stores the data to expedite data retrieval

A

False
(don’t have to know where it’s stored)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

The RDBMS will detect a logic error if you store NULL in a value

A

False
(null CAN be an acceptable value)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

An Index is a special type of logical DB structure used to build table relationships

A

False
(Index is a PHYSICAL structure, indexes are a special object that allows the user to quickly retrieve records from the database)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

Calculated fields should not be stored in a table

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Table-level integrity ensures no duplicate records in a table and that the primary key is unique

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

Relationship level integrity is also known as Referential Integrity

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

Duplicate fields in your DB are never okay

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

IS NULL and =’ ‘ are filtering operations that achieve the same results

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

!= and <> are operators that achieve the same results

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

System Software Used to create, maintain, modify and manipulate a relational database with tools for the applications to interact with stored data
a. Database
b. SQL
c. RDBMS
d. XML
e. both a and b

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

The advantages of a relational database do not include:
a. data integrity at multiple levels
b. data accuracy
c. ease of access
d. built-in referential integrity

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q
  1. Set of rules that decomposes data tables to minimize redundancy, minimize dependency, and enforce relationship integrity is known as:
    a. Abstraction
    b. Normalization
    c. Data modeling
    d. Decomposition
A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

Known as a Tuple in relational database theory, the ______ represents an instance in the table
a. Field
b. Column
c. Primary Key
d. Table
e. None of these

A

E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

Elements of an Ideal Field include
a. Has only 1 value
b. Can easily be decomposed into small parts
c. Is a distinct characteristic of the subject
d. a and c
e. all of these

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

In order to store acceptable values that a program can use for reference checks, one creates a:
a. Data table
b. Normalization table
c. Reference check table
d. Validation table
e. a or d

A

D

53
Q

In order to establish a relationship between 2 tables, one would take the primary key of the subject table and set up a _________ in the other related table.
a. cross reference key
b. secondary key
c. composite key
d. index
e. None of these

A

E

54
Q

which SOL keyword can you use to select unique values from the same column
a. DISTINCT
b. SINGLE
c. ONCE
d. NONDUP
e. none of these

A

E

55
Q

One standard Concatenation symbol used in SQL is
:
a. *
b. /*
c. C
d. ||
e. none of these

A

D

56
Q

The first step in the design process of a good database should be:
a. Analyze current DB
b. Define table
c. Define business rules
d. Gather artifacts
e. Define mission statement

A

e

57
Q

The characteristics list is primarily used to:
a. define primary keys
b. define rows
c. define fields
d. define tables
e. all of these

A

c

58
Q

Which discipline below addresses unstructured data as a key part of its value offering:
a. NoSQL
b. Big Data
c. Cloud
d. In Memory Computing
e. RDBMS

A

B

59
Q

The debate on __________has reintroduced some of the old discussions of non-structured DB focused on lower-level data management vs the benefits of structured relational DB.
a. NoSQL
b. Big Data
c. Cloud
d. In Memory Computing
e. RDBMS

A

A

60
Q

Which of the following best describes an example of a Relational Data Base Management System?
a. Oracle
b. SQL
c. DB2
d. “a” and “b”
e. “b” and “c”
f. “a” and “c”

A

F

61
Q

Which of the items below is not a valid table type:

a. Linking Table
b. Data Table
c. Subset Table
d. Validation Table
e. all are valid

A

e

62
Q

An ideal table should have all of the following with the exception of:
a. Primary key
b. Foreign key
c. No calculated field
d. a and c
e. all are needed

A

B

63
Q

Which CK below is the best for a Primary Key:

a. Employee_Social_Security#
b. employee_last_name
c. employee_number
d. all are good
e. none

A

C

64
Q

A query is written to return sales representatives’ annual sales figures had the following filtering clause:


WHERE (sales_region = ‘Central’)| OR (sales_region = ‘South’ AND annual_sales > 0)


The results would be:

a. All sales reps with annual sales greater than 0 that are in either the central or south region
b. Only sales reps in the south region with sales greater than O
c. Sales reps that sold in both regions and have sales greater than 0
d. All sales reps in both regions regardless of sales
e. Sales reps in the south region with sales greater than 0 & all sales reps in the central region regardless of sales

A

E

65
Q

When defining field specifications, the data types, lengths, decimal places, masks, and format are all considered
a. logical elements
b. physical elements
c. general elements
d. data elements
e. attribute elements

A

B

66
Q

in a WHERE clause using a wildcard compare statement of LIKE ‘%999’, the compared field results will be:
a. any values that have three 9s anywhere
b. will not work since an invalid wildcard symbol used
c. any values ending with three 9s
d. any values starting with three 9s
e. any values as long as it ends in 3 numeric values

A

C

67
Q

Alternative to Relational DB where speed is the leading priority, but reliability can be a concern

A

NoSQL

68
Q

Includes focus on complex data sets that may include structured and unstructured data

A

Big Data

69
Q

Examples include Saas, Paas, laas

A

Cloud

70
Q

Requires the evaluation of data redundancy and geo-graphic redundancy

A

High Availability

71
Q

Avoids over-head tied to disk utilization for read/write

A

In-Memory DB

72
Q

Write a simple SQL statement to return all employees last name, employee first name, and hire date from the EMPLOYEE table. The employee table has many more fields, but you don’t want the others; you can make up valid descriptive column names for required fields to satisfy this request.

A

SELECT employee_lastname, employee_firstname, employee_hiredate
FROM EMPLOYEE;

73
Q

Using the tables in 03 above, write a SQL that produces a list of employees making less Than $19.50 per hour that work at store number 222. This list will be provided to the branch manager and she only needs the first and last names of the employees and their hourly rate. The manager wants it in alpha order by last name. Your field specifications state that the store number is defined as a character and the hourly rate as a decimal.

Fields: employee_firstname, employee_lastname, employee_hourlywage, store_number

A

SELECT employee_firstname, employee_lastname, employee_hourlywage
FROM EMPLOYEE
WHERE store_number = ‘222’ AND employee_hourlywage < 19.50
ORDER BY employee_Iastname ASC;

74
Q

Using the same tables above, the construction manager needs to visit each store that is over 1000 square ft (stored as numeric) to review existing city violations. However, the manager only wants to visit those stores that actually have a violation open. The store violations field stores a numeric value equal to the number of violations that are open. Although the manager doesn’t want to see the number of violations, he wants a special indicator for you to add next to the store square footage number of a “V” to remind him that there are violations open. You have been asked to create a report that looks as follows:

Fields: store_number, store_address, store_city, store_state, store_squareft (ex: 1500 V)

A

SELECT store_number, store_address, store_city, store_state, store _squareft || ‘ V’ AS store_squareft
FROM STORE
WHERE storee_squareft > 1000 AND store_violations > 0;

75
Q

Write an SQL that will return store number (no other info needed) that are in zip codes starting with 606 or 601, but only if they have zero (decimal) violations.

A

SELECT store_number
FROM STORE
WHERE store_violations = 0 AND (store_zip LIKE ‘606%’ OR store_zip LIKE ‘601%’);

76
Q

Deletion Rule:
The RDBMS will not delete the record in the parent table, but will instead keep the record and designate it as “inactive.”

A

Deny (D)

77
Q

RDBMS does not delete the parent table record if it had related records in the child record

A

Restrict (R)
(most popular deletion rule)

78
Q

RDBMS will delete the parent table record and all related records in the child table.

A

Cascade (C)

79
Q

Deletion Rule:
The RDBMS will delete the record in the parent table and will then update the foreign key values of related records in the child table to null.
(If you are going to use this deletion rule, you must modify the foreign key’s field specifications and set the Null Support logical element to “Nulls Allowed.”)

A

Nullify (N)

80
Q

RDBMS will delete the parent table record and updates the FK value of the related child table record with “default value” from the logical specification setting

A

Set Default (SD)

81
Q

Types of Participation Symbols

A

l and O

82
Q

Type of Participation: need at least 1 rec in “this” table before you can enter recs in related table

A

Mandatory

83
Q

Type of Participation: there is no requirement for any rec to exist in “this” table before you enter records in related table

A

Optional

84
Q

Determines the minimum number of records a given table must have and the maximum number of records allowed to have in the relationship

A

Degree of Participation

85
Q

Degree of Participation Example: if an agent can exist with 0 clients, and the maximum number of clients it can have is 10, what is the degree of participation and what table do you put it next to?

A

(0, 10) Clients

86
Q

Do a inner table join for the vendors and products table. The PK of vendors table is vendor_ID. This is a FK in products table. The fields you’ll need are vendor_name, product_name, and product_price.

A

SELECT vendor_name, product_name, product_price
FROM vendors, products
WHERE vendors.vendor_ID = products.vendor_ID

87
Q

Business Rule: within logical DB design, done via field specifications and/or relationship characteristics

A

Database oriented

88
Q

Business Rule: can’t be done in logical DB design, and therefore
is established during physical design or within the application design

A

Application oriented

89
Q

DB Oriented Business Rule: imposes constraints on the elements of a field.
Ex: DOB must be shown as MM/DD/YYYY

A

Field Specifications

90
Q

DB Oriented Business Rule: imposes constraints on the characteristics of a relationship between 2 tables.
Ex: A manager must have at least 5 employees, but not more than 30 –> user degree of participation (5, 30)

A

Relationship Specific

91
Q

Self Join Example: You want to send mail to all customer contacts that work at the same company where Jim Jones works. So, we have to first find what company (cust_name) Jim Jones works for and then pull all contacts at that same company.

A

SELECT cust_id, cust_name, cust_contact
FROM Customer
WHERE cust_name = (SELECT cust_name
FROM Customers
WHERE cust_contact = ‘Jim Jones’);

92
Q

A type of join in SQL. Allows you to include rows that have no related rows.

A

Outer Join

93
Q

Virtual tables composed of fields from one or more base tables and possibly fields from other views. So, although not a real table, it uses the concept of rows and columns, but does not have its own PK.
Example: From the Students and Classes tables you could make a “Class Roster” table with the fields: Class Name, Student first name, and Student last name

A

Views

94
Q

Views that can use functions such as sum, average, min, max, or count
Ex: A view table called “Class Registration” could have the fields Class Name and Total Student Registered

A

Aggregate

95
Q

Similar to a validation table; helps with data integrity
Draws data from base tables, unlike a Validation Table that actually stores its own data
Restricts Fields that the view will have from the base tables (limits access)

A

Validation (view)

96
Q

Notes about views

A

▪ Views must have unique names – like other tables
▪ Security access needed to create Views
▪ Views can be nested (View built on other views)

97
Q

View SQL Example

A

/A view to return list of customers who have ordered any products/
CREATE VIEW ProductCustomers AS
SELECT cust_name, cust_contact, prod_id
FROM Customers, Orders, OrderItems
WHERE Customers.cust_id = Orders.cust_id AND Orderitems.order_num = Orders.order_num;

98
Q

Process of modifying the physical DB structure to improve performance of the run-time environment.

A

Physical Database Design

99
Q

a DB ______ is a cross-reference attribute that has a pointer to take the system to the data source quickly and not touch the file/table makeup

A

Index
ex: Vendor ID 123000 - index 50

100
Q

Clustering Files/Tables

A

A technique used to bring data from multiple tables closer together on disk that is often used together - as in a join
downside is that extracting records strictly from one of the tables slows down since those record are dispersed over a greater part of the disk

101
Q

Splitting Tables - partitioning (horizontal)

A

store groups of frequently used records on a different area of the disk or even on a different disk (store near each other on concentrated space for fast access)

102
Q

Splitting Tables - partitioning (vertical)

A

store groups of frequently used columns of tables where columns most used together are stored CLOSE on disk

103
Q

SQL Example:
We want you to insert new data into the table called “Salespeople”. You’re adding a new Salesperson_ID of 12345 and the Salesperson_name is Robert Downey.

A

INSERT INTO Salespeople (Salesperson_ID, Salesperson_name)
VALUES (‘12345’, ‘Robert Downey’);

104
Q

What does this SQL do?
INSERT INTO Table A (Coll, Col2, Col3)
SELECT (Coll, Col2, Col3)
FROM Table B
WHERE Col_X = ‘condition’;

A

Moves data from table B to table A

105
Q

SQL Update Example: You are updating the customer table. For customers that have over 1000 miles, their Customer_status is changed to Preferred.

A

UPDATE Customer
SET Customer_status = ‘Preferred’
WHERE Number_of_miles > 1000;

106
Q

SQL Example:
We want you to delete some stuff from the Customer table. If the customer_status is “delinquent” (they didn’t pay their bills), please delete this customer.

A

DELETE FROM Customer
WHERE Customer_status = ‘delinquent’;

delinquent = didn’t pay bills
what happens: every row where that condition is met gets deleted

Important Notes on Deletion:
- deletes specific entire rows
-cannot delete the entire table, but without the WHERE clause, all the rows in a table can be deleted

107
Q

SQL Practice

ACME Supplies has sold the last product from Easy Street vendor (vendor #98001). The ACME Supplier Management team has decided to stop doing business with Easy Street and you have been asked to delete them as a vendor from the database and also delete all its products.

A

DELETE FROM Vendor
WHERE Vendor_ID = ‘98001’;

108
Q

Specifies how the transmitted message is broken up into small “packets” on sending end and reassembled at receiving end
(break data into packets)

A

TCP

109
Q

deals with address of the computers involved in the message exchange (used to know where to send data)

A

IP

110
Q

the protocol for exchanging hypertext info and also indicates the type of browser on the client and other information needed to format the right web pages
(explains how the info is FORMATTED)

A

HTTP

111
Q

Performance Gains: holding a copy of the retrieved data outside of the DB for other requests; often at webserver level (achieved via “query cache” which is specialized and dedicated memory)
ex: log-in credentials

A

Database persistance

112
Q

Performance Gains: a technique where frequently run queries are stored so that the query doesn’t have to go through a process of query optimization every time it is run

A

Canning

113
Q

Performance Gains: emerging space where cloud services are used to place data closer to use
Ex: someone in IL and someone in CA visiting the same website – may look the same, but they are both probably accessing different data based on what’s closest to each of them

A

Edge Computing

114
Q

create an added hardware layer to run software looking for viruses or other vulnerabilities

A

firewalls

115
Q

markup language that instructs the browser on how to DISPLAY the webpage

A

HTML

116
Q

markup language that focuses on the meaning of the data - tells how to INTERPRET the data that is being exchnaged

A

XML

117
Q

XML: Holds the data characteristics that are tied to the relational table fields and other pertinent XML info (no actual values)

A

DTD

118
Q

Holds the actual values and appropriate tags that provide the “meaning” of the data
(holds the actual data - like names and values)

A

XML Document (file)

119
Q

DTD Content models: text only, no element content allowed

A

(#PCDATA)

120
Q

DTD Content models: empty element; null

A

EMPTY

121
Q

DTD Content models: all well formed content allowed

A

ANY

122
Q

DTD Content models: text and element content

A

MIXED

123
Q

DTD Content models: one or more child element names (think fields in a table)

A

(elementname)

124
Q

You designed a vendor database and you have allowed your vendor partners the ability to electronically send you updated product information via the web that you will use to update your vendor product information using an application that resides on your application server. Product ID is the only required field. Other fields are optional, but can occur multiple times. Your product table defined on your database server has the following look:

Product: Product_ID (PK), Product_name, Product_description, Product_cost, Vendor_id (FK)

Create the DTD and XML Doc showing content received from your vendor for product SS999 where they changed the product name to “Super Soap” and set a new cost at .50 cents. Also include a comment in the prologue of XML Doc describing that there has been a product name and cost change.

A

(click edit to see correct answer)

DTD:
<!ELEMENT Product (Product_ID, Product_Name, Product_description, Product_cost*)>
<!ELEMENT Product _ID (#PCDATA) >
<!ELEMENT Product_Name (#PCDATA) >
<!ELEMENT Product_Description (#PCDATA) >
<!ELEMENT Product_cost (#PCDATA) >

XML Doc:
<!--Product_name + cost change-->

<Product>
<Product_ID> SS999 </Product_ID>
<Product_name> Super Soap </Product_name>
<Product_cost> 0.50 </Product_cost>
</Product>

125
Q

DTD: indicates options, but can occur 0 or only once (0,1)

A

?

126
Q

DTD: indicates optional, but can occur 0 or many times (0, M)

A

*

127
Q

DTD: indicates required, min 1 occurrence, and max unlimited (1, M)

A

+

128
Q

DTD: exactly one occurrence (1,1),

A

If not explicitly defined (no symbol given after the field)