

DROP TABLE animals;
CREATE TABLE animals (
     id MEDIUMINT NOT NULL AUTO_INCREMENT,
     name CHAR(30) NOT NULL,
     userid MEDIUMINT,
     PRIMARY KEY (id)
);

INSERT INTO animals (name,userid) VALUES
('dog',1),('cat',1),
        ('penguin',1),
        ('lax',2),('whale',2),('ostrich',2);

SELECT * FROM animals;

create table animalfiles (
    id mediumint not null auto_increment,
    idanimale mediumint,
    filename char(30),
    primary key (id)
);

insert into animalfiles (idanimale,filename) values (1,'dog.jpg'), (1,'cat.jpg'), (2,'dog.jpg');

  select * from animalfiles;
