Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
17 views
DBMS
Best for notes
Uploaded by
VANSH SONI
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save DBMS For Later
Download
Save
Save DBMS For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
17 views
DBMS
Best for notes
Uploaded by
VANSH SONI
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save DBMS For Later
Carousel Previous
Carousel Next
Save
Save DBMS For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 8
Search
Fullscreen
Li “Seay, | ; "AQ, 7 — © dalek prom ULY whey name tile "acyl, jo Candee tajnly Select Pam Ute.” a CD updal UTE yt mand alt woly name = Raye >= guedur than a a 4 = emalley han = eye 49 7 — _ _ ——__DBMS Session 1: Appreciate the concept of Database Management System Q1. What is database? Ans. A database is an organized collection of data. Q2. What is DBMS? Ans. DBMS stands for Database Management system. Itis a software thet controls the creation, maintenance and use of a database. Q3. Name two DBMS Software. Ans. Two DBMS Software are : 1 MySQL 2. Oracle 3. Microsoft SQL Server 4. Microsoft Access, 4, What is the difference between Flat file and Relational? Flat File Relational Data is stored in a single table. Data is stored in multiple tables. It is suitable for less amount of data. Its suitable for targe amount of data Q5. What do you mean by database servers? Ans. Database servers are dedicated ‘computers that hold the actual databases and run only the DBMS and related software. Q6. Write four advantages of database. Ans. Four advantages of database are 1 It reduces Data Redundancy 2. It allows sharing of data. 3. It help to maintain data integrity. 4. It provides Data Security. Q7. What do you mean by Data Redundancy? ‘Ans. Duplication of data ina database is known as data redundancy. Q8. What do you mean by Data Integrity? Ans. Data integrity means that the data is accurate and consistent in the database. Q9. What is Data Consistency? Ans. Data Consistency means there shoud be multiple mismatching copies of the same data in a database. Q10. Write two features of database. Ans. Two features of database are : 1. A database can have one or many tables. 2. Every table in a database has a primary key field which ensures 00% unique values in the database. Q11. What do you mean by RDBMS. Ans. RDBMS stands for Relational Database Management System. When data is to be stored, maintained, and retrieved from multiple tables then special database software are required known as RDBMS. Q12. What is Primary Key? ‘Ans. A field which is unique for each and every record in a table is called pimary key. Q13, What do you mean by Composite Primary key? Ans. When Primary key constraint is applied on one or more columns then it is known as Composite Primary Key.014. Write the queries for the following table : Emp Emp_id | Ename | Salary 1 Suman} 20000 2 Sanjay | 32000 3 Ravi 30000 tl it 100. «a Display the salary of all the employees after incrementing by Rs 10 ‘elect Salary +1000 from Emp; eee ea! a Display the Employee id and salary of all the employees after decreasing by Rs Ans. Select Emp_id, Salary ~ 500 from Emp; . ina it i amount c. Display the Name and salary of all the employees after incrementing it as thrice the of present salary. Ans. Select Ename, Salary * 3 from Emp; 4. Display the Employee id, Name ana salary of all the employees after decrementing it as half the amount of present salary. Ans. Select Emp_id, Ename, Salary/2 from Emp; © Display the Employee id and Name of all the employees. Ans, Select Emp_id, Ename from Emp: (AS. Write the queries for the followina table : Student Aamno Name Class House 1001 Sonam 9 | Blue 10902 Ravi 10 Yellow 1003 Poonam 10 Green «2 Display the entire ble ‘Ans. Select * from Student ! b. Display the list of students whose house color is blue. ‘Ans. Select“ from Student where House = “Blue” & Display the admission number of studénts Ans. Select Admno from ‘Student where House those house color is green. Son iam records in ascending order of AdmisSlon Naminer, ‘Ans. Select from Student order by Admno Asc. ¢. Display the records of Class 10 Students, ‘Ans. Select“ from students where Class = 10; {Display the class of Ravi* Select Cizss from Student where Name = ‘Ravi 9 lnsert the given record : 1004, “Aman”, 4 ‘Ans. inser wto Student vaues( 1004, “Amant i “Blue” 1, Blue") Q16. Which Is used for the follo ne insert @ new record ‘wing task In database? © modify the existing data, 7 Gelete a record © display record Ans. Insert Update DeleteQi7. Write the queries for the following table ; Item ltemno Iname Price | Qty 12 Pen 10 7 13 Eraser 5 15 — 14 ‘Notebook 15 20 a, Write a query to Insert a new record of following detalls 15, “Pencil”, 20, 10 Ans. Insert into item values(15, “Penci", 20, 10); b. Write a query to display detail of items whose quantity Is Ans. Select * from Item where Qty > 10; more than 10. c. Write a query to change the quantity of Item number 13 to 25. Ans. Update Item set Qty = 25 where Itermno = 13° d. Display the total amount of each Item. The amount must be calculated as the price muttiptied by quantity for each item Ans. Select Price * Qty from Item. e. Display the name of item whose price is 10. Ans. Select Iname from Item where price = 10 ; £. Display all the records in ascending order of price. Ans. Select * from Item order by Price asc. 5 g. Identify the Primary key from table item. Ans. ftemno h. Write the suitable data type of field “Iname”. ‘Ans, Char or Varchar i. Write a query to increase the price of all items by Rs2. Ans. Update tem set Price = Price + 2; J. Write a query to decrease the price of all items by Rs2 whose price is less than 20. ‘Ans. Update Item set Price = Price ~ 2 where Price < 20; ‘Session 2 : Create and Edit Tables using Wizard and SQL Commands. Qt. What do you mean by RDBMS? ‘Ans. ROBMS stands for Relational Database Management System. It is a database management system which is based on relational model. Q2. Define the following terms : 1 Table 2 Fields 3. Records Ans. Table : A table is a set of data elements that is organized in vertical columns and horizontal rows. Fields - A field is a set of data values of a particular simple type, one for each row of the table. Records : A row also called @ Record or Tuple represents a single, data item in a table. eer ace tna tne ways of creating table in OpenOffice Base. ‘Ans, Two ways o creating table OpenOffice Ba a. Create table in design vew seme ©: Use Wizard o create able ‘Q4. What do you mean by Data type? Give example of two dat at : ta type used In OpenOffice Base, Ans. Datatypes are used 10 identify which type of data (value) we are going to store in the database.decimal value : Q8. Identify the data type in which we can store the a. Boolean b. Tinyint c. Decimal d. Real . Double £. Smaltint Ans. Data types in which we can store the decimal value are c. Decimal d. Real e. Double 38. What is the difference between Char and Varchar data type? ‘Ans. Charis a fixed length data type and Varcharis a varlatle length data type. QZ. Write the data type suitable for the following fields. a. DateofBirth b. Name ©. Rollno 4. Class e. Email F. City Ans. a. DateotBirth ~ Date b. Name — Char or Varchar ¢- Rolino —Tinyint / Smalint/ integer . Class - Char / Varchar e. Email ~ Char or Varchar . City — Char or Varchar 8. Write four data types available in Alphanumeric Data types. 22S. Four data types available in Alphanumeric Date types : LongVarchar Char Varchar \Varchar_Ignorecase 28. Data in a (RDBMS) Is organized in the form of : Ans. Tables. — / Q10. In RDBMS table is also.known as. Ans. Relation oo Q11. Write four data types which are Ans. Four data types which are used to Smatiint Sed to store numerical value. . Store numerical value are (212. Write four appropriate field names and thelr data ty Pes to store record of student, Ans. Four appropriate field names and their data \ypes to store record of students are 1 Name Char/ Varchar 2. Admno 3. Fees ———__FioatDouble 4, DOB ——___pateQ14, What is the default data type of Taniview? ‘Ans. Verchar 'ype of a field while creating table in design view ts. are the basic buildi f a data: os. ic building blocks of a database. Q16. Write the expanded form of SQL. Ans. SQL : Structured Query Lariquage Q17. A table has columns (horizontal / Vertical). ‘Ans. Horizontal , Vertical (horizontal | Vertical) row and _____—— What is SQL? © SQL stands for Structured Query Language + SQL lets you access and manipulate databases: «= SQL became a standard of the American National Standards Institute (ANSI}.in 1986, and of the International Organization for Standardization {1$0) i in 1987 What Can SQL do? + SQL can execute queries against a database + SQL can retrieve data from: database SQL can insert records in a database © SQL can update records.ina database * SQL can delete records from a database * SQL can create new databases * SQL can create new tables in a database * SQL can create stored procédures in a database + SQL can create views in a database + SQL can set permissions on tables, procedures, and views Some of The Most Important SQL Commands + SELECT - extracts data from a database * UPDATE - updates data in a database DELETE - deletes data from a database INSERT INTO - inserts new data into a database * CREATE DATABASE - creates a new database* ALTER DATABASE - modifies a database + CREATE TABLE - creates a new table + ALTER TABLE - modifies a table * DROP TABLE - deletes a table SQL CREATE TABLE Statement varchar(255)); SREATE TABLE Persons (PersoniD int, LastName varchar(255), FirstName varchar(255) Address varchar(258),Cty varchar(255)) ‘The SQL INSERT INTO Statement INSERT INTO table_name VALUE! S (value1, value2, value3, 'NSERT INTO Customers VALUES (‘Cardinal', "TomB.Erichsen'’, ‘Skageh21’, 'stavanger', '4006', ‘Norway'}; . & Insert Data Only in Specified Columns! 'NSERT INTO Customers (CustomerName, City, Country) VALUES (‘Cardinal ‘Stavanger, ‘Norway'); SQUUPDATE: tement a UPDATE Customers SET ContactName ‘Alfred Schmidt, Gity= ‘Frankfurt’ WHERE CustomerID = 1; UPDATE Customers SET ContactName="luait! WHERE Coutithy="Mexico'; “ SQL DELETE, Statement DELETE FROM Customers WHERE CustomerName s Futterkiste’; OELETE FROM Customers; Delete a Table DROP TABLE Customers; ‘ The SQL SELECT Statement SELECT column1, column2, ... FROM table_name; Select ALL columns SELECT * FROM Customers; The SQL WHERE Clause untry="Mexico' * FROM Customers WHERE Customer0=1; SELECT * FROM Customers WHERE Customerip > 80; SELECT * FROM Customers WHERE Co SELECT The SQL ORDER BY ‘SELECT * FROM. Products ORDER BY Price; SELECT * FROM Products ORDER BY Price DESC; SELECT * FROM Products ORDER BY ProductName SELECT * FROM Products ORDER BY ProductName DE sc;ORDER BY Several Columns ORDER BY Several Columns SELECT * FROM Customers ORDER BY Country, CustomerName; SELECT * FROM Customers ORDER BY Country ASC, CustomerName DESC; The SQL AND Operator SELECT * FROM Customers WHERE Country = 'Spain’ AND CustomerName LIKE 'G%'; SELECT * FROM Customers WHERE Country = 'Germany' AND City = ‘Berlin’ AND PostalCode > 12000; The SQL AND Operator SELECT * FROM Customers WHERE Country = 'Germany' OR Country = 'Spain’; SQL MIN() and MAX() Eunctions SELECT MIN(Price) FROM Products; : SELECT MAX(Price) FROM Products; SELECT AVG(Price) FROM Products; SELECT * FROM Customers WHERE Cust Return all customers from a city that contains the letter L: SELECT * FROM Customers WHERE city LIKE “96L%'; SELECT * FROM Customers .E Customer! = s a SELECT * FROM Products WHERE Price BETWEEN 10 “AND:20; SQL ALTER TABLE statement ALTER TABLE Customers ADD Email varchar(255); = ALTER TABLE - DROP COLUMN3 ALTER TABLE Customers DROP-COLUMN Email; ated: TABLE - ALTER/MODIFY DATATYPE ALTER TABLE table_name MODIFY COLUMN column: hame datatype; on
You might also like
ISM-Practical File-BBA 212
PDF
No ratings yet
ISM-Practical File-BBA 212
20 pages
Database Notes
PDF
100% (1)
Database Notes
38 pages
RDBMS Final Notes For Board Exam
PDF
100% (1)
RDBMS Final Notes For Board Exam
13 pages
DBMS
PDF
No ratings yet
DBMS
4 pages
Class10_ICT_P2U3_DBMS
PDF
No ratings yet
Class10_ICT_P2U3_DBMS
7 pages
IT Project RYTHAM
PDF
No ratings yet
IT Project RYTHAM
16 pages
SQL Tutorial PDF
PDF
100% (1)
SQL Tutorial PDF
43 pages
Ayush Ism
PDF
No ratings yet
Ayush Ism
28 pages
DBMS-notes
PDF
No ratings yet
DBMS-notes
14 pages
ISM Lab Practical File
PDF
No ratings yet
ISM Lab Practical File
25 pages
Introduction To SQL
PDF
No ratings yet
Introduction To SQL
5 pages
DBMS
PDF
No ratings yet
DBMS
6 pages
RDBMSClass 11
PDF
No ratings yet
RDBMSClass 11
7 pages
RDBMS-Day3: - Basic DDL Statements - DML Statements - Aggregate Functions
PDF
No ratings yet
RDBMS-Day3: - Basic DDL Statements - DML Statements - Aggregate Functions
61 pages
Database Management Short Notes
PDF
No ratings yet
Database Management Short Notes
5 pages
DBMS Notes (23-24)
PDF
No ratings yet
DBMS Notes (23-24)
18 pages
Sample Paper Ip pt2 Answer
PDF
No ratings yet
Sample Paper Ip pt2 Answer
6 pages
sql -xii IP
PDF
No ratings yet
sql -xii IP
28 pages
Lecture 9 SQL
PDF
No ratings yet
Lecture 9 SQL
47 pages
DBMS Questions-Answers
PDF
0% (1)
DBMS Questions-Answers
13 pages
DBMS Manual
PDF
No ratings yet
DBMS Manual
96 pages
ISM-AYUSH BANSAL Practical file-BBA 212
PDF
No ratings yet
ISM-AYUSH BANSAL Practical file-BBA 212
20 pages
UNIT-2 SQL
PDF
No ratings yet
UNIT-2 SQL
21 pages
DBMS Notes Class 10
PDF
No ratings yet
DBMS Notes Class 10
9 pages
DBMS Technical Questions TCS
PDF
No ratings yet
DBMS Technical Questions TCS
35 pages
Question 1: Introduction To SQL. Explain What Are Different Types of Data Types in SQL
PDF
No ratings yet
Question 1: Introduction To SQL. Explain What Are Different Types of Data Types in SQL
39 pages
Mysql Full Notes
PDF
No ratings yet
Mysql Full Notes
41 pages
Relational Database Management Systems-Basic
PDF
No ratings yet
Relational Database Management Systems-Basic
29 pages
Class X Important Questions-RDBMS
PDF
No ratings yet
Class X Important Questions-RDBMS
9 pages
Sujal Ism File
PDF
No ratings yet
Sujal Ism File
44 pages
SQL1
PDF
0% (2)
SQL1
20 pages
DBMS and RDBMS
PDF
No ratings yet
DBMS and RDBMS
33 pages
Jenisa Finallllllllllllllllllllllllll
PDF
No ratings yet
Jenisa Finallllllllllllllllllllllllll
18 pages
Dbms Questions Addon
PDF
No ratings yet
Dbms Questions Addon
7 pages
DBMS Query
PDF
No ratings yet
DBMS Query
33 pages
Dbms SQL File
PDF
No ratings yet
Dbms SQL File
35 pages
Ism Lab File-Compressed
PDF
No ratings yet
Ism Lab File-Compressed
59 pages
Database and SQL-2020
PDF
No ratings yet
Database and SQL-2020
19 pages
SQL Viva Questions
PDF
No ratings yet
SQL Viva Questions
16 pages
Unit - I Relational Database Management System (RDBMS)
PDF
No ratings yet
Unit - I Relational Database Management System (RDBMS)
15 pages
Unit 4, RDBMS & MySQL
PDF
No ratings yet
Unit 4, RDBMS & MySQL
6 pages
Important DBMS Questions and Answers IT 402 Class 10 RDBMS
PDF
92% (13)
Important DBMS Questions and Answers IT 402 Class 10 RDBMS
8 pages
SQL FataFAT - Lovejeet Arora 12 CS and IP
PDF
No ratings yet
SQL FataFAT - Lovejeet Arora 12 CS and IP
15 pages
useless
PDF
No ratings yet
useless
28 pages
SQL
PDF
No ratings yet
SQL
11 pages
Dbms CH Wise Questions
PDF
No ratings yet
Dbms CH Wise Questions
8 pages
Databse Chapter 5 - SQL-1
PDF
No ratings yet
Databse Chapter 5 - SQL-1
72 pages
Uniy-3 imp ques
PDF
No ratings yet
Uniy-3 imp ques
4 pages
Ism Lab File
PDF
No ratings yet
Ism Lab File
52 pages
Final-MySQL - Revision
PDF
No ratings yet
Final-MySQL - Revision
15 pages
DBMS Notes Class 10
PDF
No ratings yet
DBMS Notes Class 10
12 pages
SQL Notes ?
PDF
No ratings yet
SQL Notes ?
10 pages
2021 R DBMS lab
PDF
No ratings yet
2021 R DBMS lab
94 pages
Cs 502 Lab Manual Final
PDF
No ratings yet
Cs 502 Lab Manual Final
27 pages
CS Module II MySQL Notes
PDF
No ratings yet
CS Module II MySQL Notes
19 pages
DBMS
PDF
No ratings yet
DBMS
61 pages
RDMS Notes
PDF
100% (1)
RDMS Notes
11 pages
Basic Concepts
PDF
No ratings yet
Basic Concepts
2 pages
ENG NOTES
PDF
No ratings yet
ENG NOTES
115 pages
Sci notes
PDF
No ratings yet
Sci notes
12 pages
Rapid Revision - Our Environment (Prashant Kirad) (1)
PDF
100% (1)
Rapid Revision - Our Environment (Prashant Kirad) (1)
15 pages
Science Short Notes - 1
PDF
No ratings yet
Science Short Notes - 1
20 pages
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
ISM-Practical File-BBA 212
PDF
ISM-Practical File-BBA 212
Database Notes
PDF
Database Notes
RDBMS Final Notes For Board Exam
PDF
RDBMS Final Notes For Board Exam
DBMS
PDF
DBMS
Class10_ICT_P2U3_DBMS
PDF
Class10_ICT_P2U3_DBMS
IT Project RYTHAM
PDF
IT Project RYTHAM
SQL Tutorial PDF
PDF
SQL Tutorial PDF
Ayush Ism
PDF
Ayush Ism
DBMS-notes
PDF
DBMS-notes
ISM Lab Practical File
PDF
ISM Lab Practical File
Introduction To SQL
PDF
Introduction To SQL
DBMS
PDF
DBMS
RDBMSClass 11
PDF
RDBMSClass 11
RDBMS-Day3: - Basic DDL Statements - DML Statements - Aggregate Functions
PDF
RDBMS-Day3: - Basic DDL Statements - DML Statements - Aggregate Functions
Database Management Short Notes
PDF
Database Management Short Notes
DBMS Notes (23-24)
PDF
DBMS Notes (23-24)
Sample Paper Ip pt2 Answer
PDF
Sample Paper Ip pt2 Answer
sql -xii IP
PDF
sql -xii IP
Lecture 9 SQL
PDF
Lecture 9 SQL
DBMS Questions-Answers
PDF
DBMS Questions-Answers
DBMS Manual
PDF
DBMS Manual
ISM-AYUSH BANSAL Practical file-BBA 212
PDF
ISM-AYUSH BANSAL Practical file-BBA 212
UNIT-2 SQL
PDF
UNIT-2 SQL
DBMS Notes Class 10
PDF
DBMS Notes Class 10
DBMS Technical Questions TCS
PDF
DBMS Technical Questions TCS
Question 1: Introduction To SQL. Explain What Are Different Types of Data Types in SQL
PDF
Question 1: Introduction To SQL. Explain What Are Different Types of Data Types in SQL
Mysql Full Notes
PDF
Mysql Full Notes
Relational Database Management Systems-Basic
PDF
Relational Database Management Systems-Basic
Class X Important Questions-RDBMS
PDF
Class X Important Questions-RDBMS
Sujal Ism File
PDF
Sujal Ism File
SQL1
PDF
SQL1
DBMS and RDBMS
PDF
DBMS and RDBMS
Jenisa Finallllllllllllllllllllllllll
PDF
Jenisa Finallllllllllllllllllllllllll
Dbms Questions Addon
PDF
Dbms Questions Addon
DBMS Query
PDF
DBMS Query
Dbms SQL File
PDF
Dbms SQL File
Ism Lab File-Compressed
PDF
Ism Lab File-Compressed
Database and SQL-2020
PDF
Database and SQL-2020
SQL Viva Questions
PDF
SQL Viva Questions
Unit - I Relational Database Management System (RDBMS)
PDF
Unit - I Relational Database Management System (RDBMS)
Unit 4, RDBMS & MySQL
PDF
Unit 4, RDBMS & MySQL
Important DBMS Questions and Answers IT 402 Class 10 RDBMS
PDF
Important DBMS Questions and Answers IT 402 Class 10 RDBMS
SQL FataFAT - Lovejeet Arora 12 CS and IP
PDF
SQL FataFAT - Lovejeet Arora 12 CS and IP
useless
PDF
useless
SQL
PDF
SQL
Dbms CH Wise Questions
PDF
Dbms CH Wise Questions
Databse Chapter 5 - SQL-1
PDF
Databse Chapter 5 - SQL-1
Uniy-3 imp ques
PDF
Uniy-3 imp ques
Ism Lab File
PDF
Ism Lab File
Final-MySQL - Revision
PDF
Final-MySQL - Revision
DBMS Notes Class 10
PDF
DBMS Notes Class 10
SQL Notes ?
PDF
SQL Notes ?
2021 R DBMS lab
PDF
2021 R DBMS lab
Cs 502 Lab Manual Final
PDF
Cs 502 Lab Manual Final
CS Module II MySQL Notes
PDF
CS Module II MySQL Notes
DBMS
PDF
DBMS
RDMS Notes
PDF
RDMS Notes
Basic Concepts
PDF
Basic Concepts
ENG NOTES
PDF
ENG NOTES
Sci notes
PDF
Sci notes
Rapid Revision - Our Environment (Prashant Kirad) (1)
PDF
Rapid Revision - Our Environment (Prashant Kirad) (1)
Science Short Notes - 1
PDF
Science Short Notes - 1