background preloader

Ten Common Database Design Mistakes

Ten Common Database Design Mistakes
No list of mistakes is ever going to be exhaustive. People (myself included) do a lot of really stupid things, at times, in the name of “getting it done.” This list simply reflects the database design mistakes that are currently on my mind, or in some cases, constantly on my mind. I have done this topic two times before. Before I start with the list, let me be honest for a minute. So, the list: Poor design/planning Ignoring normalization Poor naming standards Lack of documentation One table to hold all domain values Using identity/guid columns as your only key Not using SQL facilities to protect data integrity Not using stored procedures to access data Trying to build generic objects Lack of testing Poor design/planning “If you don’t know where you are going, any road will take you there” – George Harrison Prophetic words for all parts of life and a description of the type of issues that plague many projects these days. Ignoring Normalization Are there always 12 payments? Maintainability Related:  shiny stuff

Five simple database design tips A flawed database can affect all areas of your application, so getting the design right is of paramount importance. Check out Builder's five simple design tips, and share some of your own. If an enterprise’s data is its lifeblood, then the database design can be the most important part of an application. I’ll get the show started by listing my five favorite tips and giving a brief explanation of the rationale behind each one. #1: Use meaningful field namesI once worked on a project I inherited from another programmer who liked to name fields using the name of the onscreen control that displayed the data from that field. Unless you are using a system that restricts you to short field names, make them as descriptive as possible—within reason, of course. #2: Do your homeworkNot only should you research your business needs when designing a new database, you should check out the existing system, as well. Restrict the user from editing the field after the record’s creation.

Auto-redirecting methods and examples by Phil Craven What is Auto-Redirecting Auto-redirecting is the technique of automatically sending a site visitor to another page once s/he has landed on a page. The other page is often on the same website, but it can be on a different site altogether. On-site auto-redirecting is common when a page, within the site, has been created specifically to rank highly in the search engines, but has been so highly optimized that it is no good for people to actually see. Both of those uses are not wanted by the search engines, and they sometimes penalise a page or site for doing it. The engines are not against auto-redirecting when it is done for they what consider to be a valid reason. Auto-Redirecting Methods The "Meta Refresh Tag" method This is the one auto-redirecting method that the engines can automatically detect, or so it is believed. The code for it must be in the <head> section of the page, and looks like this:- <head> ...head section stuff (Title, Description,etc.)... The "Form" method

database design - Best practices on common person fields (Name, email, address, gender etc...) - Database Administrators My bum is getting sore from sitting on the fence, so I am going to just throw out some answers and hope to not get down-voted into oblivion. Please offer constructive criticism. E-mail Address: min: 6 (a@g.cn) . Or 3 if you want to track local domain email addresses max: 320 254 (RFC) The amount of code to validate an email is actually insane, so let's just assume it's valid if it has a "@" You may want to abstract an email address as a "communication method", so that you can easily list all methods with which to communicate with a user. Gender Gender can change over time, so you could track that if it's important to you. Addresses: NORAM I am gonna take the cheap way out and stick to North American addresses. It is convenient to abstract countries, divisions, cities, and counties mostly due to taxation. GeographicArea: id: int type: {country, division, county, city, indian reservation} name: varchar(45) [1] abbreviation: nullable varchar(4) parent_id: nullable int Address: PartyAddress Names

Unity 3 – April 2013 patterns & practices Developer Center April 2013 Unity is a lightweight, extensible dependency injection container with support for instance and type interception. Overview Unity is a lightweight, extensible dependency injection container with support for constructor, property, and method call injection. Simplified object creation, especially for hierarchical object structures and dependencies. Unity is a general-purpose container for use in any type of Microsoft.NET Framework-based application. In addition, Unity is extensible. This release adds support for Windows Store apps as well as the registration by convention feature to ease the task of configuring Unity. Audience Requirements These reusable components and guidance are intended primarily for software developers and software architects. Contents of This Release Microsoft Unity 3 contains the following: Binaries. System Requirements Supported architectures: x86 and x64. For a rich development environment, the following are recommended:

Inserting Data Into MySQL From Excel Using VBA - HTNet seun asked in an old post of mine, Interfacing with MySQL via Excel; whether it’s possible to submit data from Excel into MySQL. Yes, it is very much possible to do this. In fact, I’ve written a tutorial on how to do this with the help of VBA. First, we create the table that we will use to store the data. CREATE TABLE IF NOT EXISTS `tutorial` ( `id` int(11) NOT NULL auto_increment, `title` varchar(255) NOT NULL, `author` varchar(255) NOT NULL, `price` float(4,2) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; Now that we’ve created the table, it’s time to store some data in it. Now rename that sheet as Books. I prefer to place the toolbars at the top panel area so they’re out of the way of my Excel spreadsheet. Next, click on the Properties icon of the Control Box toolbar and set the name of the Books worksheet as wsBooks. Now it’s on to some programming. Connecting to the Database Server and Selecting the Correct Database

sql - Is there a standard implementation of a Users Database? - Database Administrators Going to have to go for a big old fashion "it depends". Of course you are going to need some sort of key on this table. You could start off with a UserID. This could just be a incrementing INT (or bigint if you are going to have over 2.1 million users). I've seen lots of databases also use GUIDs as the main UserID. You then need to decide how normalized you want your database. I'd keep the main user table to: some sort of ID or PK you can useFirst Name/Last Name or just a usernamesome sort of status of the user (active, disabled, etc) - (tinyint linking to a status table)created date That should be your starting point. From there you could add other columns based on what you want to store. I HIGHLY recommend you read this article though -

Bootstrap What Makes a Design Seem 'Intuitive'? By Jared M. Spool Originally published: Jan 10, 2005 In a recent usability test, I once again witnessed something I've seen a hundred times before: a frustrated user claiming he knows exactly what is wrong with the interface he was fighting with. What was his suggestion? I think he used the I-Word no less than 25 times during the session. People Intuit, not Interfaces To those who police the English language, interfaces can't be intuitive, since they are the behavior side of programs and programs can't intuit anything. But, I believe that English is an adaptable medium, so it's ok with me if we call a design intuitive. To answer that question, we first have to look at how people understand the design in the first place. Current and Target Knowledge Points Imagine a long wall where you'll line up all the users who will use your design. On the right side, we'll put everyone who knows everything there is to know about the design. The Knowledge Gap The Knowledge Gap is where design happens.

Related: