Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Drewyd
Starting Member
2 Posts |
Posted - 2014-09-17 : 16:00:12
|
Hi all,I am new to the DBA role, though had many years attempting to write T-SQL queries and procedures.I have got a new job administering a server with a dozen or so databases set up by a "professional" company who have charged my new employer an arm & leg for the privilege. On first inspection of the 2000+ tables in the main database, I am shocked to discover there is not a single FK anywhere. Only about 85% of the tables have a PK. There seems to be a lot of duplicated data and no validation to speak of (no check constraints at all either), for example with items like post codes appearing in any one of five fields in the client address tables.Any advice, where do I start with this nightmare?Drew |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-09-17 : 16:07:06
|
Does your company own the software? If it's a 3rd party app, you typically are not allowed to make changes to the database structure, including FKs, PKs, etc.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
Drewyd
Starting Member
2 Posts |
Posted - 2014-09-17 : 16:11:26
|
quote: Originally posted by tkizer Does your company own the software? If it's a 3rd party app, you typically are not allowed to make changes to the database structure, including FKs, PKs, etc.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/
No, it's maintained by the original builder of the database. I guess the relationship's must be defined in the front end application layer, but with the amount of data discrepancies I have to wonder where they learned their trade! I obviously can't alter the structure at all, but maybe I can come up with some workrounds to help me build reports? (this is what I have been tasked with in the short term)Drew |
|
|
|
|
|
|
|