answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Gala2k [10]
2 years ago
6

Write a SELECT statement that selects all of the columns for the catalog view that returns information about foreign keys. How m

any foreign keys are defined in the AP database?
Computers and Technology
1 answer:
Nutka1998 [239]2 years ago
6 0

Answer:

SELECT COUNT (DISTICT constraint_name)

FROM apd_schema.constraint_column_usage

RUN

Explanation:

General syntax to return a catalog view of information about foreign keys.

SELECT DISTINCT PARENT_TABLE =

           RIGHT(Replace(DC.constraint_name, 'fkeys_', ''),

           Len(Replace(DC.constraint_name, 'fkeys_', '')) - Charindex('_', Replace(DC.constraint_name, 'fkeys_', ''))),

           CHILD_TABLE = DC.table_name,

           CCU.column_name,

           DC.constraint_name,

           DC.constraint_type

FROM apd_schema.table_constraints DC

INNER JOIN apd_schema.constraint_column_usage CCU

           ON DC.constraint_name = CCU.constraint_name

WHERE  DC.constraint_type LIKE '%foreign'

           OR DC.constraint_type LIKE '%foreign%'

           OR DC.constraint_type LIKE 'foreign%'

RUN

You might be interested in
Sarah is creating and formatting a newsletter for her school. Which page layout rules should she consider when doing this?
lorasvet [3.4K]
Hey!

I believe the answer to 1. Should be A. Rule of Thirds.
6 0
2 years ago
Read 2 more answers
Drag each tile to the correct box.
Likurg_2 [28]
Learning
planning
designing
developing
testing delivering
4 0
1 year ago
Marissa works at a company that makes perfume. She noticed many samples of the perfume were not passing inspection. She conducte
garik1379 [7]
Writing a business letter as if she gets her point across to the head of department then he could change the way they made the perfume so they would pass inspection and standard.
6 0
2 years ago
Read 2 more answers
Complete the function to replace any period by an exclamation point. Ex: "Hello. I'm Miley. Nice to meet you." becomes:
vodomira [7]

Answer:

Here is the complete function:

void MakeSentenceExcited(char* sentenceText) {  // function that takes the text as parameter and replaces any period by an exclamation point in that text

int size = strlen(sentenceText);  //returns the length of sentenceText string and assigns it to size variable

char * ptr;  // character type pointer ptr

ptr = sentenceText;  // ptr points to the sentenceText string

for (int i=0; i<size; i++){  //iterates through the sentenceText string using i as an index

    if (sentenceText[i]=='.'){  // if the character at i-th index of sentenceText is a period

        sentenceText[i]='!'; } } } //places exclamation mark when it finds a period at i-th index of sentenceText

Explanation:

The program works as follows:

Suppose we have the string:

sentenceText = "Hello. I'm Miley. Nice to meet you."

The MakeSentenceExcited method takes this sentenceText as parameter

int size = strlen(sentenceText) this returns the length of sentenceText

The size of sentenceText is 35 as this string contains 35 characters

size =  35

Then a pointer ptr is declared which is set to point to sentenceText

for (int i=0; i<size; i++) loop works as follows:    

1st iteration:

i=0

i<size is true because i=0 and size = 35 so 0<35

So the body of loop executes:

 if (sentenceText[i]=='.') statement checks :

if (sentenceText[0]=='.')

The first element of sentenceText is H

H is not a period sign so the statement inside if statement does not execute and value of i increments to 1. Now i = 1

2nd iteration:

i=1

i<size is true because i=1 and size = 35 so 1<35

So the body of loop executes:

 if (sentenceText[i]=='.') statement checks :

if (sentenceText[1]=='.')

This is the second element of sentenceText i.e. e

e is not a period sign so the statement inside if statement does not execute and value of i increments to 1. Now i = 2

So at each iteration the if condition checks if the character at i-th index of string sentenceText is a period.

Now lets see a case where the element at i-th index is a period:

6th iteration:

i=5

i<size is true because i=5 and size = 35 so 5<35

So the body of loop executes:

 if (sentenceText[i]=='.') statement checks :

if (sentenceText[5]=='.')

This is the character at 5th index of sentenceText i.e. "."

So the if condition evaluates to true and the statement inside if part executes:

sentenceText[i]='!'; statement becomes:

sentenceText[5]='!'; this means that the character at 5th position of sentenceText string is assigned an exclamation mark.

So from above 6 iterations the result is:

Hello!

This loop continues to execute until all the characters of sentenceText are checked and when the value of i gets greater than or equal to the length of sentenceText then the loop breaks.

The screenshot of the program along with its output is attached.

6 0
1 year ago
Although the optical discs are all 5 ¼”, a CD drive can not read a DVD disc, and a DVD drive can not read a Blu-ray disc. Why no
otez555 [7]

Answer:

For storing the data into a CD, we need to burn it. And the surface of the CD is comprised of the polycarbonate layer that is molded as the spiral tracks over the surface of the CD. And the Data is being stored as a sequence of minute grooves that are called the pits which are encoded on the spiral tracks. And the region in between the pits is known as lands.

The DVD or the digital video dos is based on the optical data storage which is almost the same as the CD. The analog data is transformed into the digital data, and this is encoded on the disc starting from the inside edge, and towards out. This digital information is being encoded into the surface as pits, and the surface acts as the recording layer. A DVD can hold data up to 4.77 to 8 GB.

Since DVD size is bigger than CD, A DVD drive can read CD, but the CD drive cannot read the DVD,

And unlike the above two, which make use of the red laser for reading and writing, the blu ray makes use of the blue laser. Also, it has the smaller pits, tiny beam as well as small track that together make it possible to store around 25 GB of data in one single blue ray disc. And this is five times more than the size of a DVD.  

The Blu ray Discs are good for playing the CD as well as DVD. However, the opposite is not possible due to the size.

Explanation:

Please check the answer section.

4 0
2 years ago
Other questions:
  • When a switch configuration includes a user-defined error threshold on a per-port basis, to which switching method will the swit
    13·1 answer
  • Write the definition of a function dashedline, with one parameter , an int . if the parameter is negative or zero, the function
    15·1 answer
  • Your company wants to conduct an exploratory study to gain new insights into some product changes you are considering. Which typ
    15·1 answer
  • Write a function named max that accepts two integer values as arguments and returns the value that is the greater of the two. Fo
    12·1 answer
  • Assume you have a variable, budget, that is associated with a positive integer. Assume you have another variable, shopping_list,
    11·1 answer
  • Write a flowchart and C code for a program that does the following: Within main(), it asks for the user's annual income. Within
    12·1 answer
  • Write an expression that continues to bid until the user enters 'n'.
    9·1 answer
  • A credit card company receives numerous phone calls throughout the day from customers reporting fraud and billing disputes. Most
    10·1 answer
  • Finish the program to compute how many gallons of paint are needed to cover the given square feet of walls. Assume 1 gallon can
    9·1 answer
  • You are a security consultant and have been hired to evaluate an organization's physical security practices. All employees must
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!