Please help me and explain this table clearly. it is created from rice ricipes
TABLE 3: Ingredient
CREATE TABLE ingredient(
ingredient_ID serial PRIMARY KEY,
process_ID INTEGER NOT NULL,
step varchar(50) NOT NULL,
ingredient_name VARCHAR(50) NOT NULL,
ingredient_amount SMALLINT NOT NULL);
ANSWER: Here you are creating a table name as Ingredient by the sql statement create , Here first column ingredient_ID has data type as serial which stores a sequential integer, of the INT data type, that is automatically assigned by the database server when a new row is inserted. as given in the below insert statements I do not inserted a value for column ingredient_ID but it is showing in the table and we should note here that ingredient_ID is also a primary key which will be unique always . Now next column is process_ID which is integer you can insert only integer value in this column and int the next column step which is of varchar type you can insert any value in this column , next column is ingredient_name which is also varchar type here also you can insert any value and the last column is ingredient_amount which is of SMALL INT type here you can insert the int values int the range of -215 (-32,768) to 215-1 (32,767). Below some scripts and snapshot is given for better understanding.
INSERT STATEMENTS:
insert into ingredient (process_ID,step, ingredient_name,ingredient_amount) values ('1','one','rice','2');
insert into ingredient (process_ID,step, ingredient_name,ingredient_amount) values ('2','two','water','1');
SELECT *FROM ingredient;

Please help me and explain this table clearly. it is created from rice ricipes TABLE 3:...
Given the mySQL tables created below... Create a mySQL solution to return the itemIDs of items posted by user X, such that all the reviews are “Excellent” or “Good” for these items CREATE TABLE Users ( userId varchar (30) NOT NULL, pass varchar (30), fname varchar (50), lname varchar (50), email varchar (50), gender char(1), age integer, banned boolean, PRIMARY KEY (userId), UNIQUE(email)) CREATE TABLE FavSellers ( userId...
-- Schema definition
create table Customer (
cid smallint not null,
name varchar(20),
city varchar(15),
constraint customer_pk
primary key (cid)
);
create table Club (
club varchar(15) not null,
desc varchar(50),
constraint club_pk
primary key
(club)
);
create table Member (
club varchar(15) not null,
cid
smallint not null,
constraint member_pk
primary key (club,
cid),
constraint mem_fk_club
foreign key (club)
references Club,
constraint mem_fk_cust...
Someone Please Help Me modify this in PHP I'm in desperate need I cant figure this out ... Make the following modifications: For the vendors table: Comment out the table-level primary key Change the VendorIDcolumn to be a column-level primary key Add a VendorEmail column to the bottom of the table definition (define the data type for the column as variable character and set it to not exceed 45 characters) After the lineItems table, add code to create a table...
Create a stored procedure that allows a user to select a bat’s manufacturer and (optionally) serial number using a stored procedure. The output should display all of the players who use the bat’s manufacturer. If the serial number is also provided, only display the players who use that bat’s manufacturer and serial number. Make sure you use a CREATE PROCEDURE call and insert this procedure into the existing database. Submit a document that includes: 1. Commented code for the stored...
CREATE TABLE Gender ( gender CHAR(1), description VARCHAR(10), PRIMARY KEY (gender) ); CREATE TABLE People ( ID INT, name VARCHAR(50), gender CHAR(1), height FLOAT, PRIMARY KEY (ID), FOREIGN KEY (gender) REFERENCES Gender (gender) ); CREATE TABLE Sports ( ID INT, name VARCHAR(50), record FLOAT, PRIMARY KEY (ID), UNIQUE (name) ); CREATE TABLE Competitions ( ID INT, place VARCHAR(50), held DATE, PRIMARY KEY (ID) ); CREATE TABLE Results ( peopleID INT NOT NULL, competitionID INT NOT NULL, sportID INT NOT NULL,...
NEED HELP IN INSERT STATEMENTS FOR THE TABLES CAN YOU PLEASE ADD SOME INSERT STATEMENTS FOR A COMPANY SCHEMA SCRIPT. PLEASE ADN THANK YOU DROP TABLE dependent; DROP TABLE works_on; DROP TABLE project; DROP TABLE dept_locations; DROP TABLE department; DROP TABLE employee; CREATE TABLE employee ( fname varchar(15) not null, minit varchar(1), lname varchar(15) not null, ssn char(9), bdate date, address varchar(50), sex char, salary numeric(10,2), superssn char(9), dno numeric, primary key (ssn), foreign key (superssn) references employee(ssn) ); CREATE...
If I have this schema, how can I solve the following
problem by using MySQL? Please help me, thanks a lot.
create table Buildings ( integer, varchar (100), varchar (100), varchar (2), 2 id unswid 4 name 5 campus primary key (id) 6 8 9 create table Rooms ( integer, varchar (100), varchar (100), integer references Buildings (id), integer, id 1 unswid name building capacity primary key (id) 3 4 5 6 ; 17 8 create table Staff ( integer,...
Given the bsg_planets table created by using the following definition query : -- CREATE TABLE `bsg_planets` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `population` bigint(20) DEFAULT NULL, `language` varchar(255) DEFAULT NULL, `capital` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 Insert information about the planet Mars which has a population of 2, language as "Binary" and "Olympus Mons" as Capital, in bsg_planets. Then list the row(s), with all the information for that...
CREATE TABLE Users ( userId varchar (30) NOT NULL, pass varchar (30), fname varchar (50), lname varchar (50), email varchar (50), gender char(1), age integer, banned boolean, PRIMARY KEY (userId), UNIQUE(email)) CREATE TABLE FavSellers ( userId varchar (30), sellerId varchar (30), PRIMARY KEY (userId, sellerId), FOREIGN KEY(userId) references Users, FOREIGN KEY(sellerId) references Users(userId)) CREATE TABLE Items ( itemId integer, title varchar (50), ...
Relational Database Design Theory, please answers ALL parts
because they are related to each other, and I can't separate it
into different questions. Please help!
By looking at the PHLogger table:
A. List all non-trivial functional dependencies.
B. What is the highest normal form the PHLogger table is in
currently?
C. The external consulting experts at DBInstructor,
Inc., have noticed that city and state of an address can be
inferred by its postal code (zip code). What new functional
dependencies...