gotqn
gotqn

Reputation: 43646

Design Datatabase tables structure

I am new in this and try to found information in the web have not got any success. I need to create some log tables but have no idea what information should this table contains and how to organize them.

For example: LogErrorTabble, LogChangesTable, etc..

Could anyone give me some articles about this or link to site with example solutions that he has used?

Upvotes: 0

Views: 105

Answers (1)

saintedlama
saintedlama

Reputation: 6898

First of all what log library do you use? If you're on java got for log4j, if you're on .NET go for log4net. Both of these frameworks provide db log appenders that log to the database out of the box.

In case you're not using a log library: use a log library :)

In case you really want to do that on your own I can recommend a layout I used in a project where log messages were stored in a table logs and exceptions associated with an entry in the logs table were stored in an exceptions table but that highly depends on your platform.

You can find a lot of useful information on how to design your log tables in the log4net and log4j documentation. For example take a look at the log4net AdoNetAppender Class.

Upvotes: 1

Related Questions