There are a few database fields I want and I wonder what's the best way to implement them.

For all of them should I implement them using content types -> manage fields or just add a column in the database?
1. An ID column per table (autoincrement).
2. A global ID over all tables (autoincrement).
3. Creation timestamp (autoset).
4. Modified timestamp. (autoset)
5. Creator (autoset).
6. Modifier (autoset).

The idea is when adding some item, it gets an ID (1), a global ID (2) (a unique ID over the whole database),, the date added is set (3), initially (4) is equal to (3), (5) is set to the user adding, (6) is initially equal to (5).
When the item is modified, (4) and (6) are set accordingly.

I have a feeling my problem here is related to how I view the different constituent parts of the site. I'm mostly thinking in terms of database tables and their fields. Then there is this Drupal web interface, and I assume that if I do something directly via the db, Drupal won't know about it, so the end user won't see it. However, if I do it that way the information should still be set in the db since the db takes care of this (possibly requiring a bit of toying with it). It might be that some require specific modules or me to make some custom module for it. When should I move from just using the CMS as is to tweaking it? How do I identify that point?

Comments

nevets’s picture

My suggestion, is start with what you want to do, not how.

For example maybe you want to make a website that features bicycles. So you need to keep information about a bike, for example how many wheels, what type/style, color, single/multi speed, etc.

Then consider using a content type and adding the fields you need.

Drupal takes care of creating the tables needed for the task, add in views and you can easily produce lists of bikes. Add exposed filters to the view and you can let users filter the list by attributes the bike as.

The point is, if you are going to use Drupal, learn how to Drupal works.

Jaypan’s picture

Nevets is correct. Trying to force Drupal to act the way you want, rather than working with Drupal in the way it works, is a road that ends up with you banging your head on the desk in frustration. It's a common mistake by programmers who pick up Drupal. It's not easy for us to give up the control we're used to when working outside Drupal, and trusting the system, but it's the way to go.

Don't worry about what happens in the background with Drupal, at least not initially. Figure out how to achieve the functionality you want using Drupal, and then after you have a solid handle on that, you can then start to learn to work with Drupal at a deeper level - IE with the API and potentially interacting with the database.