What happens if the database tables doesn't have relationships.Does that occur inefficiency.Is it compulsury to have relationships between tables.

Thanks.

Relationships between tables can help with data consistency, such as having a foreign key on a table helps keep the rows connected to the referenced table.
For example, having foreign keys with cascading deletes helps keep the referencing table accurate when the referenced table is changed.
Indexs aid in efficiency, although a case could be made for relationshsips I guess, like in the example above if enough deletes are made.
I've always thought of relationships are a way to more accurately model the data.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.