x.java, y.html, etc.
EAANILA1_7.zipAssignments dbxmlnml@acm.org
Create a table t2 with an auto_incremented key pk1,
an attribute visited of type date, an attribute name
to hold a name, and an attribute to hold a random number.
Then create a procedure to insert one row in the table, the name must be given as a parameter, the rest of the values must be given by the DBMS at the time of the insert.
Hand in as one (1) file assign100.sql.
The file must hold the create table declaration,
the create procedure declaration,
followed by at least 5 call declarations illustrating usage.
Look at the following scenario:
mysql> describe t3// +---------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+-------------+------+-----+---------+-------+ | dist | int(11) | NO | PRI | NULL | | | repno | int(11) | NO | | NULL | | | repname | varchar(16) | NO | | NULL | | +---------+-------------+------+-----+---------+-------+ 3 rows in set (0.00 sec) mysql> describe t4// +----------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+-------------+------+-----+---------+----------------+ | cust | int(11) | NO | PRI | NULL | auto_increment | | custname | varchar(16) | NO | | NULL | | | district | int(11) | NO | MUL | NULL | | | revenue | float | NO | | NULL | | +----------+-------------+------+-----+---------+----------------+ 4 rows in set (0.00 sec)
Create a procedure doing the following:
innodb table t3.
It will contain sales districts, re example above
innodb table t4
for customers belonging to the sales districts of t3.
Re example of t4 above