Question: Requirements Install MySQL. The easiest way is using docker. Warning to Windows users: docker might not work if you aren't using Windows 10 Professional version.

Requirements

Install MySQL. The easiest way is using docker. Warning to Windows users: docker might not work if you aren't using Windows 10 Professional version. Mileage varies with other versions. Time box your attempt. If it doesn't work, get a VM of Ubuntu with docker. Get Hello World working in MySQL console, then from PHP to MySQL. There are several ways to connect PHP to MySQL. Use whichever one works for you.

Install the table creation scripts manually from console. You can use this script

http://sqlfiddle.com/#!9/f47627

Generate realistic fake data for 1,000 rows each for cats, dogs, exotics, owners, and notes. Use faker.jsfor most of the heavy lifting. Mix up the number of rows in the many to many relationships. 1 owner has 6 cats, and no dogs/exotics. Another has a cat, 2 dogs, and a rat. Another has ... MIX IT UP. You will probably need to do some once only (AKA throw away) code. DO NOT MIX IT IN WITH YOUR NORMAL RUNNING CODE. Keep separate the code for setup, and for sample data, and for normal ongoing operation. Notes should have dates and names in English, but the rest should be Lorem Ipsum. Don't start with the same phrase. Don't have the same length.

Wrong

Note 1: June 6, 2018 | Joe Camel Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Note 2: August 12, 2017 | Djarum Black Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Note 3: May 3, 2017 | Virginia Slims Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Right

Note 1: June 6, 2018 | Joe Camel Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Note 2: August 12, 2017 | Djarum Black Anim id est laborum.

Note 3: May 3, 2017 | Virginia Slims Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

See code below:

Admin.html

Pets to Care

  • Home

  • Contact

  • About

  • Dog

  • Cat

  • Exotic

Pets to Care

Home

Vet

Cynthia (Owner)

Triska (Practice Manager)

3 Partners (Cynthia, Husband, and two others)

2 new vets

Pets to Care

Contact

5700 W 3400 S,

Taylorsville, UT 84129

(801) 948-2000

Pets to Care

About us

Pet Medical Center has been serving Taylorsville, Utah pet owners since 1964. From its humble beginning

in a remodeled fruit stand and with the name "Utah Valley Veterinary Hospital", Pet Medical Center has

become a full-service, sophisticated small animal pet care facility providing comprehensive medical,

surgical and dental care. Our team of veterinarians, veterinarian technicians, assistants, and kennel

workers highly value your family pet. Team work is a key element continuously employed in our daily

practice. Pet Medical Center strives to offer and provide the most comprehensive pet care available in the

Provo-Orem area as well as throughout other communities in Utah County. Our mission is to provide the highest

quality veterinary care for our patients and clients. A healthy pet is a happy per and that is what we want

most for our patients and their families. Additionally, Pet Medical Center provides unique services for owners

and breeders through its sister clinic in Draper, Utah, South Mountain Pet Care, where specialized work in

reproductive medical care is provided. We also provide a variety of pet products such as pet shampoos,

nail clippers, treats, etc., and Hills Diet dog and cat food that can also meet special diets and needs for

your family pet.

Pets to Care

Dog Filterable Table

Name Breed Sex Shots Age Size Licensed Neutered Owners Notes
Rocky Bulldog Male True 10 Large True False Adam None
Snowflake Husky Male True 12 Large True False Henry None
Lassie Poodle Female True 8 Small True False Susan None

Pets to Care

Cat Filterable Table

Name Breed Sex Shots Age Declawed Neutered Owners Notes
Pepper Korat Male True 2 True False Linda None
Salt Manx Male True 4 True False Lindsay None
Tiger Bengal Female True 9 True True Patrick None

Pets to Care

Exotic Filterable Table

Name Species Sex Age Size Owners Notes
Captain Horse Male 5 Medium Cassie None
Pancake Bunny Female 2 Small Cassie None
Feathers Chicken Female 3 Small Jann None

Public.html

Pets to Care

  • Home

  • Contact

  • About

Pets to Care

Home

Vet

Cynthia (Owner)

Triska (Practice Manager)

3 Partners (Cynthia, Husband, and two others)

2 new vets

Pets to Care

Contact

5700 W 3400 S,

Taylorsville, UT 84129

(801) 948-2000

Pets to Care

About us

Pet Medical Center has been serving Taylorsville, Utah pet owners since 1964. From its humble beginning

in a remodeled fruit stand and with the name "Utah Valley Veterinary Hospital", Pet Medical Center has

become a full-service, sophisticated small animal pet care facility providing comprehensive medical,

surgical and dental care. Our team of veterinarians, veterinarian technicians, assistants, and kennel

workers highly value your family pet. Team work is a key element continuously employed in our daily

practice. Pet Medical Center strives to offer and provide the most comprehensive pet care available in the

Provo-Orem area as well as throughout other communities in Utah County. Our mission is to provide the highest

quality veterinary care for our patients and clients. A healthy pet is a happy per and that is what we want

most for our patients and their families. Additionally, Pet Medical Center provides unique services for owners

and breeders through its sister clinic in Draper, Utah, South Mountain Pet Care, where specialized work in

reproductive medical care is provided. We also provide a variety of pet products such as pet shampoos,

nail clippers, treats, etc., and Hills Diet dog and cat food that can also meet special diets and needs for

your family pet.

Cats.js

$.ajax({

url: '/echo/json/',

type: "post",

dataType: "json",

data: {

json: JSON.stringify([

{

"name": "Pepper",

"breed": "Korat",

"sex": "Male",

"shots": "True",

"age": "2",

"declawed": "True",

"neutered": "False",

"owners": "Linda",

"notes": "None"

},

{

"name": "Salt",

"breed": "Manx",

"sex": "Male",

"shots": "True",

"age": "4",

"declawed": "True",

"neutered": "False",

"owners": "Lindsay",

"notes": "None"

},

{

"name": "Bengal",

"breed": "",

"sex": "Female",

"shots": "True",

"age": "9",

"declawed": "True",

"neutered": "True",

"owners": "Patrick",

"notes": "None"

}

]),

delay: 1

},

success: function(data, textStatus, jqXHR) {

drawTable(data);

}

});

function drawTable(data) {

for (var i = 0; i < data.length; i++) {

drawRow(data[i]);

}

}

function drawRow(rowData) {

var row = $("")

$("#tblDogs").append(row);

row.append($("" + rowData.name + ""));

row.append($("" + rowData.breed + ""));

row.append($("" + rowData.sex + ""));

row.append($("" + rowData.shots + ""));

row.append($("" + rowData.age + ""));

row.append($("" + rowData.declawed + ""));

row.append($("" + rowData.neutered + ""));

row.append($("" + rowData.owners + ""));

row.append($("" + rowData.notes + ""));

}

Cats.json

[

{

"name": "Pepper",

"breed": "Korat",

"sex": "Male",

"shots": "True",

"age": "2",

"declawed": "True",

"neutered": "False",

"owners": "Linda",

"notes": "None"

},

{

"name": "Salt",

"breed": "Manx",

"sex": "Male",

"shots": "True",

"age": "4",

"declawed": "True",

"neutered": "False",

"owners": "Lindsay",

"notes": "None"

},

{

"name": "Bengal",

"breed": "Bengal",

"sex": "Female",

"shots": "True",

"age": "9",

"declawed": "True",

"neutered": "True",

"owners": "Patrick",

"notes": "None"

}

]

Dogs.js

$.ajax({

url: '/echo/json/',

type: "post",

dataType: "json",

data: {

json: JSON.stringify([

{

"name": "Rocky",

"breed": "Bulldog",

"sex": "Male",

"shots": "True",

"age": "10",

"size": "Large",

"licenced": "True",

"neutered": "False",

"owners": "Adam",

"notes": "None"

},

{

"name": "Snowflake",

"breed": "Husky",

"sex": "Male",

"shots": "True",

"age": "12",

"size": "Large",

"licenced": "True",

"neutered": "False",

"owners": "Henry",

"notes": "None"

},

{

"name": "Lassie",

"breed": "$Poodle",

"sex": "Female",

"shots": "True",

"age": "8",

"size": "Small",

"licenced": "True",

"neutered": "False",

"owners": "Susan",

"notes": "None"

}

]),

delay: 1

},

success: function(data, textStatus, jqXHR) {

drawTable(data);

}

});

function drawTable(data) {

for (var i = 0; i < data.length; i++) {

drawRow(data[i]);

}

}

function drawRow(rowData) {

var row = $("")

$("#tblDogs").append(row);

row.append($("" + rowData.name + ""));

row.append($("" + rowData.breed + ""));

row.append($("" + rowData.sex + ""));

row.append($("" + rowData.shots + ""));

row.append($("" + rowData.age + ""));

row.append($("" + rowData.size + ""));

row.append($("" + rowData.licenced + ""));

row.append($("" + rowData.neutered + ""));

row.append($("" + rowData.owners + ""));

row.append($("" + rowData.notes + ""));

}

Dogs.json

[

{

"name": "Rocky",

"breed": "Bulldog",

"sex": "Male",

"shots": "True",

"age": "10",

"size": "Large",

"licenced": "True",

"neutered": "False",

"owners": "Adam",

"notes": "None"

},

{

"name": "Snowflake",

"breed": "Husky",

"sex": "Male",

"shots": "True",

"age": "12",

"size": "Large",

"licenced": "True",

"neutered": "False",

"owners": "Henry",

"notes": "None"

},

{

"name": "Lassie",

"breed": "Poodle",

"sex": "Female",

"shots": "True",

"age": "8",

"size": "Small",

"licenced": "True",

"neutered": "False",

"owners": "Susan",

"notes": "None"

}

]

Exotic.js

$.ajax({

url: '/echo/json/',

type: "post",

dataType: "json",

data: {

json: JSON.stringify([

{

"name": "Captain",

"species": "Horse",

"sex": "Male",

"age": "5",

"size": "Medium",

"owners": "Cassie",

"notes": "None"

},

{

"name": "Pancake",

"species": "Bunny",

"sex": "Male",

"age": "2",

"size": "Small",

"owners": "Kim",

"notes": "None"

},

{

"name": "Feathers",

"species": "Chicken",

"sex": "Female",

"age": "3",

"size": "Small",

"owners": "Jann",

"notes": "None"

}

]),

delay: 1

},

success: function(data, textStatus, jqXHR) {

drawTable(data);

}

});

function drawTable(data) {

for (var i = 0; i < data.length; i++) {

drawRow(data[i]);

}

}

function drawRow(rowData) {

var row = $("")

$("#tblDogs").append(row);

row.append($("" + rowData.name + ""));

row.append($("" + rowData.species + ""));

row.append($("" + rowData.sex + ""));

row.append($("" + rowData.age + ""));

row.append($("" + rowData.size + ""));

row.append($("" + rowData.owners + ""));

row.append($("" + rowData.notes + ""));

}

Exotic.json

[

{

"name": "Captain",

"species": "Horse",

"sex": "Male",

"age": "5",

"size": "Medium",

"owners": "Cassie",

"notes": "None"

},

{

"name": "Pancake",

"species": "Bunny",

"sex": "Female",

"age": "2",

"size": "Small",

"owners": "Kim",

"notes": "None"

},

{

"name": "Feathers",

"species": "Chicken",

"sex": "Female",

"age": "3",

"size": "Small",

"owners": "Jann",

"notes": "None"

}

]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!