我试图在MySQL中实现关系代数的等价性。 create table tham_gia(
MaNV int unsigned not null ,
MaDA int unsigned not null ,
So_Gio int unsigned not null default 0,
primary key (MaNV, MaDA)
);
现在我想找到这
我有一个FridgeContents表,一个食谱表和RecipeIngredients表。 CREATE TABLE Recipes
(
id bigserial NOT NULL,
name text
);
CREATE TABLE Ingredients
(
id bigserial NOT NULL,
name text,
descrip
class Recipe < ActiveRecord::Base
has_many :ingredients
end
class Recipe::Ingredient < ActiveRecord::Base
belongs_to :product
# also has `require_in_filter` boolean attribute
end