Top Five Things Beginners Need to Know About Databases
1. SQL Forms the Core of Relational Databases
You can't avoid it. The Structured Query Language forms the core of all
relational databases. It provides a uniform interface to Oracle, SQL
Server, Access and other relational databases and is a "must learn" for
all aspiring database users. In fact, I encourage you to take an
introductory SQL course before you even attempt to learn any specific
database software. The investment of time will help you build a proper
foundation and get started in the world of databases on the correct
foot. For a quick start, read SQL Basics or, for a more comprehensive introduction, take our free Learning SQL e-course.
2. Selecting Primary Keys is an Extremely Important Decision
The selection of a primary key is one of the most critical decisions
you’ll make in the design of a new database. The most important
constraint is that you must ensure that the selected key is unique. If
it’s possible that two records (past, present, or future) may share the
same value for an attribute, it’s a poor choice for a primary key. When
evaluating this constraint, you should think creatively. You'll also
need to avoid sensitive values, such as Social Security Numbers, as they
raise privacy concerns.
3. NULL Is Not Zero or the Empty String
NULL is a very special value in the world of databases, but it's
something that beginners often get confused about. When you see a NULL
value, interpret it as "unknown". If a quantity is NULL, that doesn't
necessarily mean that the quantity is zero. Similarly, if a text field
holds a NULL value, that doesn't mean that there isn't an appropriate
value, it's simply unknown. For example, consider a database containing
information about children who attend a particular school. If the
secretary entering the record does not know a student's age a NULL value
is used to indicate the "unknown" placeholder. The student certainly
has an age, it's just not present in the database.That value is not Zero.
No comments:
Post a Comment