Reputation: 1561
I Can place data in single table ,other option is , i can use two table for the same information??? what is better using one table or two??? which will give me best performance???
table-tblschool name address Principal NAME PRINCIPAL MOBILE ADMIN NAME ADMIN MOBILE
Here in abhove table one school will have one admin and one principle ,so should i go for a different table or one table.
Upvotes: 0
Views: 184
Reputation: 2862
It's very much dependant on the data that you're putting in the table. If some of it can be repeated, then it's better to split that into a different table. Likewise if there are particular relationships.
I am, personally, of the opinion that zero-or-one relationships belong in seperate tables, also. But this isn't the case always, as some people don't mind nulls too much.
Upvotes: 2
Reputation: 25277
I recommend looking at Database Normalization. It will give a little bit of perspective.
A very brief intro from wiki as follows (1NF-5NF):
Upvotes: 7
Reputation: 6969
Since this is a pretty vague question, there's only a vague answer at this point. Depends on. ;) No, I'd suggest that you get into a little reading about database normalization and see where this leads you to.
Start here: WikePedia on DB normalization
Upvotes: 1