• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Home
  • Multi-AI Governance Blog
    • Responsible AI Blog
    • Digital Factics Blog
    • Legacy Local SEO
  • HAIA
    • SMART
  • Factics
  • Checkpoint-Based Governance
    • What Is an Agent?
  • RECCLIN
  • CAIPR
  • HEQ/AIS
    • AIS pilot data test
  • AI Policy
    • ISO AI Governance Comment

Basil C. Puglisi

Artificial Intelligence (AI) & Digital Marketing Since 2009

  • About Me
    • My Story
      • Appearances for Speaking
  • The Minds That Bend The Machine
  • Governing AI
  • Digital Factics X
  • Digital Factics Instagram
  • AI – Artificial Intelligence
    • Ethical AI – Disclosure
    • AI Literacy & Education
    • AI Learning
      • AI Course Descriptions

Relational Database Design: A Best Practices Primer

December 24, 2012 by Basil C. Puglisi 1 Comment

database-design-development
http://www.riceconsultingllc.com/2012/database-building.php

Relational databases are the dynamic compartments of fundamental web and enterprise cloud applications. Relational databases normalize, sort and link data using tables and queries. The design is open to the interpretation of the database designer, but a poor database design can be disastrous for any business.
A poor design can slow performance, inhibit scalability and create bugs in an enterprise application. To avoid the pitfalls of poor design, a good design plan is critical.
Primary and Foreign Table Keys
Primary and foreign keys link tables together, so developers can query multiple tables in one Structured Query Language (SQL) statement. All tables require a primary key, and any tables that reference another table requires a foreign key to that primary key. For instance, if a database consists of customer information and the related customer orders, a primary key named “CustomerId” can be created in the “Customers” table and a foreign key named “CustomerId” is created in the “Orders” table. The customer ID field is always unique, so each customer is uniquely queried with its linked order. The result is that a programmer can query and display a customer with the customer orders.
Table Indexes
Essentially, the primary and foreign table keys create an index for the tables, but secondary indexes can also be created. Typically, indexes are created on fields that are used in the SQL “join” statements or columns where the programmer queries based on these column values. Indexes sort values for faster lookups and queries. Indexes can mean the different between a query that takes 10 minutes to run and 5 seconds to run.
Types of Table Relationships
Relational databases have two fundamental relationships: one-to-one and one-to-many. There is also the many-to-many relationship, but this type of relationship is not a normalized standard. Many-to-many relationships should be broken down to a one-to-one or one-to-many relationship.
A one-to-one relationship means one record in a primary table links to only one record in a secondary table. For instance, a customer can only have one login identity. The table design can include a main “Customer” table with the customer’s information, and then a “Login” table contains the customer’s login identity and password.
A one-to-many relationship means one record in the primary table links to several records in the secondary table. An example is the customer and orders relationship. A customer has one account, but a customer can have one or many orders. Linking the customer and orders table will result in several records dependent on the number of orders processed by the customer.
Table Normalization
Table normalization is standard in the industry, but each programmer and database designer has his own idea of proper normalization. Normalization is the process of reducing data duplication, increasing data stability and facilitating streamlined updates and deletions of data.
For instance, a new database designer might put “option 1” and “option 2” as database columns for a customer order. However, what happens if the customer has a third option or the business wants to expand to allow for a third option? This table design does not facilitate scalability for customer options. Using this example, the right way to normalize the database is to create an “Options” table and use primary and foreign keys to link the order and option tables. The “Options” table has a foreign key that contains the order number, and the SQL can link to an unlimited amount of options for the customer order.
After the basic database design is set up, there might be some tweaks and changes made to the layout after deployment. This is common with new database layouts, but these fundamentals will help the database admin fall into common configuration pitfalls that impede business growth based on the technology.
Jennifer Marsh is a software developer, programmer and technology writer and occasionally blogs for Rackspace Hosting.

Share this:

  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Pinterest (Opens in new window) Pinterest
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…

Related

Filed Under: Business, Digital Factics Blog, General, Guest Bloggers, Web Development, websites

Subscribe to Blog via Email

Enter your email address to subscribe

Join 9,585 other subscribers

Reader Interactions

Comments

  1. Sean Gomez says

    February 6, 2013 at 11:13 am

    Thank you for is. Very clear.

    Loading...
    Reply

Leave a ReplyCancel reply

Primary Sidebar

Subscribe via Email

Join 9,585 other subscribers
iDBasil C. Puglisi on ORCID

Buy the eBook on Amazon

This is an banner ad for the book Governing AI When Capability Exceeds Control
Buy the book Digital Factics on Amazon

Advanced Site Search

Responsible AI (#AIgenerated by Agents)

New AI Certificates for Doctors and Teachers Teach Checking. Do They Certify It? #AIg

Google launched an AI certificate for healthcare professionals that takes under five hours and carries up to 5.0 CME credits, and Scale and UMSL launched a 12-hour microcredential for teachers. Both teach evaluation of AI output. A European teacher framework asks for evidence of it, and employers can too.

OpenAI Built Four Layers to Watch Its Agents. Human Paging Mostly Keeps Business Hours #AIg

OpenAI’s October 29 post describes up to four automated layers that watch its agents, then discloses that human paging runs at any hour only for highest-priority alerts on frontier training runs, during business hours for most other traffic, and is currently off for internal Codex. For enterprise deployments, alerts go to the customer’s own webhook, and on our reading so does the decision.

House Democrats Ask AI Labs for Incident Reports Within 48 Hours of Discovery #AIg

Letters dated October 27 ask five frontier AI companies for a full accounting of misalignment incidents by November 11 and notice within 48 hours of discovery. None of the fourteen requested items asks who inside a company decides a flagged event is an incident, and that decision is what starts the clock.

A New Jersey Bill Takes Reasonable Care Off the Table for Chatbot Injuries #AIg

New Jersey’s A5607, reported out of committee on October 19, would make a chatbot a product and hold its provider liable for any injury to a user from its use, even after all reasonable care. The monthly harm assessment it requires still needs a named person to decide what the numbers mean.

Europe Proposes Free Access to the Standards Behind AI Act Compliance #AIg

The European Commission proposed on October 6 to make standards referenced in EU law free to read, speed up how they are requested and assessed, and write its own common specifications when standards bodies run late. With EN 18286 now the first AI Act standard, the question is what a faster standard can certify.

New York City Wants a One-Step Exit From Every Customer Service Chatbot #AIg

New York City’s consumer agency proposed rules on October 20 for AI chatbots and phone menus: disclose the bot up front, offer a one-step path to a human, and keep logs showing whether customers got help. The 72-hour repeat-contact count may matter most.

Barclays and Amex Cut 5% Each for AI. Neither Said Who Will Check the Work #AIg

Barclays plans about 5,000 job cuts with fewer developers as AI lifts productivity, and American Express is cutting about 5% of positions to prepare for AI. Wider spans of control and fewer reviewers meet more AI output. Four questions to answer before an AI-justified cut.

More Posts from this Category

#SMAC #SocialMediaWeek

Basil Social Media Week

Legacy Print:

Digital Factics: Twitter

© 2009–2026 Basil C. Puglisi, Creator of Factics™ and the HAIA Ecosystem

%d