This topic contains a solution. Click here to go to the answer

Author Question: Explain how relationships are created using SQL. Include an example. What will be an ideal ... (Read 27 times)

Themember4

  • Hero Member
  • *****
  • Posts: 538
Explain how relationships are created using SQL. Include an example.
 
  What will be an ideal response?

Question 2

PHP code is executed on a server and can generate HTML code that is sent to the client computer.
 
  Indicate whether the statement is true or false



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by a Subject Expert

anyusername12131

  • Sr. Member
  • ****
  • Posts: 327
Answer to Question 1

In SQL, relationships are created using a FOREIGN KEY constraint. This has the format:

CONSTRAINT ConstraintNameFK FOREIGN KEY(ForeignKeyColumnInC urrentTable REFERENCES ReferencedTableName(PrimaryKeyColumnInR eferencedTable)

The constraint thus names the foreign key column in the current table and its corresponding primary key in a referenced table. As an example, consider an advising relationship from STUDENT to FACULTY. The following constraint might appear in the SQL statement creating the STUDENT table:

CONSTRAINT AdvisorFK FOREIGN KEY (AdvisorID) REFERENCES
FACULTY (FacultyID)

Answer to Question 2

TRUE




Themember4

  • Member
  • Posts: 538
Reply 2 on: Jul 7, 2018
Great answer, keep it coming :)


deja

  • Member
  • Posts: 332
Reply 3 on: Yesterday
Wow, this really help

 

Did you know?

Pregnant women usually experience a heightened sense of smell beginning late in the first trimester. Some experts call this the body's way of protecting a pregnant woman from foods that are unsafe for the fetus.

Did you know?

The people with the highest levels of LDL are Mexican American males and non-Hispanic black females.

Did you know?

Opium has influenced much of the world's most popular literature. The following authors were all opium users, of varying degrees: Lewis Carroll, Charles, Dickens, Arthur Conan Doyle, and Oscar Wilde.

Did you know?

The calories found in one piece of cherry cheesecake could light a 60-watt light bulb for 1.5 hours.

Did you know?

During pregnancy, a woman is more likely to experience bleeding gums and nosebleeds caused by hormonal changes that increase blood flow to the mouth and nose.

For a complete list of videos, visit our video library