5
votes
2answers
209 views

Strategy to create audit trails for a SQL database

I wish to create audit trails for specific tables and columns in my database, and document who made the change, when it was made, and what the change was. To do so, I will create the following ...
0
votes
1answer
49 views

SQL Avoiding dynamic tables

I have following problem: I have program, that connects to IRC server, join several channels and for each user on it, count amount of messages. I have to put all this into MySql. So, naive solution ...
2
votes
3answers
107 views

Referential MySql Design

How does this look? It has been over a year since my database concepts class and I have never worked with MySql. I have chosen InnoDB as my engine because of foreign key support using UTF-8 based on ...
1
vote
1answer
98 views

MySQL database with foreign key support

A modified review request has been made here. Can I please have someone review this simple database design below and tell me if this is the correct way to achieve what I want to do? What I am ...
0
votes
1answer
599 views

Data Structure for Categories and SubCategories

I have this relationship: Many Objects to One Category One Category to Many SubCategories I am looking for the best way to store this in my Relational Database? Here were some of the ways I was ...
3
votes
2answers
136 views

A database schema for articles and their revisions

I'm designing a super simple web application for creating articles. All articles on this site can be edited by different people and each edit is a revision. Using an RDBMS, this is my schema: ...
2
votes
1answer
87 views

MySQL query: blog entry has comments or not

How expensive is this query? Lets say for example if I don't have a field called total_comments in my blog table. All I want to know is the blog has comments or not. SELECT EXISTS (SELECT true FROM ...
1
vote
2answers
583 views

Database design for an autoparts store

I'm creating a design database for an autoparts store (this is a project school). For the moment, I'm not sure if the relationship model especially in MODEL, MAKE, BRAND is correct (I really have no ...
2
votes
1answer
161 views

Review my database structure and tell me your suggestions on it

I would like your thoughts on my database structure. I am kind of a rookie but I am trying. All of your suggestions, alternatives, ideas, additions are welcome. Thank you. CREATE TABLE `buy` ( ...
3
votes
2answers
222 views

Creating contact tables

I have a module in my college project for managing Contacts. I'm confused on how to design the contact table. One contact can have multiple email, mobile, website addresses. So I have created two ...