1
1
CREATE TABLE `Chegg`.`Persons` ( `Name` VARCHAR(30) NOT NULL ,
`Age` INT(5) NOT NULL , `City` VARCHAR(30) NOT NULL , `Country`
VARCHAR(30) NOT NULL );
INSERT INTO `Persons` (`Name`, `Age`, `City`, `Country`) VALUES
('Mani', '22', 'Vizag', 'India'),VALUES ('Hari', '23',
'Southampton', 'England'),VALUES ('Harsha', '24', 'Sydney',
'Australia'), ('Vijay', '20', 'Delhi', 'India'), ('Harry', '25',
'California', 'USA'), ('Nicholas', '21', 'Gurugaon', 'India'),
('Tom', '26', 'Isthanbul', 'Turkey'), ('Liam', '25', 'Chennai',
'India'), ('Sandeep', '25', 'London', 'England'), ('Rabada', '30',
'Zambia', 'South Africa');
2
CREATE TABLE `HomeworkLib`.`Library` ( `BookName` VARCHAR(20) NOT NULL ,
`Cost` INT(5) NOT NULL );
INSERT INTO `Library` (`BookName`, `Cost`) VALUES ('Half
Girlfriend', '200'), ('The girl next door', '400'), ('My first
Love', '250'), ('The LOC', '550'), ('Live your life', '1000'),
('Real Robinhood', '450'), ('Aladdin', '640'), ('Fight Club',
'400'), ('Radio Station', '300'), ('Mowgli', '300');
3
CREATE TABLE `Chegg`.`Products` ( `Name` VARCHAR(20) NOT NULL ,
`Price` INT(5) NOT NULL );
INSERT INTO `Products` (`Name`, `Price`) VALUES ('Vicks', '20'),
('Oreo', '35'), ('Santoor', '45'), ('MilkBikis', '10'), ('Lays',
'30'), ('Bingo', '30'), ('Kurkure', '20'), ('Maggie', '50'),
('GoodDay', '15'), ('Dairy Milk Silk', '70');
4
CREATE TABLE `HomeworkLib`.`Employye` (
`Name` varchar(20) NOT NULL,
`EmpId` int(11) NOT NULL,
`Age` int(3) NOT NULL
);
INSERT INTO `Employye` (`Name`, `EmpId`, `Age`) VALUES
('Alex', 1426175, 32),
('Bob', 1427153, 23),
('Trump', 1427678, 45),
('Remo', 152796, 45),
('Zaved', 134629, 54),
('Rahul', 147368, 22),
('Rohit', 135848, 56),
('Uday', 137926, 45),
('Raheem', 136926, 35),
('Ajay', 170529, 29);
5
CREATE TABLE `HomeworkLib`.`Chocolate` (
`Chocolate Name` varchar(20) NOT NULL,
`Price` int(5) NOT NULL
)
INSERT INTO `Chocolate` (`Chocolate Name`, `Price`) VALUES
('Dairymilk', 100),
('Ferro Rocher', 299),
('5star', 200),
('Kitkat', 199),
('Munch', 399),
('Kisses', 699),
('Snikkers', 477),
('Perk', 199),
('Fuse', 122),
('Mahachoco', 132);
6
CREATE TABLE `Chegg`.`Movies` ( `Name` VARCHAR(30) NOT NULL ,
`Release Date` DATE NOT NULL );
INSERT INTO `Movies` (`Name`, `Release Date`) VALUES ('Super 30',
'2019-06-19'), ('Agent 21', '2019-06-15'), ('Avengers END GAME',
'2019-04-25'), ('Maharshi', '2019-05-09'), ('Game Over',
'2019-06-14'), ('Udna', '2019-06-07'), ('Kabir Singh',
'2019-06-21'), ('Air Bender', '2019-06-21'), ('Aladdin',
'2019-06-04'), ('Dumbo', '2019-05-16')
7
CREATE TABLE `HomeworkLib`.`Company` (
`CompanyName` varchar(20) NOT NULL,
`Turnover` int(12) NOT NULL
);
INSERT INTO `Company` (`CompanyName`, `Turnover`) VALUES
('Google', 1000),
('Facebook', 1001),
('Instagram', 10002),
('Infosys', 10003),
('Cognigent', 10005),
('Dell', 10004),
('Accenture', 10006),
('Hcl', 5001),
('Behrouz', 1008);
8
CREATE TABLE `HomeworkLib`.`Courses` (
`CourseId` int(3) NOT NULL,
`CourseName` varchar(20) NOT NULL,
`Cost` int(9) NOT NULL
);
INSERT INTO `Courses` (`CourseId`, `CourseName`, `Cost`)
VALUES
(1, 'Java', 1000),
(2, 'Cpp', 599),
(3, 'Html', 499),
(4, 'Javascript', 999),
(5, 'Flutter', 699),
(6, 'Dart', 400),
(7, 'Python', 999),
(8, 'Oracle', 999),
(9, 'R', 677),
(10, 'Go', 588);
9
CREATE TABLE `HomeworkLib`.`AppsAndNumberofDownloads` (
`Appname` varchar(20) NOT NULL,
`Downloads` int(11) NOT NULL
);
INSERT INTO `AppsAndNumberofDownloads` (`Appname`, `Downloads`)
VALUES
('Whatsapp', 200000),
('Facebook', 2000001),
('Instagram', 200003),
('Hike', 20005),
('Uber', 20004),
('Ola', 200004),
('Picasa', 200008),
('Chrome', 30002),
('Pubg', 40003),
('Swiggy', 50002);
10
CREATE TABLE `Ipl` (
`Teamname` varchar(20) NOT NULL,
`Numberofwins` int(10) NOT NULL
);
INSERT INTO `Ipl` (`Teamname`, `Numberofwins`) VALUES
('RCB', 5),
('CSK', 8),
('MI', 5),
('RPS', 2),
('KKR', 4),
('KXIP', 6),
('RR', 3),
('SS', 5),
('GL', 4),
('RI', 7);
Your are to create a database with 10 different related tables each of which will have...
Using the MySQL Workbench create a new database using your design specifications Add at least 10 records to your tables. Note: Certain tables may not require 10 records and that is ok as long as your main tables have 10 or more Create MySQL statements that will retrieve all records or rows from the tables in your database Create 10 MySQL statements that will retrieve specified records or rows from one table in your database Create 10 MySQL statements that...
Topic: Inventory Manangement Part A. Database Creation Your database should have a minimum of 4 tables and include both one-to-many and many-to-many relationships. Be sure to include some numeric and/or date fields. Define all appropriate constraints, using the proper naming conventions (see Structure Notes below). Populate your database with at least 30 records in the main table(s), and whatever is needed in related tables. Submit the following: • a short description of the purpose of the database and what the...
Description Design a database that contains 3-5 related tables to model a scenario of your interest. You should be somewhat familiar with the scenario that you choose to make informed design decisions. For example, if you want to design a database for a small business, you need to know the business logistic in the company. Other examples for your database are a database for a bookstore, a gym (e.g., YMCA), or a small organization. Do step 1 Step 1: Write...
create a database, and create tables with the following requirements: 1) The physical data model is about the book tracking system with the following objects: Book Publisher Author Store 2) Relationship Different to last week assignment, the changes in the relationship are: Book and publisher have a many to many relationship Book and author have a many to many relationship 3) Change the physical data model of last to account to the many to many relationship using: Junction tables Foreign...
Database For this lab you will be using SQL SELECT statements to query your database tables. You will be turning in the results of the following queries: 1. List all Patients and what Bed they are assigned to 2. List all patients who had Treatments and what Treatment they received 3. List all patients who had tests and what Test they had 4. List the employees (doctors, nurses, etc.) who assisted each patient. 5. List all patients in alphabetical order...
Describe briefly a database application case of your choice and represent your data in terms of 3 linked (via foreign key/s) tables. List their respective primary key and foreign key/s if any. Your database application case should be different from those already covered in the lectures or practicals. For the database case in the Additional Exercises of the previous practical, complete the proper construction of all the 5 tables in SQL, building all the pertinent primary and foreign keys there....
Answer the following and explain so I can double check my answers If you use the Management Studio to create a database, the Studio will automatically create a database file plus a ______________________ file. 10 points QUESTION 2 When you use the Management Studio to create a check constraint, you can specify whether you want the constraint enforced for insert or __________________ operations. 10 points QUESTION 3 When you use the Management Studio to create a database, including its tables...
Create a database in visual basic using sql server and create two tables to process information from one table to the next
Write code for mySQL 1) create a new one database ; to create your table 2) Every table should have a primary key 3) Table relationship has to be based on foreign key and shown within your physical table 4) Insert 5 data records in every table 9) Create a database view that return result set of all record and all columns within all 6 table
Create web pages for your database using PHP. You should have one page that will return all the information from the database. You should create additional pages that will allow you to do various queries of your database. You should be able to retrieve and insert data; also include functionality to delete data from your database. Create an html form that will allow you to enter in new information for the database. The information should be handled by a PHP...