How do you represent comments in a discussion forum’s database?

Category: Database Questions    |    0 views    |    Add a Comment
I recently started developing with MySQL and PHP. I’m building a web application which allows users to post a question which other users then post responses to, much like Yahoo! Answers. I would like advice about how best to structure a database to support this application. It would seem natural to store responses to a question in their own table, but this would require creating a new table for every question. Is this done? Is there a better way?

Thanks for reading.

Share/Save/Bookmark

 

Update using join

Category: Database Questions    |    0 views    |    Add a Comment
I have two tables, say t1 and t2.

t1{
txn_id varchar
status varchar
}

t2{
txn_id varchar
date Date
}

I want to built an update query which will update t1.status=’X’ with join condition t1.txn_id = t2.txn_id and t2.date < sysdate.

Please let me to build an update query.

Share/Save/Bookmark

 

Complex Query

Category: Database Questions    |    0 views    |    Add a Comment
Greeting

When it comes to SQL I’m a novice and I think what I want to do is WAY outside my expertise. I have a file management system called ProjectWise. Everything to create the folder path is located in a single table. You start with the lowest folder then you need to find its parent. Once you’ve found the that parent you need to finds that folders parent and so on until you’ve created the entire path. I’ve attched an image file that shows this much better. I have no idea how to build this path with everything being in a single table. I don’t mind reading I just need to be pointed in the right direction. Thank you for any help.

Attached Images
File Type: png Folder_Paths.png (28.1 KB)

Share/Save/Bookmark

 

SQL 2008 Install Problem

Category: Database Questions    |    0 views    |    Add a Comment
I am a SQL n00b, mostly using some hand-jammed ASP to access/update data. Now I have been tasked to develop a web map of our campus so I need the geospatial functionality of SQL 2008. I have a server (Windows 2003) that is limited by domain policy. I tried to install SQL 2008, but when it gets to the part where it is starting the service it craps out and says “Access Denied.” So I installed SQL 2005 without a glitch (using the exact service account) and it works flawlessly. So I tried to upgrade the SQL 2005 install to SQL 2008 and it again made it to the part where it tried to restart the service and it craps out saying something about poor server health and that the service could not be restarted. I can restart the service no problem with SQL 2005. I have looked everywhere trying to find an answer to this. The one “tidbit” I found was that you must use an account that has “Logon as a Service” permissions; however, that is disabled by group policy. Again, SQL 2005 works great using the same account…does SQL 2008 require more out of the service account than 2005? Any help, insight, or even general comments are appreciated. Thanks!

Share/Save/Bookmark