Saturday, May 16, 2009

Software rankings 2009 - Microsoft in 1st, then IBM and Oracle

IDC recently published its annual report on software industry market share, which ranks software companies by revenue. According to IDC, despite Oracle's string of large acquisitions, including its pending acquisition of Sun, it will remain in third place behind Microsoft in first and IBM in second.

I received some interesting data points from the IBM PR team: 
IBM's software revenue in 2008 totaled $22 billion. 
Software represents a whopping 40 percent of IBM's overall profit, and 20 percent of its revenue.
In 2008, more than 90 percent of IBM's segment profit was from software, services, and financing. 
IBM has acquired 81 software companies since 2003 and more than 100 software companies in the past decade (including Cognos, Filenet, Telelogic, Micromuse, and MRO Software).
The R&D focus at IBM has shifted more toward software and services. More than 70 percent of the U.S. patents IBM received in 2008 (IBM's 16th straight year of patent leadership), were for software and services.
IBM has been driving a shift to higher-profit segments (versus the low-margin commodity parts, which is why it got out of the PC, hard drive and DRAM businesses.) 
IBM is also getting greater margins from creating offerings that exploit the blurring of software and services, such as cloud computing and SOA.

A more difficult but possibly more interesting metric would be to understand the levels of adoption--that is, servers, users, etc., versus revenue--to get a better picture of the market. Of course, revenue and profit are all that really matters, but I'd like to know if IBM makes more money than Oracle on a potentially smaller installed base. 

The big mystery is who else can Oracle buy in order to overtake IBM? It seems like industry consolidation has taken out most of the obvious candidates. Maybe this is where we'll start seeing Oracle acquire SaaS providers in order to gain fast-growing market share?

http://zahurmostafiz.com
http://allnewslink.com


Thursday, October 9, 2008

Starting Survey results - Survery Countries

Starting Survey results - Survery Countries

Well, I have started formatting the results from the survey. This will take a little while as the survey software doesn't make it easy to download and clean it up (without paying for a subscription). As soon as the data is cleaned up I will post the entire data set and a link for everyone to download.

However, while I work on the data, I will provide some summary results. Here is a list of countries who had respondents. If a country is not listed, it had 0 responses/

Country

Percentage

# Respondents

Argentina

0.31%

1

Australia

3.44%

11

Belgium

1.25%

4

Bosnia and Herzegovina

0.31%

1

Brazil

5.63%

18

Bulgaria

1.25%

4

Canada

4.69%

15

Colombia

0.63%

2

Croatia

0.31%

1

Czech Republic

0.94%

3

Dominican Republic

0.31%

1

Ecuador

0.31%

1

Estonia

0.31%

1

Finland

0.31%

1

France

4.38%

14

Germany

2.50%

8

Greece

0.63%

2

Guatemala

0.31%

1

Hong Kong

0.31%

1

Hungary

0.31%

1

India

3.13%

10

Indonesia

0.31%

1

Israel

0.31%

1

Italy

1.88%

6

Latvia

0.63%

2

Malaysia

0.31%

1

Mali

0.31%

1

Mexico

3.75%

12

Netherlands

1.88%

6

Norway

0.31%

1

Paraguay

0.31%

1

Peru

0.63%

2

Philippines

0.63%

2

Poland

1.88%

6

Portugal

0.31%

1

Russian Federation

1.56%

5

Serbia

0.63%

2

Singapore

0.31%

1

Slovenia

0.94%

3

South Africa

0.94%

3

Spain

2.81%

9

Sweden

0.94%

3

Switzerland

1.25%

4

Thailand

0.31%

1

Turkey

1.25%

4

Ukraine

0.31%

1

United Kingdom

6.88%

22

United States

35.00%

112

Uruguay

0.31%

1

Other

1.56%

5

Check out a summary of Primary Databases and a few questions on open source software usage.

Infoworld Picks MySQL as Best Database

Infoworld Picks MySQL as Best Database

Infoworld published the 2008 Bossies, Best Of Open Source Software. There are 8 categories and none of them are database:

  • Collaboration
  • Developer tools
  • Enterprise applications
  • Networking
  • Platforms and middleware
  • Productivity applications
  • Security
  • Storage

I had to look through several of them before I found the database category under Platforms and middleware. Slide 4 is the magic slide:

It says:

Database

While SQLite3 is extremely convenient for development and testing databases, and PostgreSQL has powerful Generalized Search Tree indexes and is very close to being enterprise-ready, is the choice for many Web sites thanks to its excellent read performance, transparent support for large text and binary objects, and incredibly easy administration. Stored procedures, functions, triggers, and updateable views were added to MySQL in version 5, overcoming the largest technical objections to its deployment at many sites. MySQL also has a large, helpful user base, and some poster-child deployments including eBay, Yahoo, and Craigslist.

I'm not sure why SQLLite would even be on the list. There are plenty of other OSDBs that I would put my bets on before SQLLite. Not that SQLLite is bad, it's just not a "best of" kind of thing. I don't imagine the Postgres folks are too happy at the "also ran" placement. "Close to being enterprise-ready", ouch.

I have to agree that MySQL has a large, helpful user base. I actually think that is one of the best things about MySQL.

Friday, August 29, 2008

Microsoft Access Graphical User Interface Design Tips

Microsoft Access Graphical User Interface Design Tips

Many people rush into designing the User Interface for their Access database before thinking about layouts, formats and usability. The following tips from David McQueen may greatly assist when considering all of the options available:

This is my primary role in designing Access applications, and having been drafted in plenty of times to "have a look" at some of the forms and reports that have been designed by others, I think that I am able to hand a bit of advice to others.
  1. Users love forms designed in Tahoma 8. I know this old hat to many developers but I am amazed by the amount of screens I come across with a combo of Times New Roman and Bauhaus.
  2. Design reports with Title, Date, UserName and Printed Time in the Header preferably.
  3. Think of the dumbest user ( I know that sounds insulting, but...) possible and ensure that even they can easily read what is on the screen.
  4. Ensure that the design pattern is consistent across the software. For example if you double click to open an item on one list ensure that you can do the same on another form.
  5. Use colour sparingly. Stick to the gray/blue backgrounds and limit the extensive use of colour. If there are items such as required fields on a form, use one background colour for all of these fields, e.g. yellow
  6. Ensure a consistent easy navigation between screens/modules. I prefer to have a consistent top toolbar wherever the user is in the software, or if users don't like that to have a consistent sidebar/treeview.
  7. Type error trapping/required input fields and match them to a dialog box. Nothing worse than a user seeing "Error 76a..blah, blah" when a standard procedure has gone belly up.
  8. Keep screens as uncluttered as possible and please, please, please.....ALIGN the controls on the form.
  9. For objects that are not applicable to a certain user or process, just gray them out/disable them, rather than deleting them. It helps especially when users have made a mental image of what the screen should look like.
  10. Ensure that data in fields is justified appropriately. Right for numbers (integers) and Left for strings.

Thanks to David for the above tips.

To see some examples of the designs being used for a User Interface please go to the User Interface Designs page.

Designing Good Relational Databases

Designing Good Relational Databases:

Databases have a reputation for being difficult to construct and hard to maintain. The power of modern database software makes it possible to create a database with a few mouse-clicks. The databases created this way, however, are typically the databases that are hard to maintain and difficult to work with because they are designed poorly. Modern software makes it easy to construct a database, but doesn't help much with the design aspect of database creation.

Database design has nothing to do with using computers. It has everything to do with research and planning. The design process should be completely independent of software choices. The basic elements of the design process are:

  1. Defining the problem or objective
  2. Researching the current database
  3. Designing the data structures
  4. Constructing database relationships
  5. Implementing rules and constraints
  6. Creating database views and reports
  7. Implementing the design

Notice that implementing the database design in software is the final step. All of the preceding steps are completely independent of any software or other implementation concerns.

Defining the problem or objective.

The most important step in database design is the first one: defining the problem the database will address or the objective of the database. It is important however, to draw a distinction between:
  • How the database will be used and
  • What information needs to be stored in it.

The first step of database design is to clearly delineate the nature of the data that needs to be stored, not the questions that will be asked to turn that data into information.

This may sound a little contradictory at first, since the purpose of a database is to provide the appropriate information to answer questions. However, the problem with designing databases to answer specific or targeted questions is that invariably questions are left out, change over time, or even become superseded by other questions. Once this happens, a database designed solely to answer the original questions becomes useless. In contrast, if the database is designed by collecting all of the information that an individual or organization uses to address a particular problem or objective, the information to answer any question involving that problem or objective can theoretically be addressed.

Researching the current database.

In most database design situations, there is some sort of database already in existence. That database may be Post-it notes, paper order forms, a spreadsheet of sales data, a word processor file of names and addresses, or a full-fledged digital database (possibly in an outdated software package or older legacy system). Regardless of its format, it provides one essential piece of information: the data that the organization currently finds useful. This is an excellent starting point for determining the essential data structure of the database. The existing database information can also provide the nucleus for the content of the new database.

Designing the data structures.

A database is essentially a collection of data tables, so the next step in the design process is to identify and describe those data structures. Each table in a database should represent some distinct subject or physical object, so it seems reasonable to simply analyse the subjects or physical objects relevant to the purpose of the database, then arrive at a list of tables.

This can work successfully, but it's a much better to objectively analyse the actual fields that you have identified as essential in your research and see what logical groupings arise. In many cases, structures that seemed distinct are really reflections of the same underlying subject. In other cases, the complete opposite is true. And to complicate matters, organizations can use the same terms to describe data that they use or collect in fundamentally different ways.

Once the tables have been determined and fields have been assigned to each, the next step is to develop the specifications for each field. The perfect field should be atomic: It should be unique in all tables in the database (unless it is used as a key) and contain a single value, and it should not be possible to break it into smaller components. This is also an appropriate time to start thinking about the kind of data that goes in each field. This information should be fairly clear from the research phase of the project, but sometimes questions remain. Some advance planning can be done to make it easier to implement the database in the software at a later time, such as identifying the type of fields and examining (or re-examining) existing data that you've collected to make sure that the data always fits the model you are constructing. It's much easier and cheaper to fix that now than wait until the database is being rolled out!

Constructing database relationships.

Once the data structures are in place, the next step is to establish the relationships between the databases. First you must ensure that each table has a unique key that can identify the individual records in each table. Any field in the database that contains unique values is an acceptable field to use as a key. However, it is a much better practice to add an arbitrary field to each table that contains a meaningless, but unique value. This value is typically an integer that is assigned to each record as it is entered and never again repeated. This ensures that each entered record will have a unique key.

Implementing rules and constraints.

In this step, the fields in the database are still fairly amorphous. Defining the fields as text or numeric and getting a rough feel for the types of data that the client needs to store has narrowed them down, but there is room for further refinement. Rules and constraints typically lead to cleaner data entry and thus better information when using the data. Business rules and constraints limit the format that data can take or the ways that data tables can be related to other data tables.

Some of these constraints are imposed by the nature of the data itself; social security numbers are always in the same nine-digit format. This type of constraint is normally implemented to make sure that data is complete and accurate. In other cases, the situation itself explicitly constrains the data. The possible values for the data are usually checked against a list or the choice of values is otherwise constrained. This type of constraint is usually easy to implement and easy to change.

Creating database views and reports.

Now that the data design is essentially complete, the penultimate step is to create the specifications that help turn the data into useful information in the form of a report or view of the data. Views are simply collections of the data available in the database combined and made accessible in one place. It could be as simple as a subset of an existing data table or as complicated as a collection of multiple tables joined on particular set of criteria. Reports on the other hand, are typically snapshots of the database at a particular point in time.

Implementing the design in software.

All of the work to this point has been accomplished without explicitly worrying about the details of the program being used to produce the database. In fact, the design should only exist as diagrams and notes on paper. This is especially important at a later point when you or someone else need to update the database or port it to another package. Now it's time to boot the computer and get started.

Relational Database Design Requirements

Relational Database Design Requirements

A database is a collection of information related to a particular subject or purpose (e.g. tracking customer orders or maintaining a music collection). If your database isn't stored on a computer, or only parts of it are, you may be tracking information from a variety of sources that you have to coordinate and organize yourself.

NOTE: It doesn’t matter how simple the system is, a flat-file database design (only one table) should not be employed, because it has severe limitations and inefficiencies. Your database should contain at least two tables and set relationship between them.

A well-designed database is a prerequisite for fast data retrieval and updates.

Before you build the tables and other objects that will make up your system, it is important to take time to design it. A good design is the keystone to creating a system that does what you want it to do effectively, accurately, and efficiently. If you are looking for professional database design, a service such as Approved Database Developers is great online resource.

The basic steps in designing a database system:

  • To determine the purpose of your system.
  • To determine the tables you need in the system.
  • To determine the fields you need in the tables.
  • To identify fields with unique values.
  • To determine the relationships between tables.
  • To refine the design.
  • To add data (populate tables) and create other system objects.

To determine the purpose of your system you need to know what information you want from the database (detailed scenario). From that, you can determine what subjects you need to store facts about (the tables) and what facts you need to store about each subject (the fields in the tables).

So, make sure that you do answer the following questions:

  1. What types of things should the system keep track off? (System objects -> purpose and use)
  2. What would a user want to know about these things and what restrictions should be placed on changing the attributes of these things? (System properties -> features, attributes, nature)
  3. What would a user want to do to these things? (System methods -> actions to be taken)
  4. What is the relationship between the different (things) types? (System Object Model)

NOTES:

  • Modelling the structures on the paper before opening computer and start coding is highly recommendable. Planning may seem time-consuming up front, but not planning is twice as time-consuming later in the application's life cycle.
  • At this point it's important to establish and employ naming conventions. Each table and table field should have short but meaningful and descriptive name according to its purpose and function, and incorporated prefix in front of the name to indicate its type. Although you are allowed to include spaces in the table and field names, most examples in the Microsoft documentation show field and control names without spaces because spaces in names can produce naming conflicts in Visual Basic for Applications in some circumstances.

To determine the tables can be the trickiest step in the database design process. That is because the results you want from your database (e.g. the reports you want to print, the forms you want to use, the questions you want answered) don't necessarily provide clues about the structure of the tables that produce them. In fact, it may be better to sketch out and rework your design on paper first. When you design your tables, divide up pieces of information by keeping following fundamental design principles in mind:

  1. A table should not contain duplicate information, and information should not be duplicated between tables (e.g. Store each customer address and phone number once, in one table).
  2. When each piece of information is stored in only one table, you update it in one place. This is more efficient, and also eliminates the possibility of duplicate entries that contain different information.
  3. Each table should contain information about one subject. When each table contains facts about only one subject, you can maintain information about each subject independently from other subjects (e.g. You would store customer addresses in a different table from the customers' orders, so that you could delete one order and still maintain the customer information).

There are several things you can do to optimise your tables:

  • Design tables without redundant data.
  • Choose appropriate data types for fields; you can save space in your database and improve join operations.
  • Create indexes for fields you sort, join, or set criteria. This will make dramatic improvements in the speed of queries by indexing fields on both sides of joins, or by creating a relationship between those fields and indexing any field used to set criteria for the query. Finding records through the Find dialog box is also much faster when searching an indexed field.

NOTE: Indexes aren't appropriate in all cases. However, indexes add to the size of the .mdb file, reduce concurrency (the ability of more than one user to modify a page at the same time) in multi-user applications, and decrease performance when you update data in fields that are indexed, or when you add or delete records. It's a good idea to experiment to determine which fields should be indexed. Adding an index may speed up a query one second, but slow down adding a row of data by two seconds and cause locking problems. Or it may add negligible gains depending on which other fields are indexed (e.g. Adding an index to a PostalCode field may provide very little performance gain if a CompanyName field and LastName field in the table are already indexed). Regardless of the types of queries you create, you should only index fields that have mostly unique values. In a multiple-field index, use only as many fields in the index as necessary.

To determine the fields you need - Each table contains information about the same subject, and each field in a table contains individual facts about the table's subject (e.g. A customer table may include company name, address, city, state, and phone number fields). When sketching out the fields for each table, keep following tips in mind:

  1. Relate each field directly to the subject of the table.
  2. Don't include derived or calculated data (data that is the result of an expression).
  3. Include all the information you need.
  4. Store information in its smallest logical parts (e.g. First Name and Last Name, rather than Name.)

To identify fields with unique values - In order to connect information stored in separate tables (e.g. To connect a customer with all the customer's orders) each table in your database must include a field or set of fields that uniquely identifies each individual record in the table. Such a field or set of fields is called a primary key.

NOTE: The power of a relational database system comes from its ability to quickly find and bring together information stored in separate tables using queries, forms, and reports. In order to do this, each table should include a field or set of fields that uniquely identify each record stored in the table. This information is called the primary key of the table. Once you designate a primary key for a table, to ensure uniqueness, the system will prevent any duplicate or Null values from being entered in the primary key fields. To set relationships between tables, you must establish a link between fields that contain common information. The fields themselves do not need to have the same name (although it is a good practice), but the field’s data type and length must be the same, and (more importantly) the information contained within both fields for a specific record must be the same in both tables for the link to work. Generally, a relationship is established by linking these key fields between tables – the primary key in one table and a foreign key in another table. Every table should have a primary key – one or more fields whose contents are unique to each record. This is called entity integrity in the database management. By having a different primary key in each record you can tell two records apart. The goal of setting primary keys is to create individual records in a table that will guarantee uniqueness. Database usually has more than one table, and these tend to be related in some manner. When linking tables you link the primary key field from one table to a field in the second table that has the same structure and data type. The link field in the second table is known as a foreign key field. By matching the values from the primary key to foreign key in both tables, you can relate two records.

There are three kinds of primary keys that can be defined:

  1. AutoNumber primary keys - An AutoNumber field can be set to automatically enter a sequential number as each record is added to the table. Designating such a field as the primary key for a table is the simplest way to create a primary key. If you don't set a primary key before saving a newly created table, the system will ask if you want it to create a primary key for you. If you answer ‘Yes’, the system will create an AutoNumber primary key.
  2. Single-field primary keys - If you have a field that contains unique values such as unique serial numbers or part numbers, you can designate that field as the primary key. If the field you select as primary key does have duplicate or Null values, the system won't set the primary key. You can run a Find Duplicates query to determine which records contain duplicate data. If you can't readily eliminate duplicate entries by editing your data, you can either add an AutoNumber field and set it as the primary key or define a multiple-field primary key.
  3. Multiple-field primary keys - In situations where you can't guarantee the uniqueness of any single field, you may be able to designate two or more fields as the primary key. The most common situation where this arises is in the table used to relate two other tables in a many-to-many relationship

IMPORTANT: The process of designing a relational database includes making sure fields containing only one item of data, eliminating redundant data, and making sure a table contains only data directly related to the primary key. The task of a database designer is to structure the data in a way that eliminates unnecessary duplication and provides a rapid search path to all necessary information. The process of refining tables, keys, columns, and relationships to create an efficient database is called normalization (minimizing the duplication of information in a relational database through effective table design).

Normalizing is not just for relational files: it's also a common design activity for indexed files. Each step is called a form, and forms range from the first normal form (1NF) to fifth normal form (5NF). There is also one higher level, called domain key normal form (DK/NF).

Normalization is a complex process with many specific rules and different levels intensity. In its full definition, normalization is the process of discarding repeating groups, minimizing redundancy, eliminating composite keys for partial dependency, and separating non-key attributes. In simple terms, the rules for normalization can be summed up in a single phrase: "Each attribute (column) must be a fact about the key, the whole key, and nothing but the key." Said another way, each table should describe only one type of entity (such as a person, place, customer order, or product item). Some normalization benefits are:

  • Data integrity (because there is no redundant, neglected data).
  • Optimised queries (because normalized tables produce rapid, efficient joins).
  • Faster index creation and sorting (because the tables have fewer columns).
  • Faster UPDATE performance (because there are fewer indexes per table).
  • Improved concurrency resolution (because table locks will affect less data).

You can normalize most simple databases by following a simple rule of thumb: tables that contain repeated information should be divided into separate tables to eliminate the duplication.

To determine the relationships between tables - Now that you've divided your information into tables and identified primary key fields, you need a way to tell the system how to bring related information back together again in meaningful ways.

To do this, you define relationships between tables. Relationship is an association between common fields (columns) in two tables. A relationship works by matching data in key fields. In most cases, these matching fields are the primary key from one table, which provides a unique identifier for each record, and a foreign key in the other table.

The kind of relationship that the system creates depends on how the related fields are defined. When you physically join two tables by connecting fields with like information, you create a relationship that is recognized by Access. The specified relationship is important. It tells Access how to find and display information from fields in two or more tables. The program needs to know whether to look for only one record in a table or to look for several records on the basis of the relationship.

Relationships between tables are grouped into 4 groups:

  1. One-to-one (1:1) - each record in Table A can have only one matching record in Table B, and each record in Table B can have only one matching record in Table A. This type of relationship is not common and it is very rarely used in database systems, but it can be very useful way to link two tables together. The information related in this way could be in one table. However, you might use a one-to-one relationship to divide a table with many fields in order to isolate part of a table for security reasons, or to store information that applies only to a subset of the main table, or for efficient use of space. A one-to-one relationship is created if both of the related fields are primary keys or have unique indexes.
  2. One-to-many (1:M) - is the most common type of relationship and it is used to relate one record in a table with many records in another table. In a one-to-many relationship, a record (parent) in Table A can have many matching records (children) in Table B, but a record (child) in Table B has only one matching record (parent) in Table A. This kind of relationship is created if only one of the related fields is a primary key or has a unique index.
  3. Many-to-one (M:1) - is used to relate many records in a table with only one (single) record in another table. It is often called the lookup table relationship. Normally, this kind of relationship is not based on a primary key field in either table. Although in theory this relationship is one-to-one, it is known as many-to-one because it does not use a primary key field for the link, and many records from the primary table link to a single record in another table.
  4. Many-to-many (M:M) - is used to relate many records in a table with many records in another table. A record (parent) in Table A can have many matching records (children) in Table B, and a record (child) in Table B can have many matching records (parents) in Table A. It is the hardest relationship to understand and it is not correct. By breaking it into two one-to-many relationships and creating a new (junction/link) table to stand between the two existing tables (e.g. whose primary key may consist of two fields - the foreign keys from both tables A and B) will enable correct and appropriate relationship setting. A many-to-many relationship is really two one-to-many relationships with a junction/link table.

In addition to specifying relationships between two tables in a database, you also set up referential integrity rules that will help in maintaining a degree of accuracy between tables. It would prevent unwanted and accidental deletions of records in a parent (primary) table that relate to records in the child table. This type of problem could be catastrophic. These rules keep the relationships between tables intact and unbroken in a relational database management system, because the referential integrity prohibits you from changing existing data in ways that invalidate the links between tables. Referential integrity operates strictly on the basis of the tables’ key fields. It checks each time a key field, whether primary or foreign, is added, changed or deleted. If any of these listed actions creates an invalid relationship between two tables, it is said to violate referential integrity. Referential integrity is a system of rules that Microsoft Access uses to ensure that relationships between records in related tables are valid, and that you don't accidentally delete or incorrectly change related data.

NOTE: When tables are linked together, one table is usually called parent table (always ‘one end’ of an existing relationship) and another table is called child table (always ‘many end’ of an existing relationship). This is known as a parent-child relationship between tables. Referential integrity guarantees that there will not be an orphan, a child record without a parent record.

To refine the design - After designing the tables, fields, and relationships you need the time to study the design and detect any flaws that might remain. It is easier to change your database design now, rather than after you have populated the tables with data or created the relevant screens.

To enter data and create other system objects - When you are satisfied that the table structures meet the design goals described here, then it's time to go ahead and add all your existing data to the tables. You can then create any queries, forms, reports, macros, and modules that you may want.

Additional reading:

Data Normalization - minimizing the duplication of information in a relational database through effective table design (making sure that fields contain only one item of data that is directly related to the primary key, and eliminating redundant data). More »

Referential Integrity Rules - preserving the defined relationships between tables when records are entered or deleted, and ensuring that key values are consistent, in order to prevent users from: adding records to a related table when there is no associated record in the primary table, changing values in a primary table that would result in "orphaned" records in a related table and deleting records from a primary table when there are matching related records. More »

Building Relationships Between Tables - sharing data between tables and/or enforcing referential integrity rules between related tables. More »

Relational Database Design Guidelines

Relational Database Design Guidelines

When designing a Relational Database, there are many design guidelines that you should consider. Below you will find detailed guidelines relating to Primary, Foreign and Candidate Keys and also elements of the ideal field and table characteristics:

Elements of a Candidate Key

  • It can not be a multipart field.
  • It must contain unique values.
  • It cannot contain null values.
  • Its value cannot cause a breach of the organisations security or privacy rules.
  • Its value in not optional in whole or in part.
  • It comprises a minimum number of fields necessary to define its uniqueness.
  • Its values must uniquely and exclusively identify each record in the table.
  • Its value must exclusively identify the value of each record within a given record.
  • Its value can be modified only in rare or extreme cases.

Elements of a Foreign Key

  • It has the same name as the Primary Key from which it was copied
  • It uses a replica of the field specifications for the primary key from which it was copied
  • It draws its values from the primary key to which it refers.

Elements of a Primary Key

  • It can not be a multipart field.
  • It must contain unique values.
  • It cannot contain null values.
  • Its value cannot cause a breach of the organisations security or privacy rules.
  • Its value in not optional in whole or in part.
  • It comprises a minimum number of fields necessary to define its uniqueness.
  • Its values must uniquely and exclusively identify each record in the table.
  • Its value must exclusively identify the value of each record within a given record.
  • Its value can be modified only in rare or extreme cases.

Rules for Establishing a Primary Key

  • Each table must have one, and only one, Primary key
  • Each Primary Key within the database must be unique, no two tables should have the same primary key unless one of them is a subset table.

Elements of the Ideal Field

  • It represents a distinct characteristic of the subject of the table.
  • It contains only a single value.
  • It cannot be deconstructed into smaller components.
  • It does not contain a calculated or concatenated value.
  • It is unique within the entire database structure.
  • It retains the majority of its characteristics when it appears in more than one table.

Elements of the Ideal Table

  • It represents a single subject, which can be an object or event.
  • It has a Primary Key.
  • It does not contain multipart or multivalued fields.
  • It does not contain calculated fields.
  • It does not containunnecessary duplicate fields.
  • It contains only an absolute minimum amount of redundant data.