| Author |
Topic |
|
Butterfly82
Starting Member
30 Posts |
Posted - 2007-12-02 : 10:02:06
|
| Hi Guys, Can I hear your views on this type of DB layout? I have a DB that contains tables which are not linked by FK's etc but rely on one another through SP's. I've never came across this layout before so was hoping you could shed some light on it with your experiences etc.Also what if many of the tables didn't have PK's this would lead to duplicate data being allowed to be entered into the database. Are there any other issues here?Regards Butterfly |
|
|
Butterfly82
Starting Member
30 Posts |
Posted - 2007-12-02 : 11:05:32
|
| Would I be correct in thinking this is a non-relational database? |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-12-02 : 15:58:10
|
| If it's on sql server, the db is still relational db no matter there are fkeys in table or not. It's db design issue. Regarding duplication, you can avoid it with unique index even without pkey. |
 |
|
|
Butterfly82
Starting Member
30 Posts |
Posted - 2007-12-02 : 21:40:24
|
| I've been looking into it today and found that the reason for the DB being layed out this is maybe for security purposes. Thanks for your reply rmiao. Yes it is an sql server database. So you say there is an issue with having a database layed out this way? Please tell me more.Butterfly82 |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-12-02 : 22:32:22
|
| People design db for app to assecc it, I can't tell this is the problem or not since I don't know how app uses the db. |
 |
|
|
Butterfly82
Starting Member
30 Posts |
Posted - 2007-12-03 : 06:47:34
|
| This is how it is. Just say I have 2 tables each of the 2 tables are used by different applications, however they have a common field 'itemID' these fields are not linked by a FK but a stored procedure interacts with both of them altering one based on the other.Have you came across this layout before? |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2007-12-03 : 06:54:54
|
| Yes, this is a viable way to design a database, it requires more overhead, but the application this database is designed against should enforce referetiality.WAs this application originally designed for SQL Server? It sounds like it may have been ported onto SQL. |
 |
|
|
Butterfly82
Starting Member
30 Posts |
Posted - 2007-12-03 : 07:04:45
|
| I think it has been in SQL Server for some time as it was once in 7.0.When you say it requires more overhead could this be in the was of updating through SPs? Could you explain more, or give evamples, links? Thanks you |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2007-12-03 : 07:20:27
|
| No, I mean more overhead in looking after it's own primary/foreign keys as this is no longer integral if you do not specify them. Also, I am guessing that you do not have any/many clustered indexes. This will effect the time searches take.I am unsure what examples you are after? Perhaps googling for database referetiality or database design guidelines may help. |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-12-03 : 23:05:22
|
| And I believe your app developer can answer this kind of question better than us. |
 |
|
|
|