Archive for July, 2009
The default layout of a sql server database schematic diagram leaves much to be desired, it creates a huge diagram with the most references table located in the midle the one good attribute about the layout is that it avoids relationships crossing one another.
To make matters even worse most users squeeze the diagram to make it as compact as possible.
This is a nice square diagram that prints out really nice however looking at the diagram it takes a fair amount of effort to determine the table hierarchy.
I prefer the layout the diagram as follows
The diagram is laid out according to two rules:
- Relationships always run left to right
- Tables are laid out in columns
This layout provides the following advantages
- Tables not depended on any other table are located in the first column, these tend to be your lookup tables and primary data tables.
- Tables in the second column are depended on tables in the first column, these tend to be your many-to-many tables.
- Tables that are highly depended causes relationships to cross over.
- Tables that have a deep hierarchy are located to the far right hand side of the diagram.
When ever I copy the database from the production server to the development machine the database throws an error when updating a database diagram or creating a new database diagram. The error in question is
The solution to this problem is rather simple go to dbo.sysdiagram table and set change the diagram_id default value to 0. However when you right click to bring up the design window for the dbo.sysdiagram table the option is disabled.
This loads the sysdiagram design window from where you can set the default value of the diagram_id field
Save the changes and you will be able to update existing database diagrams and create new database diagrams.
Note this solution may not work for ever and has only been tested on sql server 2005.
Ever since I started working on my own I have been reading a lot of blogs and articles on how to start/create/grow/prosper a business. All the articles I have been reading all deal with this issue from a technical perspective such as sell your self, fail fast, hire good people, market your self, pick a business you are passionate about, serve a need etc. The other day I read an article by Felix Dennis and I have never been as pumped to continue with my business as I have ever before. The point that Felix makes is to be successfull is a mental state and has nothing to do with technical/business issues.
The major point to become successfull is to overcome your fear. He provided a list of 7 points which hold most people from becomming successfull.
- If you are unwilling to fail, sometimes publicly, and even catastrophically, you stand little chance of ever getting rich.
- If you care what the neighbours think, you will never get rich.
- If you cannot bear the thought of causing worry to your family, spouse or lover while you plough a lonely, dangerous road rather than taking the safe option of a regular job, you will never get rich.
- If you have artistic inclinations and fear that the search for wealth will coarsen such talents, you will never get rich. (Because your fear, in this instance, is well justified.)
- If you are not prepared to work longer hours than almost anyone you know, despite the jibes of colleagues and friends, you are unlikely to get rich.
- If you cannot convince yourself that you are “good enough” to be rich, you will never get rich.
- If you cannot treat your quest to get rich as a game, you will never be rich.
As of today I am going to become fearless and drive to wards what I want.