Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

Need help designing a database 2

I asked a question similar to this before about designing a database for my WebApp.
This is how it is now.
Two tables

1.  Classes
   class_name  (Primary Key)

2.  Info
   info_id   (Primary Key)  (This is set to Data Type of Int and as an Identifier)
   class_name   (Foreign Key to class_name in Classes table)
The problem is that I can't change the name of class_name.  

Classes can have many info_dates and notes
One Class can only have one professor, time_start, time_end, days and room.

I want to be able to change the class name.  
Not sure how to design it so I can do this.  I tried to add another column to Classes called class_id and it the PK.  Then I tried to make class_id from Classes be the foreign key to class_id from Info.  MS SQL didn't like this.
Not sure what to do.
1 Solution
In Enterprise Manager, when you define the foreign key relationship, check on the "Cascade Update Related Fields" at the bottom of the screen.  Once done, you can now change the class_name and all fields on related tables will also be updated.
jettman26Author Commented:
That was nice and simple.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now