promotion image of download ymail app
Promoted

Can a database contain two identical records without a negative effect on the integrity of the database?

Why or why not?

3 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    Sure, not an issue but it will mean you can get multiple hits for the same query. You have to take that into account in your program.

    Guidance is to have a unique key for every table but that is not a requirement.

    Think of an example where you are using a database to collect poll answers. All you have is the answers from all people, no unique information from the persons because that is not important to your survey.

    Or, say you keep information in that same table of location of the city where the survey was taken it. There is a possibility that more than one row will have the same data.

    You can get meaningful information from the database.

    • Commenter avatarLogin to reply the answers
  • 1 decade ago

    No if you have different primary keys on each record. However, you cannot have the same primary keys because a primary key is what is the reference to the specific record.

    Think of it this way, you give a mail man an address to two of the same houses. They have the same address. How does the mailman know which house you were trying to reference him to?

    Plain and simple Yes, if and only if each primary key of each identical record is different

    I don't know much about databases but I hope this helped

    • Commenter avatarLogin to reply the answers
  • 1 decade ago

    Generally tables are created with a primary key, but you could create tables without one and records could be duplicated. As for the integrity of the database, as long as your design accommodated duplicates, there wouldn't be a problem with it.

    • Commenter avatarLogin to reply the answers
Still have questions? Get your answers by asking now.