I have a couple of mdb files with the exact table structure. I have to change the primary key of the main table from autonumber to number in all of them, which means I have to:
Drop the all the relationships the main table has
Change the main table
Create the relationships again,... for all the tables.
Is there any way to export the...
In a rails app, I using the :finder_sql option in a has_many declaration. The rails docs say that when I do this, "find_in_collection is not added." What does this mean?
...
I'm developing a site that will have a model for users, a model for submissions, and a model for ratings. Each submission may have only one rating per user. My question is how should I set this up in my models?
...
does setting up proper relationships in a database help with anything else other than data integrity?
do they improve or hinder performance?
...
I'm currently in the planning phase of building a scheduling web app (for volunteer staffing of events), and I've got a question for those with more experience.
Background:
There's a calendar of events, and any user at any time can register for any of the events. At a later time, but before that event, one of the admins will step in an...
I have a field called PropertyValue in the UserProfile table that can contain information for address, phone number, first name, last name, user name, city, etc... each record in this table is associated to a user by UserId, it is also associated to a ProfilePropertyDefinition which contains the definition for each of the properties (ie....
I am creating an application to track football teams through out the season. but i am stuck on the design of the database. One fixture has a home team and an away team. I have created a fixture model which has two foreign keys- home_team and away_team but I cant get the association to work right. any ideas? Each fixture belongs to a leag...
I've created 3 models:
Article: contains an article
Tag: contains tags
ArticleTag: meant for associating a many-to-one tags to article relationship. It contains a tag_id and an article_id.
The problem I'm having is I'm fairly new to the active record technology and I don't understand the proper way to define everything. Currently, wh...
I'm building a system that has a user table and a project table. I'm trying to determine the most efficient way to connect users to a project.
I'm was thinking about a table that records the relationship, but I wasn't sure if a serialized list in one field would work just as well.
...
Let's say i have people who search for jobs, and i have a list of jobs.
So i have two tables:
people and jobs.
Now i have a list of skills of the person, and i have a list of skills for the job requirement.
What is better to have ONE skills table like this:
CREATE TABLE skills_reference
(
id INT,
reference_id INT, -- can reference peop...
I have two tables, users and groups. A user can belong to many groups. A group can have many users.
So I have created a have_and_belongs_to_many relationship between users and groups using a join table, groups_users. This all works as expected.
What I would also like to do is specify an ACTIVE group for each user. Were it not for the h...
Hi folks,
I have two tables in the clients mssql database. The first is a job table - so I created an Job entity which contains the load type and load weight and all that stuff - works fine.
My problem now is that there is a second table that includes informations about the load and unload point. The second table, I call it JEP, has a...
I really can not describe my question better in the title. If anyone has suggestions: Please tell!
I use the Linq to SQL framework in .NET. I ran into something which could be easily solved if the framework supported this, it would be a lot of extra coding otherwise:
I have a n to n relation with a helper table in between. Those tables...
Hi Everyone,
I have three models that I want to interact with each other.
Kase, Person and and Company.
I have (I think) setup the relationships correctly:
class Kase < ActiveRecord::Base
#HAS ONE COMPANY
has_one :company
#HAS MANY PERSONS
has_many :persons
class Person < ActiveRecord::Base
belongs_to :company
class Company < Act...
I have a student and faculty table. The primary key for student is studendID (SID) and faculty's primary key is facultyID, naturally. Student has an advisor column and a requested advisor column, which are foreign key to faculty. That's simple enough, right?
However, now I have to throw in dates. I want to be able to view who their advi...
When creating an entity framework model from scratch it is possible to specify a Many to Many relationship in the model.
e.g Entity1 * ----- * Entity2
When a database is then generated from this, a resolver table is then created automatically between the two entities, this is hidden in the code model, allowing direct access to each of...