USE DATABASE BookDB;
CREATE TABLE `book` (
`ID` int(11) NOT NULL,
`Title` varchar(50) NOT NULL,
`Author` varchar(50) NOT NULL,
`Year` year(4) NOT NULL,
`Price` double NOT NULL
);
INSERT INTO `book` (`ID`, `Title`, `Author`, `Year`, `Price`)
VALUES ('1', 'C', 'Richie', '1955', '10');
INSERT INTO `book` (`ID`, `Title`, `Author`, `Year`, `Price`)
VALUES ('2', 'JAVA Script', 'Karein', '1958', '20');
INSERT INTO `book` (`ID`, `Title`, `Author`, `Year`, `Price`)
VALUES ('4', 'Java', 'Schwartz', '1959', '10');
INSERT INTO `book` (`ID`, `Title`, `Author`, `Year`, `Price`)
VALUES ('5', 'C++', 'Ross', '1959', '20');
INSERT INTO `book` (`ID`, `Title`, `Author`, `Year`, `Price`)
VALUES ('6', 'prolog', 'Maria', '1972', '10');
INSERT INTO `book` (`ID`, `Title`, `Author`, `Year`, `Price`)
VALUES ('7', 'Perl', 'Wall', '1987', '20');
SELECT COUNT(*) FROM `book`;
SELECT `Title` FROM `book` WHERE `Year` IN (SELECT DISTINCT `Year` FROM `book`);
SELECT * FROM `book` ORDER BY `Year` DESC;
SELECT `Title` FROM `book` WHERE `Year` >= 1970;
SELECT `Title` FROM `book` WHERE `Year` BETWEEN 1958 1972;
SELECT `Title` FROM `book` WHERE `Title` REGEXP 'JAVA';
SELECT AVG(Price) FROM `book`;
UPDATE `book` SET `Title` = 'Visual C++' WHERE `ID` = 5;
INSERT INTO `book` (`ID`, `Title`, `Author`, `Year`, `Price`) VALUES ('8', 'MySql', 'Jackson', '1995', '30');
Database Management ID Price 1 Author Richie Karen 10 2 4 Year 1955 1958 1959 Title...
Database Management
ID Title 1 Author Richie Karen с JAVA Script Java Year 1955 1958 1959 Price 10 20 10 2 4 5 6 C++ prolog Peri Schwartz Ross Maria 1959 1972 20 10 7 Wall 1987 20 The above relation has formation about different books. The table information is already saved as txt format in Moodle under the name Quiz2Data.txt. Using MySql on your computer do: Create a database • Create a table with name book, then load Quiz2Data.txt...
help create a table
data.txt
1,C,Richie,1955
2,JAVA Script,Karen,1958
4,Java,Schwartz,1959
5,C++,Ross,1959
6,prolog,Maria,1972
7,Perl,Wall,1987
ID Title Year Price 1 Author Richie Karen 1955 1958 10 20 2 4 C JAVA Script Java C++ prolog 1959 10 5 Schwartz Ross Maria 1959 1972 20 10 6 7 Perl Wall 1987 20 The above relation has information about different books. The table information is already saved as txt format in Moodle under the name Quiz2Data.txt. Using MySql on your computer do: Create a database...
create table please for my SQL
data.txt
1,C,Richie,1955
2,JAVA Script,Karen,1958
4,Java,Schwartz,1959
5,C++,Ross,1959
6,prolog,Maria,1972
7,Perl,Wall,1987
ID Title Author Price 1 Richie Karen Year 1955 1958 1959 C JAVA Script Java C++ prolog 2 4 10 20 10 5 Schwartz Ross Maria 1959 1972 20 10 6 7 Perl Wall 1987 20 The above relation has information about different books. The table information is already saved as txt format in Moodle under the name Quiz2Data.txt. Using MySql on your computer do: Create...
Database Management
Gmail Maps © Hanson College BC... Dashboard Go to Help Search ID Year Price 1 Author Richie Karen 2 4 Title C JAVA Script Java C++ prolog 1955 1958 1959 1959 1972 10 20 10 Schwartz Ross Maria 5 6 20 10 7 Per Wall 1987 20 The above relation has information about different books. The table information is already saved as txt format in Moodle under the name Quiz2Data.txt. Using MySql on your computer do: Create a...
1) User wants to keep track Books. Each Book has Author (String), Title (String), Year (4 digit String) and Price (Double). Write a Java Book class with constructors and set/get methods. 2) Write a Java program that asks user to enter the Book data on the Console. User can enter any number of books until terminated on the Console. Write the book data to a text file called "book.txt" in the current project directory. 3) Write a Java program to...
1) User wants to keep track Books. Each Book has Author (String), Title (String), Year (4 digit String) and Price (Double). Write a Java Book class with constructors and set/get methods. 2) Write a Java program that asks user to enter the Book data on the Console. User can enter any number of books until terminated on the Console. Write the book data to a text file called "book.txt" in the current project directory. 3) Write a Java program to...
Write the following SQL statements in Microsoft Access by using the Books database from Week 2 Assignment 2. Once complete, copy and paste the SQL statements in a Microsoft Word document: Write SQL statements: To update the publisher name from READ WITH US to READ FOR US To verify the updated name field for the publisher with ID 6 To make the following updates to the Publisher table (be careful with WHERE): Make Contact="John Travolta" for publisher with ID number...
MYSQL Questions: 1.For every author, display the number of books written by that author that is carried by Henry Books. Display the author number as ‘Author Number’, author name concatenated (first last) as ‘Author Name’, and the total number of books written by the author as ‘Number of Titles by Author’. List in descending order by author number. Limit the output to 10 rows. Insert your snip of the query and resultset together here. 2.Using a function, what are the...