Pages Menu
Chitu Okoli chitu.okoli.org

Posted on Sep 12, 2008 in Computers and the Internet

Database resources

I’ve compiled various helpful links to websites and other resources related to databases.

Contents

Oracle

Other database management systems

Diagramming tools

  • Gliffy – Online diagramming tool

General design tips

  • On which side of a relationship should you place a foreign key?
    • M:N relationship: Always turn it into two 1:M relationships
    • 1:M relationship: Always place the foreign key on the many side
    • 1:1 relationship:
      • (1,1):(0,1): Foreign key goes on (0,1) side
      • (1,0):(0,1): Foreign key goes on whichever side will cause fewer nulls
      • (1,1):(1,1): This relationship almost never exists in the real world. You probably made a mistake. Verify your cardinalities, or merge the two tables.
  • Although natural keys (e.g. e-mail address, username, social insurance number) are commonly used for primary keys, there are many possible problems with them; generally, it is probably best to always use surrogate keys.

Database naming conventions

  • Many variations exist, but one rule is paramount: be consistent!
  • Never uses spaces in names (“ ”); instead, use either CamelCase or underscores_between_words
  • Specific (optional) tips:
    • Avoid redundant table prefixes such as tblCustomer
    • Always use a surrogate primary key (PK) for every table and call it ID, and always call the foreign key (FK) TableID or Table_ID.
      • For example, the PK for Customer table is ID (Customer.ID) and its corresponding FK in the Order table is CustomerID (Order.CustomerID)
  • Detailed specifications:

Books

  • Database Systems: Design, Implementation, and Management – A thorough guide on database theory for systems analysts and application programmers. Everything you need for real-world database design. However, nothing of mathematical value (not for computer scientists); very sparse or general on implementation (not for database administrators); not much on data objects of data APIs (not for how to implement databases in a software application). Very database neutral, though leans mainly towards Oracle and Microsoft Access (this is mainly a university textbook).

Database market share

Discover more from Chitu Okoli

Subscribe now to keep reading and get access to the full archive.

Continue reading