我試圖在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