1answer.
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
Liono4ka [1.6K]
4 years ago
8

Which relationship is possible when two tables share the same primary key?

Computers and Technology
1 answer:
patriot [66]4 years ago
8 0

When two tables share the same primary key, they share a

A. one-to-one relationship.

Explanation:

  • One-to-one relationship is a type of cardinality that refers to the relationship between two entities A and B in which one element of A may only be linked to one element of B, or the opposite way.
  • A one-to-one relationship in a relational database occurs when one parent record or field has either zero or one child record only.
  • These relationships are the easiest to represent in databases because both the parent and child records may be in the same table.
  • One-to-one relationships associate one record in one table with a single record in the other table.
  • These relationships are frequently used to indicate critical relationships so you can get the data you need to run your business.
  • A one-to-one relationship is a link between the information in two tables, where each record in each table only appears once.
You might be interested in
Gimme Shelter Roofers maintains a file of past customers, including a customer number, name, address, date of job, and price of
gulaghasi [49]

Answer:

Hence the complete implementation of python code that reads two files and merges them together.

def merge_file(past_file_path,proposed_file_path, merged_file_path):

   past_file_contents=load_file(past_file_path)

   proposed_file_contents=load_file(proposed_file_path)

   proposed_customer_name = []

   for row in proposed_file_contents:

       proposed_customer_name.append(row[1])

   with open(merged_file_path,'w') as outputf:

       outputf.write("Customer Number, Customer Name, Address\r\n")

       for row in proposed_file_contents:

           line = str(row[0]) +", " + str(row[1]) + ", " + str(row[2]) +"\r\n"

           outputf.write(line)

       for row in past_file_contents:

           if row[1] in proposed_customer_name:

               continue

           else:

               line = str(row[0]) + ", " + str(row[1]) + ", " + str(row[2]) + "\r\n"

               outputf.write(line)

       print("Files merged successfully!")

# reads the file and returns the content as 2D lists

def load_file(path):

   file_contents = []

   with open(path, 'r') as pastf:

       for line in pastf:

           cells = line.split(",")

           row = []

           for cell in cells:

               if(cell.lower().strip()=="customer number"):

                   break

               else:

                   row.append(cell.strip())

           if  len(row)>0:

               file_contents.append(row)

   return file_contents

past_file_path="F:\\Past Customer.txt"

proposed_file_path="F:\\Proposed Customer.txt"

merged_file_path="F:\\Merged File.txt"

merge_file(past_file_path,proposed_file_path,merged_file_path)

8 0
3 years ago
What is an example of constructive criticism for an employee who frequently arrives late?
aleksley [76]
I believe the correct answer is A
5 0
3 years ago
Read 2 more answers
Sal Kan earned $3,000.00, But he is only getting $1,585.00 on his pay check to
svetlana [45]

Answer:

Usually, it's because of taxes and insurance.

3 0
3 years ago
What is the name for the base-2 system used by computers to represent
NemiM [27]

Answer:

B. Binary Code

Explanation:

Binary code is the base-2 system used by computers to represent data. Binary code consists of 0's and 1's which can be used to represent states such as on or off; go or no-go and more.

7 0
2 years ago
In Microsoft word you can access the ______ command from "mini toolbar"
Mashcka [7]
Redo command, i think.
8 0
3 years ago
Read 2 more answers
Other questions:
  • "Dean wants a quick way to look up staff members by their Staff ID. In cell Q3, nest the existing VLOOKUP function in an IFERROR
    10·1 answer
  • Which of the given original work is protected by the copyright law
    9·1 answer
  • What do yo need to do for device manager to display nonpresent devices?
    9·1 answer
  • Cyberterrorism is the use of terrorism to attack (Points : 1) public libraries. computer based networks. government spy networks
    15·1 answer
  • In a registration database, Ross has tables for student, professor, classroom, class, class-hour. Since his campus has about 12,
    9·1 answer
  • Which operating system is a version of Linux?​
    13·1 answer
  • Write a program that performs the following tasks: Display a friendly greeting to the user Prompt the user for the value to conv
    13·1 answer
  • Three common risk factors for young drivers and how you plan to minimize these factors.
    13·1 answer
  • Explain the concept of “survival of the fittest”
    15·1 answer
  • Working with text in presentation programs is very ____ using text in other applications.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!