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 18 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 :)


nyrave

  • Member
  • Posts: 344
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

A good example of polar molecules can be understood when trying to make a cake. If water and oil are required, they will not mix together. If you put them into a measuring cup, the oil will rise to the top while the water remains on the bottom.

Did you know?

There used to be a metric calendar, as well as metric clocks. The metric calendar, or "French Republican Calendar" divided the year into 12 months, but each month was divided into three 10-day weeks. Each day had 10 decimal hours. Each hour had 100 decimal minutes. Due to lack of popularity, the metric clocks and calendars were ended in 1795, three years after they had been first marketed.

Did you know?

It is widely believed that giving a daily oral dose of aspirin to heart attack patients improves their chances of survival because the aspirin blocks the formation of new blood clots.

Did you know?

The first documented use of surgical anesthesia in the United States was in Connecticut in 1844.

Did you know?

Street names for barbiturates include reds, red devils, yellow jackets, blue heavens, Christmas trees, and rainbows. They are commonly referred to as downers.

For a complete list of videos, visit our video library