Simple clear advice in plain English

Hands on: Database values

Discover how to overcome problems when you don’t know what value to enter

What happens if we upsize?
Well, one of the main features of a client-server system is that the database is held centrally, so that different people can see and interact with the data simultaneously.

A normal primary key is all that we need. The very act of moving to a client-server database has solved the problem, so we no longer need the GUIDs. Since GUIDs are complex, unwieldy and downright ugly, we should remove them from the database as we upsize.

On the other hand, suppose that some of these people are working deep in a jungle far from any connection.

It may be impossible for them all to be connected to the server at the same time, in which case we may need to keep the GUIDs. So keeping or replacing the GUIDs is your call, not that of the upsizing tool, which is why upsizing can never be fully automated.

And this example also illustrates the earlier point that the structure of the database is sometimes defined by looking at a problem (in this case, disparate locations for entering data) and the features offered by that particular database engine (not client-server, but does have GUIDs).

When we upsize, at the very least we need to re-examine the problem and, given our knowledge of the new database engine, see if we can solve the problem a better way.

A dead default
Another issue that affects the upsizing process is that default behaviour can vary between engines. In a way similar to that described above, if we happen to accept the default behaviour in an engine, almost without us being aware of it, it becomes part of the database behaviour itself. When we upsize to a different engine with a different default behaviour, the results can be completely unexpected. I came across a good example recently.

A friend upsized his Access database to SQL Server and retained the Access front end. After upsizing he could see and edit all the existing rows (the ones created in Access before upsizing). He could create new rows in the Access front end and these would happily post back to SQL Server. They didn’t look any different from the original rows; however he found that once posted, he couldn’t edit those new rows, even though he could still edit the original ones. So he ended up with two classes of row in the table - editable and cannot be edited.

When he did try to edit one of the new rows, the error message told him that someone else had changed it in the meantime. This is clearly a load of old nonsense, because it happened even if he was the only user on the machine.

The reason for this odd behaviour centres on the defaults in Yes/No fields. Access allows only two values in a Yes/No field - Yes and No. No is the default, whereas SQL Server allows three - Yes/No/Null and the default value is Null.

Article tags

Reader Comments

   

Add your comment

All fields must be completed. Your email address will not be displayed or used to send marketing messages.

All messages will be checked by moderators before appearing on the site.

See our Privacy Policy for more information.

Related articles

Using Wizard to create a form

Create a good Base for your data

Databases may sound very dreary but they are behind almost everything we do. We explain how to go about starting one of your own using Libre Office Base

Blog illustration

Create a Wordpress blog

Blogs are a great way to share news and opinions online. In the first article in our two-part series, we show you how to set one up and update it

Word's undo feature

How to fix common PC errors

It’s easy to hit the wrong key when using a PC and throw yourself into a panic. There's no need to worry - we have easy fixes for 30 common everyday errors

Question & Answer

Q.Why are some of the keys on my keyboard doing strange...

> Read the answer

Q.Is my phone’s Bluetooth any use?

> Read the answer

Q.Can I switch boot drives so that I can work on older...

> Read the answer

Best deals on the web

img

Samsung RV520-A07

£359.98- Buy it now

img

Acer Aspire 5750G (LX.RXP02.019)

£399.99- Buy it now

img

Apple MacBook Pro (MD313B/A)

£904.37- Buy it now

Latest issue & subscription deals

Poll

Are you concerned about viruses that target mobile phones?

Jargon Buster

Computing terms explained in plain English

Virtual drive

A set of files seen by Windows as a separate hard disk.

Great shopping deals from Computeractive