Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Database tables

Featured Replies

Hi, I guess this is really a 'database fundamentals' question - as opposed to web design one.

 

I'm planning a very simple members database which will have the usual fields for name, number, email, etc. It will also have fields for 'town' and 'business type', these two will be relevant when it comes to interrogating the database.

 

an example of a record will be

 

bob's car parts.... tel: 01234567... email@email.com.... 'LONDON'.... 'MOTORS'

 

The purpose of the database will be to be able to pull out, for e.g. all the 'motors' business in 'London'. Or, all the 'coffee shop' business in 'Leeds'.

 

My question is... should I use just the one table for the members details? or should I create two additional tables - one for 'business types' (there will probably be around 6 of these), and another for 'towns' (around 10 of these'.

 

I've been around databases for 2 decades and have still never grasped the 'clearly' very basic principle of when to use tables.

 

Cheers guys - be kind! lol

 

 

 

 

 

  • Author

Hi Web guru - thanks for replying....

 

I know..... I've somehow managed to avoid creating a database for over 2 decades... but alas.... hey, I've had a good innings I guess!

 

Yes - some of the businesses will be linked to more than one business category.

 

Cheers

Neil

You need the following tables:

Main table for members

Input table for business

Input table for locations

Mapping table between business and member

 

The last one will take care that one member can have more than one business assigned.

However for performance reason you may consider cutting back the number of tables. If the database grows too big perfect normalization is no longer a benefit. But to know where is the border is not an exact science...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.