Structured Query Language
SQL Commands:
• The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP
SQL - Structured query language introductionSmriti Jain
SQL is a language used to define, manipulate, and control relational databases. It has four main components: DDL for defining schemas; DML for manipulating data within schemas; DCL for controlling access privileges; and DQL for querying data. Some key SQL concepts covered include data definition using CREATE, ALTER, DROP statements; data manipulation using SELECT, INSERT, UPDATE, DELETE; and joining data across tables using conditions. Advanced topics include views, aggregation, subqueries, and modifying databases.
This document provides an introduction to SQL and relational database concepts. It explains that SQL is used to manipulate and retrieve data from relational databases. It also outlines the main SQL commands: DDL for data definition, DML for data manipulation, DCL for data control, and DQL for data queries. Key relational database concepts like tables, records, columns, and relationships are defined. Constraints, data types and integrity are discussed. Examples are provided for SQL statements like CREATE, INSERT, UPDATE, DELETE, and SELECT.
The document discusses various clauses and operators that can be used in the WHERE clause of an SQL query. It explains clauses like WHERE, AND, OR that allow filtering records based on conditions. It also describes various operators like =, <, >, BETWEEN, LIKE, IN, NOT that can be used to write those conditions. Examples are given for each clause and operator to illustrate their usage in a WHERE clause.
The document proposes a deep learning solution for age estimation and gender recognition from face images. It uses a Keras/TensorFlow model with the VGG-16 architecture trained on a dataset of 11,500 images from Kaggle. The model achieves better accuracy for age and gender classification than previous methods. It implements a convolutional neural network to first detect faces, then outputs the predicted age and gender through a softmax classification layer.
This document summarizes a seminar presentation on wireless sensor networks (WSNs). It begins with introductions to WSNs, describing them as networks of spatially distributed sensors that monitor conditions like temperature, sound or pollution. It then covers the architecture of WSNs, including special addressing requirements, the architecture of sensor nodes, and differences between WSNs and mobile ad hoc networks. The document discusses applications, design challenges, advantages and disadvantages of WSNs. It concludes by discussing the future potential of WSNs in applications like smart homes and offices.
The document provides a summary of key negotiation techniques from the book Never Split the Difference by Chris Voss. The techniques focus on listening empathetically, understanding the other party's needs and emotions, using labels and questions to acknowledge their perspective, influencing their perceptions through anchoring and reframing, and obtaining clear commitments through follow up questions. The overall goal is to make the other party feel heard and secure so they are willing to share information, consider alternatives, and agree to terms they may initially resist.
This document discusses the potential of internet of things (IoT) technology for creating smart cities. It begins by explaining how large the global IoT market is expected to become by 2020, with billions of connected devices. It then outlines the various components of an IoT ecosystem and discusses market opportunities in areas like application development, integration, and security. The document emphasizes the importance of cities in driving innovation and economic growth. It presents examples of how IoT could be applied in cities for applications like environmental monitoring, parking management, and traffic monitoring. It also discusses challenges around data integration, collection, and analysis for smart cities. Finally, the document discusses approaches for citizen engagement with smart city technologies and applications.
SQL is a programming language used to manage data in relational database systems. It can be used to create, query, update, and modify relational databases. SQL comprises both data definition and data manipulation languages that allow users to define and modify database schemas as well as store, retrieve, and manage data within databases. Some key advantages of SQL include high speed for retrieving large amounts of data, adherence to well-defined standards, and not requiring coding to manage database systems.
in this presentation the commands let you help to understand the basic of the database system software. how to retrieve data, how to feed data and manipulate it very efficiently by using this commands.
SQL is a database query language used to store and manage data in relational database management systems (RDBMS). SQL commands are divided into four categories: DDL for defining database schemas, DML for manipulating data, DCL for controlling access privileges, and DQL for querying data. Some common SQL operations include JOINs to combine data from multiple tables and SET operations like UNION, INTERSECT, and MINUS.
Consists of the explanations of the basics of SQL and commands of SQL.Helpful for II PU NCERT students and also degree studeents to understand some basic things.
This document defines SQL data definition statements and basic SQL query structure. It discusses DDL statements like CREATE, ALTER, and DROP that are used to define and manage database structures. It also explains the typical components of an SQL query including the SELECT, FROM, and WHERE clauses. Finally, it outlines several set operations in SQL like UNION, UNION ALL, INTERSECT, and MINUS.
This document discusses the entity-relationship (ER) model for conceptual database design. It defines key concepts like entities, attributes, relationships, keys, and participation constraints. Entities can be strong or weak, and attributes can be simple, composite, multi-valued, or derived. Relationships associate entities and can specify cardinality like one-to-one, one-to-many, or many-to-many. The ER model diagrams the structure and constraints of a database before its logical and physical implementation.
Structured Query Language (SQL) is a standard language used to create, retrieve, and manage data in relational databases. SQL allows users to define tables, manipulate data within those tables through insert, update, delete statements, and retrieve data through select statements. SQL has different components including DDL for defining database structure, DML for manipulating data, DCL for controlling access, and TCL for managing transactions.
Joins in SQL are used to combine data from two or more tables based on common columns between them. There are several types of joins, including inner joins, outer joins, and cross joins. Inner joins return rows that match between tables, outer joins return all rows including non-matching rows, and cross joins return the cartesian product between tables.
Here are the SQL commands for the questions:
Q1: SELECT PNAME FROM PROJECT WHERE PLOCATION='Houston';
Q2: SELECT FNAME, LNAME FROM EMPLOYEE WHERE HOURS>20;
Q3: SELECT FNAME, LNAME FROM EMPLOYEE, DEPARTMENT WHERE MGRSSN=SSN;
Normalization is the process of removing redundant data from your tables to improve storage efficiency, data integrity, and scalability.
Normalization generally involves splitting existing tables into multiple ones, which must be re-joined or linked each time a query is issued.
Why normalization?
The relation derived from the user view or data store will most likely be unnormalized.
The problem usually happens when an existing system uses unstructured file, e.g. in MS Excel.
MySQL is a popular and freely available open-source relational database management system (RDBMS). It stores data in tables and relationships between data are also stored in tables. MySQL uses SQL and works on many operating systems. It has commands for data definition (CREATE, ALTER, DROP), data manipulation (SELECT, INSERT, UPDATE, DELETE), transaction control (COMMIT, ROLLBACK), and data access control (GRANT, REVOKE). Joins allow retrieving data from multiple tables by linking rows together. Common join types are inner joins, outer joins, and self joins.
This document provides an introduction to SQL (Structured Query Language). It defines SQL as a standard language for accessing and manipulating databases. The key points covered include:
- SQL lets you perform queries against a database to retrieve, insert, update, and delete data. It can also be used to create and modify database structures.
- Common SQL commands covered are SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, ALTER TABLE, DROP TABLE.
- Additional SQL concepts explained are data types, WHERE clauses, ORDER BY clauses, GROUP BY clauses, and JOIN operations.
- RDBMS systems like MySQL, SQL Server, Oracle, etc. use SQL to communicate with the databases they manage.
SQL language includes four primary statement types: DML, DDL, DCL, and TCL. DML statements manipulate data within tables using operations like SELECT, INSERT, UPDATE, and DELETE. DDL statements define and modify database schema using commands like CREATE, ALTER, and DROP. DCL statements control user access privileges with GRANT and REVOKE. TCL statements manage transactions with COMMIT, ROLLBACK, and SAVEPOINT to maintain data integrity.
PL/SQL is Oracle's standard language for accessing and manipulating data in Oracle databases. It allows developers to integrate SQL statements with procedural constructs like variables, conditions, and loops. PL/SQL code is organized into blocks that define a declarative section for variable declarations and an executable section containing SQL and PL/SQL statements. Variables can be scalar, composite, reference, or LOB types and are declared in the declarative section before being used in the executable section.
Introduction to Relational algebra in DBMS - The relational algebra is explained with all the operations. Some of the examples from the textbook is also solved and explained.
Types Of Join In Sql Server - Join With Example In Sql Serverprogrammings guru
Do you know How many types of Joins in SQL. In this ppt presentation we are discussion about types of joins in sql server eg: INNER JOIN , SELF JOIN ,OUTER JOIN ,Right outer Join,Left outer Join,Full Outer Join,CROSS JOIN .
A SQL subquery is a query nested inside another query. Subqueries can be used in the SELECT, WHERE, INSERT, UPDATE, or DELETE clauses. The subquery executes first and its results are then used by the outer query. There are three types of subqueries: single row, multiple row, and multiple column. Single row subqueries use comparison operators like =, <, > and return one row. Multiple row subqueries use operators like IN, ANY, ALL and return multiple rows. Multiple column subqueries compare more than one column between the outer and inner queries.
Integrity constraints are rules used to maintain data quality and ensure accuracy in a relational database. The main types of integrity constraints are domain constraints, which define valid value sets for attributes; NOT NULL constraints, which enforce non-null values; UNIQUE constraints, which require unique values; and CHECK constraints, which specify value ranges. Referential integrity links data between tables through foreign keys, preventing orphaned records. Integrity constraints are enforced by the database to guard against accidental data damage.
The document discusses various SQL commands and concepts. It begins by defining SQL and explaining its purpose and architecture. It then covers the different types of SQL commands - DDL, DML, DCL, and TCL. Specific commands like CREATE, SELECT, INSERT, UPDATE and DELETE are discussed along with their uses. Data types like NUMBER, CHAR, VARCHAR, DATE and LONG are also explained. The document provides examples of creating a table and altering it using SQL statements.
This document provides an overview of SQL (Structured Query Language). It discusses that SQL is used to define, manipulate, and control data in a relational database. It can define database schemas, insert, modify, retrieve, and delete data from databases. The document also provides a brief history of SQL and describes its main components like DDL, DML, and DCL. It provides examples of common SQL commands and functions. Finally, it discusses SQL Plus which is a basic Oracle utility used to interact with databases through a command line interface.
SQL is a programming language used to manage data in relational database systems. It can be used to create, query, update, and modify relational databases. SQL comprises both data definition and data manipulation languages that allow users to define and modify database schemas as well as store, retrieve, and manage data within databases. Some key advantages of SQL include high speed for retrieving large amounts of data, adherence to well-defined standards, and not requiring coding to manage database systems.
in this presentation the commands let you help to understand the basic of the database system software. how to retrieve data, how to feed data and manipulate it very efficiently by using this commands.
SQL is a database query language used to store and manage data in relational database management systems (RDBMS). SQL commands are divided into four categories: DDL for defining database schemas, DML for manipulating data, DCL for controlling access privileges, and DQL for querying data. Some common SQL operations include JOINs to combine data from multiple tables and SET operations like UNION, INTERSECT, and MINUS.
Consists of the explanations of the basics of SQL and commands of SQL.Helpful for II PU NCERT students and also degree studeents to understand some basic things.
This document defines SQL data definition statements and basic SQL query structure. It discusses DDL statements like CREATE, ALTER, and DROP that are used to define and manage database structures. It also explains the typical components of an SQL query including the SELECT, FROM, and WHERE clauses. Finally, it outlines several set operations in SQL like UNION, UNION ALL, INTERSECT, and MINUS.
This document discusses the entity-relationship (ER) model for conceptual database design. It defines key concepts like entities, attributes, relationships, keys, and participation constraints. Entities can be strong or weak, and attributes can be simple, composite, multi-valued, or derived. Relationships associate entities and can specify cardinality like one-to-one, one-to-many, or many-to-many. The ER model diagrams the structure and constraints of a database before its logical and physical implementation.
Structured Query Language (SQL) is a standard language used to create, retrieve, and manage data in relational databases. SQL allows users to define tables, manipulate data within those tables through insert, update, delete statements, and retrieve data through select statements. SQL has different components including DDL for defining database structure, DML for manipulating data, DCL for controlling access, and TCL for managing transactions.
Joins in SQL are used to combine data from two or more tables based on common columns between them. There are several types of joins, including inner joins, outer joins, and cross joins. Inner joins return rows that match between tables, outer joins return all rows including non-matching rows, and cross joins return the cartesian product between tables.
Here are the SQL commands for the questions:
Q1: SELECT PNAME FROM PROJECT WHERE PLOCATION='Houston';
Q2: SELECT FNAME, LNAME FROM EMPLOYEE WHERE HOURS>20;
Q3: SELECT FNAME, LNAME FROM EMPLOYEE, DEPARTMENT WHERE MGRSSN=SSN;
Normalization is the process of removing redundant data from your tables to improve storage efficiency, data integrity, and scalability.
Normalization generally involves splitting existing tables into multiple ones, which must be re-joined or linked each time a query is issued.
Why normalization?
The relation derived from the user view or data store will most likely be unnormalized.
The problem usually happens when an existing system uses unstructured file, e.g. in MS Excel.
MySQL is a popular and freely available open-source relational database management system (RDBMS). It stores data in tables and relationships between data are also stored in tables. MySQL uses SQL and works on many operating systems. It has commands for data definition (CREATE, ALTER, DROP), data manipulation (SELECT, INSERT, UPDATE, DELETE), transaction control (COMMIT, ROLLBACK), and data access control (GRANT, REVOKE). Joins allow retrieving data from multiple tables by linking rows together. Common join types are inner joins, outer joins, and self joins.
This document provides an introduction to SQL (Structured Query Language). It defines SQL as a standard language for accessing and manipulating databases. The key points covered include:
- SQL lets you perform queries against a database to retrieve, insert, update, and delete data. It can also be used to create and modify database structures.
- Common SQL commands covered are SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, ALTER TABLE, DROP TABLE.
- Additional SQL concepts explained are data types, WHERE clauses, ORDER BY clauses, GROUP BY clauses, and JOIN operations.
- RDBMS systems like MySQL, SQL Server, Oracle, etc. use SQL to communicate with the databases they manage.
SQL language includes four primary statement types: DML, DDL, DCL, and TCL. DML statements manipulate data within tables using operations like SELECT, INSERT, UPDATE, and DELETE. DDL statements define and modify database schema using commands like CREATE, ALTER, and DROP. DCL statements control user access privileges with GRANT and REVOKE. TCL statements manage transactions with COMMIT, ROLLBACK, and SAVEPOINT to maintain data integrity.
PL/SQL is Oracle's standard language for accessing and manipulating data in Oracle databases. It allows developers to integrate SQL statements with procedural constructs like variables, conditions, and loops. PL/SQL code is organized into blocks that define a declarative section for variable declarations and an executable section containing SQL and PL/SQL statements. Variables can be scalar, composite, reference, or LOB types and are declared in the declarative section before being used in the executable section.
Introduction to Relational algebra in DBMS - The relational algebra is explained with all the operations. Some of the examples from the textbook is also solved and explained.
Types Of Join In Sql Server - Join With Example In Sql Serverprogrammings guru
Do you know How many types of Joins in SQL. In this ppt presentation we are discussion about types of joins in sql server eg: INNER JOIN , SELF JOIN ,OUTER JOIN ,Right outer Join,Left outer Join,Full Outer Join,CROSS JOIN .
A SQL subquery is a query nested inside another query. Subqueries can be used in the SELECT, WHERE, INSERT, UPDATE, or DELETE clauses. The subquery executes first and its results are then used by the outer query. There are three types of subqueries: single row, multiple row, and multiple column. Single row subqueries use comparison operators like =, <, > and return one row. Multiple row subqueries use operators like IN, ANY, ALL and return multiple rows. Multiple column subqueries compare more than one column between the outer and inner queries.
Integrity constraints are rules used to maintain data quality and ensure accuracy in a relational database. The main types of integrity constraints are domain constraints, which define valid value sets for attributes; NOT NULL constraints, which enforce non-null values; UNIQUE constraints, which require unique values; and CHECK constraints, which specify value ranges. Referential integrity links data between tables through foreign keys, preventing orphaned records. Integrity constraints are enforced by the database to guard against accidental data damage.
The document discusses various SQL commands and concepts. It begins by defining SQL and explaining its purpose and architecture. It then covers the different types of SQL commands - DDL, DML, DCL, and TCL. Specific commands like CREATE, SELECT, INSERT, UPDATE and DELETE are discussed along with their uses. Data types like NUMBER, CHAR, VARCHAR, DATE and LONG are also explained. The document provides examples of creating a table and altering it using SQL statements.
This document provides an overview of SQL (Structured Query Language). It discusses that SQL is used to define, manipulate, and control data in a relational database. It can define database schemas, insert, modify, retrieve, and delete data from databases. The document also provides a brief history of SQL and describes its main components like DDL, DML, and DCL. It provides examples of common SQL commands and functions. Finally, it discusses SQL Plus which is a basic Oracle utility used to interact with databases through a command line interface.
This document provides an overview of SQL and database concepts through 20 pages. It discusses:
- The history and purpose of SQL as a standard language for operating on relational databases.
- Different SQL data types including numeric, date/time, and string types. It describes the allowed values and formats for each type.
- Key concepts in database management including the data definition language (DDL) for creating and modifying database structures, the data manipulation language (DML) for querying and modifying data, and different types of keys and constraints.
- Specific SQL commands like CREATE, DROP, INSERT, UPDATE, DELETE, and SELECT along with syntax and examples.
The document serves as an introduction and
The document discusses SQL commands and concepts. It begins by explaining the different types of SQL statements: Data Definition Language (DDL) for creating and modifying database objects, Data Manipulation Language (DML) for manipulating data, Data Retrieval Language (DRL) for querying data, Transaction Control Language (TCL) for managing transactions, and Data Control Language (DCL) for managing user access. It then provides examples of key DDL commands like CREATE, ALTER, and DROP TABLE and DML commands like INSERT, UPDATE, DELETE. It concludes by introducing aggregate functions in SQL like COUNT for summarizing data.
The document provides information about Structured Query Language (SQL) including its basic concepts, data types, CREATE TABLE and INSERT commands, constraints, operators and data modifications. It defines key SQL concepts such as relations, attributes, tuples, primary keys, foreign keys and discusses SQL's capabilities for data definition, manipulation, queries and transaction control. Examples are given for creating a table and inserting records into the table.
The document provides an introduction to SQL and database concepts. It defines key terms like data, information, fields, records, databases, tuples, attributes, primary keys, and foreign keys. It also describes SQL commands for creating tables, inserting data, querying data using conditions, sorting results, and using aggregate functions. Common data types and constraints in SQL are explained. Functions for mathematical operations, string manipulation and date/time are also listed.
This document provides an overview of the relational database language SQL. It begins by defining basic data types in SQL like numbers, characters, dates and times. It then discusses the SQL Data Definition Language (DDL) which is used to define and modify database schemas and objects. Specific DDL commands like CREATE, DROP, ALTER, TRUNCATE and RENAME are described. The document also covers the SQL Data Manipulation Language (DML) including commands for queries, inserts, updates and deletes. Additional topics discussed include constraints, indexes, views and the advantages of SQL.
This document provides an overview of SQL and database management systems. It discusses SQL queries, data types including numeric, date/time, and string types. It also covers SQL programming concepts such as data definition language (DDL) including commands to create, drop, alter and backup databases. Data manipulation language (DML) commands to manipulate data are also discussed, including select, insert, update, and delete. Different types of keys and constraints used in databases are described. SQL operators like arithmetic, comparison, and logical operators are also summarized.
This document provides an overview of DBMS (Database Management Systems) and related concepts. It discusses relational algebra operations like select, project, union, set difference, cartesian product, and rename. It also covers SQL components like data types, data definition language, data manipulation language, and data control language. Key concepts around query language, relational algebra characteristics and operations, and SQL characteristics, syntax rules, and data types are summarized. Set operations like union, intersect, and except in MySQL are also outlined.
SQL is a language used to interface with relational databases. It allows users to create, modify and delete database structures and data. Key features include using commands like SELECT, INSERT, UPDATE and DELETE. SQL follows specific syntax rules and uses delimiters like semicolons. It supports various data types and operators to perform queries and manipulations. Common SQL statements are used for data definition (DDL), data manipulation (DML), and data control (DCL).
SQL is a language that provides an interface to a relational database system.
SQL is developed by IBM in 1970s and it is a defacto standard as well as ISO & ANSI standard
SQL also supports DML for insert, update & delete operations and DDL for creating and modifying tables and other database structures.
This document provides an overview of structured query language (SQL) and basic database concepts. It defines common database terms like data, information, fields, records, tuples, attributes, and keys. It also describes SQL's data definition language for creating tables, data manipulation language for inserting, updating and deleting data, and transaction control language. The document outlines various SQL data types, constraints, operators and functions. It provides examples of SQL commands for creating tables, inserting data, querying with select statements, and ordering and grouping query results.
This document provides an introduction and overview of SQL (Structured Query Language). It begins with contact details for instructors and then covers the following key points in 3 sentences or less:
The history of SQL is outlined beginning in 1970 with E.F. Codd's development of the relational database concept through various SQL standards releases. Popular database management systems that support SQL are listed along with an overview of what SQL can do including retrieving, manipulating and defining data. The main components of SQL - DDL, DML, DCL, TCL, and DQL - are defined along with some common commands like SELECT, INSERT, UPDATE, DELETE, CREATE TABLE and more.
SQL: Structured Query Language
Includes:
Introduction
It is a computer programming language that is used for storage, retrieval and manipulation of data that is stored in relational database. This is a standard computer programming language used for RDMS (Relational Database Management Systems).
IBM’s Ted Cod a.k.a Father of Relational databases gave the concept of relational model for database in 1970. It was 4 years later SQL appeared in 1974. This was just an idea, which got conceptualized in the form of Systems/R in 1978 and was released by IBM. The ANSI standards and first prototype of relational databases was released in 1986, which is popularly knows as Oracle
Advantages:
Used for accessing data in RDBMS.
Used for describing data.
Definition of data and its manipulation.
Can be used with other programming language by embedding SQL modules into other languages code, pre-compilers and libraries.
Possible to create and drop data base using this programming language.
Setting permission on views, table and procedures.
Can be used for creating views, procedures and functions.
Commands
Commands in SQL are categorized into three category namely
DDL – Data definition language
DML – Data Manipulation language
DCL – Data Control language
Data Definition Language (DDL)
Commands that are classified under DDL category are as follows:
CREATE – Used for creating an object, table/view.
ALTER – Used for modifying an existing database object.
DROP – Object, table an views created using CREATE can be deleted/removed.
Data Manipulation Language (DML)
Commands that are classified under DML are as follows:
SELECT – Used for retrieving a set of records from one/more than one tables.
DELETE – Used for deleting records.
UPDATE – Used for modifying / updating records.
INSERT – Used for inserting records.
Data Control Language (DCL)
Commands that have been classified under DCL are:
GRANT – Users can be granted permission / privileges using this command
REVOKE – Privileges to the user can be taken back using this command.
Constraints
Rules are enforced on the columns of the table that contain data specific for the field for all the record in the table. These rules are referred to as constraints, which are generally used to ensure that field only gets a particular type of value. For instance if there is a field called “Age” in the table, then this field can only take numeric value.
Constraints set up for the table apply to all the data stored in the table.
Some of the common constraints are:
NOT NULL:
This constraints ensure that the field value is never set to NULL
DEFAULT:
Typically used to fill in a default value for any field left blank.
UNIQUE:
If the constraints is set on a column, then all value set for this field will have to be unique
The document discusses Structured Query Language (SQL). It introduces SQL and provides information on its architecture, commands, data types, and use for data warehousing. SQL is described as a language for storing, manipulating, and retrieving data in relational database management systems. Common SQL commands are listed as CREATE, SELECT, INSERT, UPDATE, DELETE, and DROP.
SQL is a language used to communicate with databases and manage data. It allows users to create, update, and retrieve data from databases. The document outlines the history of SQL and its evolution over time. It also describes key SQL concepts like data types, commands, primary keys, database normalization, and techniques for ensuring data integrity.
Software engineering is concerned with developing software using a systematic process and addressing factors like increasing demands and low expectations. It involves activities like specification, development, validation and evolution. Some key challenges are coping with diversity, reduced delivery times and developing trustworthy software. Different techniques are suitable depending on the type of system, and processes may incorporate elements of models like waterfall, incremental development and integration/configuration. Prototyping can help with requirements, design and testing.
The document provides an introduction to software engineering and discusses software, software engineering, the software development life cycle (SDLC), and SDLC models. It defines software and its components. It describes software engineering goals and challenges. It explains the SDLC phases including feasibility study, requirements analysis, design, development, testing, deployment, and maintenance. It discusses various SDLC models like waterfall, iterative, prototype, spiral, and agile models.
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdfProf. Dr. K. Adisesha
The document discusses requirement engineering and provides details on:
- Types of requirements including functional, non-functional, user, and system requirements
- The requirement engineering process including feasibility studies, elicitation, analysis, specification, validation, and management
- Software requirement specification (SRS) documents, their purpose, characteristics of a good SRS, and typical sections
- Functional and non-functional requirements in more depth
This document discusses system modeling. It defines system modeling as developing abstract models of a system from different perspectives. Common modeling techniques discussed include context models, interaction models, structural models, behavioral models, and model-driven engineering. Specific modeling languages covered are activity diagrams, use case diagrams, sequence diagrams, class diagrams, and state diagrams. The document provides examples and definitions for how to apply these modeling approaches and languages.
Architectural design establishes the framework for software development by examining requirements and designing a model that specifies system components, their inputs/outputs/functions, and interactions. It can be represented using structural, dynamic, process, functional, or framework models. The outputs are an architectural design document and various project plans. Architectural design decisions impact non-functional requirements and common decisions include architectural style and system decomposition.
The document discusses various types of software testing including unit testing, component testing, system testing, test-driven development, release testing, and user testing. It provides details on the goals and processes involved in each type of testing. Unit testing involves testing individual program units in isolation to check functionality. Component and system testing focus on interactions between units and components. Test-driven development interleaves writing tests before code. Release testing validates that software meets requirements before release. User testing involves customers providing input on a system under test.
This document discusses computer communication and networks. It defines data communication and its key characteristics of delivery, accuracy, timeliness and jitter. It describes the core components of a data communication system including the message, sender, receiver, transmission medium and protocols. It then discusses different types of computer networks including LANs, WANs, PANs and MANs. The key aspects covered are their definitions, examples, advantages and disadvantages.
Data communication involves the exchange of data between two devices via transmission media such as cables. It consists of five main components: a message, sender, receiver, transmission medium, and protocol. Data can be transmitted in three modes - simplex, half-duplex, and full-duplex. Transmission media can be guided (wired) such as twisted pair or coaxial cables, or unguided (wireless) such as radio waves. Networks are sets of connected devices that can be arranged in various topologies like bus, star, ring, or mesh. Switching techniques such as circuit, message, and packet switching determine how data is routed through a network.
The document discusses the data link layer. It covers the following key points:
- The data link layer has two sublayers: the logical link control (LLC) sublayer and the medium access control (MAC) sublayer.
- The LLC sublayer controls flow and performs error checking, while the MAC sublayer handles frame encapsulation and network addressing.
- The data link layer is responsible for framing, addressing, error control, flow control, and multi-access functionality. It takes packets and converts them to frames for transmission on the physical layer.
- Error detection techniques used include parity checks and cyclic redundancy checks to validate frames are transmitted accurately. Error correction can be done through retransmission
The document provides an overview of the network layer. It discusses key topics like the functions of the network layer such as logical addressing, routing, and internetworking. It describes different routing algorithms including distance vector, link state, and hierarchical routing. It also covers congestion control mechanisms like leaky bucket algorithm, token bucket algorithm, and admission control that are used to control congestion in the network layer.
The document discusses the transport and application layers of the OSI model. It begins by describing the transport layer, including its responsibilities of process-to-process delivery, end-to-end connections, multiplexing, congestion control, data integrity, error correction, and flow control. It then discusses the transport layer protocols TCP and UDP, comparing their key differences such as connection-oriented vs. connectionless and reliability. The document next covers application layer services and protocols, including DNS, HTTP, FTP, and email. It concludes by describing models like client-server and peer-to-peer that are used in application layer communication.
This document provides an introduction and overview of computer hardware components. It discusses input devices like keyboards, mice, scanners, and digital cameras. It also covers output devices such as monitors, printers, speakers. It describes different types of computers based on size and performance, such as microcomputers, minicomputers, and mainframes. The document then discusses computer memory, including primary memory technologies like RAM and ROM, as well as secondary magnetic storage.
This document provides an overview and introduction to the R programming language. It covers the history and development of R, which originated from the S language at Bell Labs in the 1970s. The document then outlines some key concepts in R including data structures, subsetting, control structures, functions, and debugging. It also discusses the design of the R system including its core functionality in base R and extensive library of additional packages.
The document discusses various government scholarship schemes in India and Karnataka for students. It outlines national schemes administered by ministries like Human Resource Development, Social Justice and Empowerment, Tribal Affairs and Minority Affairs. It also describes state-level schemes in Karnataka for SC/ST/OBC and minority students. Eligibility criteria include family income limits and minimum academic performance. The application process involves applying online through the National Scholarship Portal and State Scholarship Portal.
A measles outbreak originating in West Texas has been linked to confirmed cases in New Mexico, with additional cases reported in Oklahoma and Kansas. The current case count is 817 from Texas, New Mexico, Oklahoma, and Kansas. 97 individuals have required hospitalization, and 3 deaths, 2 children in Texas and one adult in New Mexico. These fatalities mark the first measles-related deaths in the United States since 2015 and the first pediatric measles death since 2003.
The YSPH Virtual Medical Operations Center Briefs (VMOC) were created as a service-learning project by faculty and graduate students at the Yale School of Public Health in response to the 2010 Haiti Earthquake. Each year, the VMOC Briefs are produced by students enrolled in Environmental Health Science Course 581 - Public Health Emergencies: Disaster Planning and Response. These briefs compile diverse information sources – including status reports, maps, news articles, and web content– into a single, easily digestible document that can be widely shared and used interactively. Key features of this report include:
- Comprehensive Overview: Provides situation updates, maps, relevant news, and web resources.
- Accessibility: Designed for easy reading, wide distribution, and interactive use.
- Collaboration: The “unlocked" format enables other responders to share, copy, and adapt seamlessly. The students learn by doing, quickly discovering how and where to find critical information and presenting it in an easily understood manner.
CURRENT CASE COUNT: 817 (As of 05/3/2025)
• Texas: 688 (+20)(62% of these cases are in Gaines County).
• New Mexico: 67 (+1 )(92.4% of the cases are from Eddy County)
• Oklahoma: 16 (+1)
• Kansas: 46 (32% of the cases are from Gray County)
HOSPITALIZATIONS: 97 (+2)
• Texas: 89 (+2) - This is 13.02% of all TX cases.
• New Mexico: 7 - This is 10.6% of all NM cases.
• Kansas: 1 - This is 2.7% of all KS cases.
DEATHS: 3
• Texas: 2 – This is 0.31% of all cases
• New Mexico: 1 – This is 1.54% of all cases
US NATIONAL CASE COUNT: 967 (Confirmed and suspected):
INTERNATIONAL SPREAD (As of 4/2/2025)
• Mexico – 865 (+58)
‒Chihuahua, Mexico: 844 (+58) cases, 3 hospitalizations, 1 fatality
• Canada: 1531 (+270) (This reflects Ontario's Outbreak, which began 11/24)
‒Ontario, Canada – 1243 (+223) cases, 84 hospitalizations.
• Europe: 6,814
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...larencebapu132
This is short and accurate description of World war-1 (1914-18)
It can give you the perfect factual conceptual clarity on the great war
Regards Simanchala Sarab
Student of BABed(ITEP, Secondary stage)in History at Guru Nanak Dev University Amritsar Punjab 🙏🙏
How to manage Multiple Warehouses for multiple floors in odoo point of saleCeline George
The need for multiple warehouses and effective inventory management is crucial for companies aiming to optimize their operations, enhance customer satisfaction, and maintain a competitive edge.
As of Mid to April Ending, I am building a new Reiki-Yoga Series. No worries, they are free workshops. So far, I have 3 presentations so its a gradual process. If interested visit: https://www.slideshare.net/YogaPrincess
https://ldmchapels.weebly.com
Blessings and Happy Spring. We are hitting Mid Season.
The Pala kings were people-protectors. In fact, Gopal was elected to the throne only to end Matsya Nyaya. Bhagalpur Abhiledh states that Dharmapala imposed only fair taxes on the people. Rampala abolished the unjust taxes imposed by Bhima. The Pala rulers were lovers of learning. Vikramshila University was established by Dharmapala. He opened 50 other learning centers. A famous Buddhist scholar named Haribhadra was to be present in his court. Devpala appointed another Buddhist scholar named Veerdeva as the vice president of Nalanda Vihar. Among other scholars of this period, Sandhyakar Nandi, Chakrapani Dutta and Vajradatta are especially famous. Sandhyakar Nandi wrote the famous poem of this period 'Ramcharit'.
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsesushreesangita003
what is pulse ?
Purpose
physiology and Regulation of pulse
Characteristics of pulse
factors affecting pulse
Sites of pulse
Alteration of pulse
for BSC Nursing 1st semester
for Gnm Nursing 1st year
Students .
vitalsign
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetSritoma Majumder
Introduction
All the materials around us are made up of elements. These elements can be broadly divided into two major groups:
Metals
Non-Metals
Each group has its own unique physical and chemical properties. Let's understand them one by one.
Physical Properties
1. Appearance
Metals: Shiny (lustrous). Example: gold, silver, copper.
Non-metals: Dull appearance (except iodine, which is shiny).
2. Hardness
Metals: Generally hard. Example: iron.
Non-metals: Usually soft (except diamond, a form of carbon, which is very hard).
3. State
Metals: Mostly solids at room temperature (except mercury, which is a liquid).
Non-metals: Can be solids, liquids, or gases. Example: oxygen (gas), bromine (liquid), sulphur (solid).
4. Malleability
Metals: Can be hammered into thin sheets (malleable).
Non-metals: Not malleable. They break when hammered (brittle).
5. Ductility
Metals: Can be drawn into wires (ductile).
Non-metals: Not ductile.
6. Conductivity
Metals: Good conductors of heat and electricity.
Non-metals: Poor conductors (except graphite, which is a good conductor).
7. Sonorous Nature
Metals: Produce a ringing sound when struck.
Non-metals: Do not produce sound.
Chemical Properties
1. Reaction with Oxygen
Metals react with oxygen to form metal oxides.
These metal oxides are usually basic.
Non-metals react with oxygen to form non-metallic oxides.
These oxides are usually acidic.
2. Reaction with Water
Metals:
Some react vigorously (e.g., sodium).
Some react slowly (e.g., iron).
Some do not react at all (e.g., gold, silver).
Non-metals: Generally do not react with water.
3. Reaction with Acids
Metals react with acids to produce salt and hydrogen gas.
Non-metals: Do not react with acids.
4. Reaction with Bases
Some non-metals react with bases to form salts, but this is rare.
Metals generally do not react with bases directly (except amphoteric metals like aluminum and zinc).
Displacement Reaction
More reactive metals can displace less reactive metals from their salt solutions.
Uses of Metals
Iron: Making machines, tools, and buildings.
Aluminum: Used in aircraft, utensils.
Copper: Electrical wires.
Gold and Silver: Jewelry.
Zinc: Coating iron to prevent rusting (galvanization).
Uses of Non-Metals
Oxygen: Breathing.
Nitrogen: Fertilizers.
Chlorine: Water purification.
Carbon: Fuel (coal), steel-making (coke).
Iodine: Medicines.
Alloys
An alloy is a mixture of metals or a metal with a non-metal.
Alloys have improved properties like strength, resistance to rusting.
INTRO TO STATISTICS
INTRO TO SPSS INTERFACE
CLEANING MULTIPLE CHOICE RESPONSE DATA WITH EXCEL
ANALYZING MULTIPLE CHOICE RESPONSE DATA
INTERPRETATION
Q & A SESSION
PRACTICAL HANDS-ON ACTIVITY
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schoolsdogden2
Algebra 1 is often described as a “gateway” class, a pivotal moment that can shape the rest of a student’s K–12 education. Early access is key: successfully completing Algebra 1 in middle school allows students to complete advanced math and science coursework in high school, which research shows lead to higher wages and lower rates of unemployment in adulthood.
Learn how The Atlanta Public Schools is using their data to create a more equitable enrollment in middle school Algebra classes.
Multi-currency in odoo accounting and Update exchange rates automatically in ...Celine George
Most business transactions use the currencies of several countries for financial operations. For global transactions, multi-currency management is essential for enabling international trade.
Understanding P–N Junction Semiconductors: A Beginner’s GuideGS Virdi
Dive into the fundamentals of P–N junctions, the heart of every diode and semiconductor device. In this concise presentation, Dr. G.S. Virdi (Former Chief Scientist, CSIR-CEERI Pilani) covers:
What Is a P–N Junction? Learn how P-type and N-type materials join to create a diode.
Depletion Region & Biasing: See how forward and reverse bias shape the voltage–current behavior.
V–I Characteristics: Understand the curve that defines diode operation.
Real-World Uses: Discover common applications in rectifiers, signal clipping, and more.
Ideal for electronics students, hobbyists, and engineers seeking a clear, practical introduction to P–N junction semiconductors.
Title: A Quick and Illustrated Guide to APA Style Referencing (7th Edition)
This visual and beginner-friendly guide simplifies the APA referencing style (7th edition) for academic writing. Designed especially for commerce students and research beginners, it includes:
✅ Real examples from original research papers
✅ Color-coded diagrams for clarity
✅ Key rules for in-text citation and reference list formatting
✅ Free citation tools like Mendeley & Zotero explained
Whether you're writing a college assignment, dissertation, or academic article, this guide will help you cite your sources correctly, confidently, and consistent.
Created by: Prof. Ishika Ghosh,
Faculty.
📩 For queries or feedback: [email protected]
How to Subscribe Newsletter From Odoo 18 WebsiteCeline George
Newsletter is a powerful tool that effectively manage the email marketing . It allows us to send professional looking HTML formatted emails. Under the Mailing Lists in Email Marketing we can find all the Newsletter.
How to Subscribe Newsletter From Odoo 18 WebsiteCeline George
Sql commands
1. Chapter 14- SQL Commands
1 | P a g e Prof. K. Adisesha
SQL COMMANDS
What is SQL?
• Structured Query Language and it helps to make practice on SQL commands which provides
immediate results.
• SQL is Structured Query Language, which is a computer language for storing, manipulating and
retrieving data stored in relational database.
• SQL is the standard language for Relation Database System.
• All relational database management systems like MySQL, MS Access, and Oracle, Sybase,
Informix, and SQL Server use SQL as standard database language.
Why SQL?
• Allows users to create and drop databases and tables.
• Allows users to describe the data.
• Allows users to define the data in database and manipulate that data.
• Allows users to access data in relational database management systems.
• Allows embedding within other languages using SQL modules, libraries & pre-compilers.
Allows users to set permissions on tables, procedures, and views
SQL Architecture:
• When you are executing an SQL command for any RDBMS, the system determines the best way
to carry out your request and SQL engine figures out
how to interpret the task.
• There are various components included in the process.
• These components are:
o Query Dispatcher o Optimization Engines o
Classic Query Engine o SQL Query Engine, etc.
• Classic query engine handles all non-SQL queries but
SQL query engine won't handle logical files.
• Simple diagram showing SQL Architecture:
SQL Commands:
• The standard SQL commands to interact with relational databases are CREATE, SELECT,
INSERT, UPDATE, DELETE and DROP.
• These commands can be classified into groups based on their nature:
DDL - Data Definition Language:
• DDL defines the conceptual schema providing a link between the logical and the physical
structure of the database.
• The functions of the Data Definition Language (DDL) are:
2. Chapter 14- SQL Commands
2 | P a g e Prof. K. Adisesha
1. DDL defines the physical characteristics of each record, filed in the record, field‟s data type,
field‟s length, field‟s logical name and also specify relationship among those records.
2. DDL describes the schema and subschema.
3. DDL indicate the keys of records.
4. DDL provides data security measures.
5. DDL provides for the logical and physical data independence.
• Few of the basic commands for DDL are:
Command Description
CREATE Creates a new table, a view of a table, or other object in database
ALTER Modifies an existing database object, such as a table.
DROP Deletes an entire table, a view of a table or other object in the database.
DML - Data Manipulation Language:
• DML provides the data manipulation techniques like selection, insertion, deletion, updation,
modification, replacement, retrieval, sorting and display of data or records.
• DML facilitates use of relationship between the records.
• DML provides for independence of programming languages by supporting several high-level
programming languages like COBOL, PL/1 and C++.
• Few of the basic commands for DML are:
Command Description
SELECT Retrieves certain records from one or more tables
INSERT Creates a record
UPDATE Modifies records
DELETE Deletes records
DCL - Data Control Language:
• These SQL commands are used for providing security to database objects.
• The different DCL commands are:
Command Description
GRANT Gives a privilege to user
REVOKE Takes back privileges granted from user
TCL – Transaction Control Language:
• It includes commands to control the transactions in a database system.
• The commonly used commands are:
3. Chapter 14- SQL Commands
3 | P a g e Prof. K. Adisesha
Command Description
COMMIT Make all the changes made by the statements issued
permanent.
ROLLBACK Undoes all changes since the beginning of transaction or since
a save point.
Data Types in SQL:
The following are the most common data types of SQL:
SL
No
DATA TYPE DESCRIPTION
1 NUMBER
A variable-length column. Allowed values are zero,
positive and negative numbers
2 CHAR A variable length field up to 255 character in length
3 VARCHAR/VARCHAR2 A variable length field up to 2000 character in length
4 DATE/TIME
A fixed length field. The time is stored as a part of the
date. The default format is DD/MON/YY
5 LONG A variable length filed up to 2 GB in length
6 RAW
A variable length filed used for binary data up to 2000
in length
7 LONG RAW
A variable length filed used for binary data up to 2GB
in length
1. NUMBER:
Used to store a numeric value in a field column.
It may be decimal, integer or real value.
General syntax: NUMBER(n, d)
Where n specifies the number of digits and d specifies the number of digits to right of the
decimal point.
Example: marks NUMBER(3), average NUMBER(2, 3)
2. CHAR:
Used to store a character type data in a column.
General syntax: CHAR(size) o Where size represents the maximum (255 Characters)
number of characters in a column.
Example: name CHAR(15)
3. VARCHAR/VARCHAR2:
It is used to store variable length alphanumeric data.
General syntax: VARCHAR(size) / VARCHAR2(size)
4. Chapter 14- SQL Commands
4 | P a g e Prof. K. Adisesha
Where size represents the maximum (2000 Characters) number of characters in a column.
Example: address VARCHAR2(50)
4. DATE:
It is used to store date in columns.
SQL supports the various date formats other than the standard D-MON-YY.
Example: dob DATE
5. TIME:
It is used to store time in columns.
SQL supports the various time formats other than the standard hh-mm-ss.
Every DATE and TIME can be added, subtracted or compared as it can be done with other data
types.
6. LONG:
1. It is used to store variable length strings of up to 2GB size.
2. Example: description LONG
Structure of SQL command:
• Any SQL command is a combination of keywords, identifiers and clauses.
• Every SQL command begins with a keyword (CREATE, SELECT, DELETE and so on) which as
a specific meaning to the language.
• SELECT, FROM and WHERE are keywords.
• The clauses are “FROM student” and “WHERE RegNo=109”.
• Here SELECT and FROM are mandatory, but WHERE is optional.
• Name, Student, RegNo, are identifier that refers to objects in the database.
• Name and RegNo are column names, while Student is a table name.
• The equal sign is an operator and 109 is a numeric constant.
What is an Operator in SQL?
An operator is a reserved word or a character used primarily in an SQL statement's WHERE
clause to perform operation(s), such as comparisons and arithmetic operations.
Operators are used to specify conditions in an SQL statement and to serve as conjunctions for
multiple conditions in a statement. o Arithmetic operators (+, -, *, / %) o Comparison
operators (>, <, >=, <=, =, !=, <>, !<, !>)
Logical operators (AND, OR, NOT, IN, BETWEEN, EXISTS, ALL, ANY, LIKE,
UNIQUE)
5. Chapter 14- SQL Commands
5 | P a g e Prof. K. Adisesha
SQL Logical Operators:
Here is a list of all the logical operators available in SQL.
Operator Description
ALL The ALL operator is used to compare a value to all values in another value set.
AND The AND operator allows the existence of multiple conditions in an SQL statement's
WHERE clause.
ANY The ANY operator is used to compare a value to any applicable value in the list according
to the condition.
BETWEEN The BETWEEN operator is used to search for values that are within a set of values, given
the minimum value and the maximum value.
EXISTS The EXISTS operator is used to search for the presence of a row in a specified table that
meets certain criteria.
IN The IN operator is used to compare a value to a list of literal values that have been
specified.
LIKE The LIKE operator is used to compare a value to similar values using wildcard operators.
NOT The NOT operator reverses the meaning of the logical operator with which it is used. Eg:
NOT EXISTS, NOT BETWEEN, NOT IN, etc. This is a negate operator.
OR The OR operator is used to combine multiple conditions in an SQL statement's WHERE
clause.
IS NULL The NULL operator is used to compare a value with a NULL value.
UNIQUE The UNIQUE operator searches every row of a specified table for uniqueness (no
duplicates).
Implementation of SQL Commands
CREATE TABLE
• The SQL CREATE TABLE statement is used to create a new table.
• Creating a basic table involves naming the table and defining its columns and each column's data
type.
• Syntax: Basic syntax of CREATE TABLE statement is as follows:
CREATE TABLE Table_name
(
column1 datatype,
column2 datatype, column3
datatype,
.....
columnN datatype,
PRIMARY KEY( one or more columns )
);
6. Chapter 14- SQL Commands
6 | P a g e Prof. K. Adisesha
• Here CREATE TABLE is the keyword followed by the Table_name, followed by an open
parenthesis, followed by the column names and data types for that column, and followed by a
closed parenthesis.
• For each column, a name and a data type must be specified and the column name must be a
unique within the table definition.
• Column definitions are separated by commas (,).
• Uppercase and lowercase letters makes no difference in column names.
• Each table must have at least one column. o SQL commands should end with a semicolon (;).
• Example: Create a table “STUDENT” that contains five columns: RegNo, Name,
Combination, DOB and Fees.
CREATE TABLE STUDENT
(
RegNo NUMBER (6),
Name VARCHAR2 (15),
Combination CHAR (4),
DOB DATE,
Fees NUMBER (9, 2),
PRIMARY KEY ( RegNo )
);
• It creates an empty STUDENT table which looks like this:
o The DESCRIBE or DESC command displays name of the columns, their data type and size
along with the constraints.
• The table can be modified or changed by using the ALTER command.
• Syntax: Basic syntax of ALTER TABLE statement is as follows:
1. ALTER TABLE Table_name
ADD (column_name1 DataType, Cloumn_name2 DataType…);
2. ALTER TABLE Table_name
MODIFY (column_name1 DataType, Cloumn_name2 DataType…);
3. ALTER TABLE Table_name
DROP (column_name1 DataType, Cloumn_name2 DataType…);
RegNo Name Combination DOB Fees
Viewing the table information:
ALTER Statement:
7. Chapter 14- SQL Commands
7 | P a g e Prof. K. Adisesha
• Example:
• Using the ALTER TABLE command the following tasks cannot be performed
o Changing a table name.
o Changing the column name.
o Decreasing the size of a column if table data exists.
o Changing a column’s data type.
DROP TABLE:
• The SQL DROP TABLE statement is used to remove a table definition and all data, indexes,
triggers, constraints, and permission specifications for that table. Syntax: Basic syntax of
• DROP TABLE statement is as follows:
DROP TABLE Table_name;
• Example:
INSERT:
• The SQL INSERT INTO Statement is used to add new rows of data to a table in the database.
• Syntax:
• There are two basic syntaxes of INSERT INTO statement as follows:
INSERT INTO TABLE_NAME [(column1, column2, column3,...columnN)]
VALUES (value1, value2, value3,...valueN);
• Here, column1, column2,...columnN are the names of the columns in the table into which you
want to insert data.
• You may not need to specify the column(s) name in the SQL query if you are adding values for all
the columns of the table. But make sure the order of the values is in the same order as the columns
in the table.
• METHOD 1: The SQL INSERT INTO syntax would be as follows:
INSERT INTO TABLE_NAME VALUES (value1,value2,value3,...valueN);
• Example: Following statements would create six records in STUDENT table:
SQL> INSERT INTO STUDENT VALUES(1401,'RAMESH','PCMC','07-AUG-99',14000);
1 row created.
SQL> INSERT INTO STUDENT VALUES(1402,'JOHN','PCMB','15-SEP-99',13500);
1 row created.
SQL> INSERT INTO STUDENT VALUES(1403,'GANESH','PCME','19-AUG-99',16000);
8. Chapter 14- SQL Commands
8 | P a g e Prof. K. Adisesha
1 row created.
SQL> INSERT INTO STUDENT VALUES(1404,'MAHESH','PCMC','14-JAN-98',17650);
1 row created.
SQL> INSERT INTO STUDENT VALUES(1405,'SURESH','PCMB','03-MAR-98',11500);
1 row created.
SQL> INSERT INTO STUDENT VALUES(1410,'ARUN','PCMC','01-APR-04',13000);
• METHOD 2: The SQL INSERT INTO syntax would be as follows:
SQL> INSERT INTO STUDENT (REGNO, NAME, FEES) VALUES (1411, 'SHREYA',24000);
1 row created.
SQL> INSERT INTO STUDENT (REGNO, COMBINATION,FEES) VALUES(1412,
'PCMB',21000);
1 row created.
• All the above statements would produce the following records in STUDENT table:
UPDATE:
• SQL provides the ability to change data through UPDATE command.
• The UPDATE command used to modify or update an already existing row or rows of a table.
• The basic syntax of UPDATE command is given below.
UPDATE Table_name
SET column_name = value
[, column_name =value ……….]
[WHERE condition];
Example:
SQL> UPDATE STUDENT SET COMBINATION='CEBA' WHERE REGNO=1411;
1 row updated.
SQL> UPDATE STUDENT SET NAME='AKASH' WHERE REGNO=1412;
1 row updated.
9. Chapter 14- SQL Commands
9 | P a g e Prof. K. Adisesha
DELETE command:
• In SQL, an already existing row or rows are removed from tables through the use of DELETE
command.
• The basic syntax of DELETE command is given below.
DELETE Table_name
[WHERE condition];
Example:
SQL> DELETE STUDENT WHERE REGNO=1412;
1 row deleted.
SELECT:
• SQL SELECT statement is used to fetch the data from a database table which returns data in the
form of result table. These result tables are called result-sets.
• Syntax: The basic syntax of SELECT statement is as follows:
SELECT column1, column2, columnN
FROM Table_name;
Compulsory
Part
[WHERE condition(s)]
[GROUPBY column-list]
[HAVING condition(s)]
[ORDER BY column-name(s)];
Optional
Part
• Here, column1, column2...are the fields of a table whose values you want to fetch. If you want to
fetch all the fields available in the field, then you can use the following syntax:
SELECT * FROM table_name;
• Example: Consider the STUDENT table having the following records:
• Following is an example, which would fetch REGNO, NAME and COMBINATION fields of the
customers available in STUDENT table:
10. Chapter 14- SQL Commands
10 | P a g e Prof. K. Adisesha
DISTINCT:
• The SQL DISTINCT keyword is used in conjunction with SELECT statement to eliminate all the
duplicate records and fetching only unique records.
There may be a situation when you have multiple duplicate records in a table. While fetching such
records, it makes more sense to fetch only unique records instead of fetching duplicate records.
• Syntax: The basic syntax of DISTINCT keyword to eliminate duplicate records is as follows:
SELECT
DISTINCT
column1, column2,.....columnN
FROM Table_name
WHERE [condition]
• Example: Consider the STUDENT table having the following records:
• First, let us see how the following SELECT query returns duplicate combination records:
• Now, let us use DISTINCT keyword with the above SELECT query and see the result:
SQL> SELECT DISTINCT COMBINATION FROM
STUDENT ORDER BY COMBINATION;
• This would produce the following result where we do not have any duplicate entry:
11. Chapter 14- SQL Commands
11 | P a g e Prof. K. Adisesha
WHERE clause – (Extracting specific rows)
• The SQL WHERE clause is used to specify a condition while fetching the data from single table
or joining with multiple tables.
• If the given condition is satisfied then only it returns specific value from the table. You would use
WHERE clause to filter the records and fetching only necessary records.
The WHERE clause is not only used in SELECT statement, but it is also used in UPDATE,
DELETE statement, etc., which we would examine in subsequent chapters.
• Syntax: The basic syntax of SELECT statement with WHERE clause is as follows:
SELECT column1, column2, columnN
FROM Table_name
WHERE [condition]
• You can specify a condition using comparison or logical operators like >, <, =, LIKE, NOT, etc.
• Following is an example which would fetch REGNO, NAME and FEES fields from the
STUDENT table where FEES is greater than 15000:
• Following is an example, which would fetch REGNO, NAME and COMBINATION fields from
the STUDENT table for a COMBINATION is „PCMC‟.
• Here, it is important to note that all the strings should be given inside single quotes ('') where as
numeric values should be given without any quote as in above example:
• The SQL AND and OR operators are used to combine multiple conditions to narrow data in an
SQL statement. These two operators are called conjunctive operators.
• These operators provide a means to make multiple comparisons with different operators in the
same SQL statement.
12. Chapter 14- SQL Commands
12 | P a g e Prof. K. Adisesha
The AND Operator:
• The AND operator allows the existence of multiple conditions in an SQL statement's WHERE
clause.
• Syntax: The basic syntax of AND operator with WHERE clause is as follows:
SELECT column1, column2, columnN
FROM Table_name
WHERE [condition1] AND [condition2]...AND [conditionN];
You can combine N number of conditions using AND operator. For an action to be taken by the
SQL statement, whether it be a transaction or query, all conditions separated by the AND must be
TRUE.
• Example: Consider the STUDENT table having the following records:
• Following is an example, which would fetch REGNO, NAME and DOB fields from the
STUDENT table where fees is less than 1500 AND combination is „PCMC:
• The OR operator is used to combine multiple conditions in an SQL statement's WHERE clause.
• Syntax: The basic syntax of OR operator with WHERE clause is as follows:
SELECT column1, column2, columnN
FROM Table_name
WHERE [condition1] OR [condition2]...OR [conditionN];
• You can combine N number of conditions using OR operator. For an action to be taken by the
SQL statement, whether it be a transaction or query, only any ONE of the conditions separated by
the OR must be TRUE.
• Following is an example, which would fetch REGNO, NAME and DOB fields from the
STUDENT table where fees is less than 1500 OR combination is „PCMC:
The OR Operator:
13. Chapter 14- SQL Commands
13 | P a g e Prof. K. Adisesha
ORDER BY – (Sorting the data)
• The SQL ORDER BY clause is used to sort the data in ascending or descending order, based on
one or more columns. Some database sorts query results in ascending order by default.
• Syntax: The basic syntax of ORDER BY clause is as follows:
SELECT column-list
FROM Table_name
[WHERE condition]
[ORDER BY column1, column2, .. columnN] [ASC | DESC];
• You can use more than one column in the ORDER BY clause. Make sure whatever column you
are using to sort, that column should be in column-list.
• Example: Consider the STUDENT table having the following records:
• Following is an example, which would sort the result in ascending order by NAME:
14. Chapter 14- SQL Commands
14 | P a g e Prof. K. Adisesha
• Following is an example, which would sort the result in descending order by NAME:
Working out simple calculations.
• Whenever we want to perform simple calculations such as 10 / 5, we can perform using SELECT
statement which causes an output on monitor.
• But SELECT requires table name to operate.
• One can make use of the dummy table provided by SQL called DUAL which is a single row and
single column table.
• It is used when data from table is not required.
• For example, when a calculation is to be performed such as 10*3, 10/2 etc. and to display the
current system date, we could use the following queries.
SQL Functions:
• The SQL functions serve the purpose of manipulating data items and returning a result.
• There are many built in functions included in SQL and can be classified as Group Functions and
Scalar Functions.
• Group Functions: o Functions that act on set of values are called group functions.
o A group functions can takes entire column of data as its arguments and produces a single
data item that summarizes the column.
o Following are the SQL group functions.
Function Description
AVG Returns average value of „N‟, ignoring NULL values
COUNT(expr) Returns the number of rows where „expr‟ is not NULL
COUNT(*) Returns the number of rows in the table including duplicates and those with
NULL values
MIN Returns minimum value of „expr‟
MAX Returns maximum value of „expr‟
SUM Returns sum of values „N‟
15. Chapter 14- SQL Commands
15 | P a g e Prof. K. Adisesha
• Scalar Functions:
o Functions that act on only one value at a time are called scalar functions. o We can further
classify the functions using the type of data with they are designed to work.
Function Description
Numeric
Functions
Work with numbers.
Examples: ABS, POWER, ROUND, SQRT
String
Functions
Work with character based data.
Examples: LOWER, INITCAP, UPPER, SUBSTR, LENGTH, LTRIM, RTRIM
Date
Functions
Work with Date data types.
Example: ADD_MONTHS, LAST_DAY, MONTHS_BETWEEN, NEXT_DAY
Conversion
Functions
These functions are used to convert one type of data to another.
Example: TO_NUMBER, TO_CHAR, TO_DATE
Consider the EXAMINATION table:
RegNo Name CC Phy Che Mat Cs Total City
101 Ajay C1 98 100 97 99 394 Hassan
102 Banu C2 38 50 37 49 174 Belur
103 Chandan C2 100 100 97 99 396 Mysuru
104 John C3 78 80 67 79 304 Alur
105 Kaleem C1 88 80 91 79 338 Hassan
106 Raheem C2 100 98 97 79 374 Hassan
107 Sanjay C3 47 60 56 78 241 Alur
108 Tarun C3 33 34 77 28 172 Arasikere
109 Uday C2 100 98 97 79 374 Hassan
110 Venki C3 47 60 56 78 241 Belur
COUNT ( ) Function:
• This function is used to count the number of values in a column.
• COUNT (*) is used to count the number of rows in the table including duplicates and those with
NULL values.
• Example 1:
• SELECT COUNT (*) FROM EXAMINATION;
• The above query returns 10.
• Example 2:
• SELECT COUNT (RegNo) FROM EXAMINATION WHERE CC = „C3‟ ;
• The above query returns 4.
16. Chapter 14- SQL Commands
16 | P a g e Prof. K. Adisesha
AVG ( ) Function:
• This function is used to find the average of the values in a numeric column.
• Example 1:
• SELECT AVG (Cs) FROM EXAMINATION;
• The above query returns 74.7
SUM ( ) Function:
• This function is used to find the sum of the values in a numeric column.
• Example:
• SELECT SUM (Phy) FROM EXAMINATION;
• The above query returns 729 MAX ( ) Function:
• This function is used to find the maximum values in a column.
• Example:
• SELECT MAX (Phy) FROM EXAMINATION;
• The above query returns 100
MIN ( ) Function:
• This function is used to find the minimum values in a column.
• Example:
• SELECT MIN (Phy) FROM EXAMINATION;
• The above query returns 33
GROUP BY (Grouping Result)
• The SQL GROUP BY clause is used in collaboration with the SELECT statement to arrange
identical data into groups.
• The GROUP BY clause follows the WHERE clause in a SELECT statement and precedes the
ORDER BY clause.
• Syntax: The basic syntax of GROUP BY clause is given below.
SELECT column1, column2
FROM Table_name
WHERE [ conditions ]
GROUP BY column1, column2
ORDER BY column1, column2
• Example 1: To find the number of students in each college.
SELECT CC, COUNT (CC)
FROM EXAMINATION
GROUP BY CC;
• Example 2: To find the number of students, sum, average, maximum, minimum marks in computer
science from each city.
SELECT City, COUNT (City), SUM (Cs), AVG (Cs), MAX (Cs), MIN (Cs)
FROM EXAMINATION GROUP
BY City;
17. Chapter 14- SQL Commands
17 | P a g e Prof. K. Adisesha
SQL CONSTRAINTS:
• Constraints are the rules enforced on data columns on table.
• These are limiting the type of data that can go into a table.
• This ensures the accuracy and reliability of the data into the database.
• SQL allows two types of constraints.
o Column level constraints: These constraints are defined along with the column definition
when creating or altering a table structure. These constraints apply only to individual
columns.
o Table level constraints: These constraints are defined after all the table columns when
creating or altering a table structure. These constraints apply to groups of one or more
columns.
• Following are the commonly used constraints available in SQL.
Constraints Description
NOT NULL Ensures that a column cannot have NULL value
UNIQUE Ensures that all values in column are different
PRIMARY KEY Uniquely identified eac row in a database table.
FOREIGN KEY Uniquely identified each rown in any other database table
DEFAULT Provides a default value for a column when none is specified
CHECK Ensures that all values in a column satisfy certain condition.
NOT NULL Constraint:
• By default column can hold NULL values.
• When a column is defined as NOT NULL then the column becomes a mandatory column.
• It implies that a value must be entered into the column if the row is to be inserted for storage in the
table.
• Example: Consider the following CREATE TABLE command creates a new table called
PRODUCT and add six columns, two which PID and Description specify not to accept NULLs.
CREATE TABLE PRODUCT
(
PID CHAR (4) NOT NULL,
Description VARCHAR2 (25), NOT NULL
CompanyId CHAR (10),
DOM DATE,
Type CHAR (10),
Price NUMBER (10,2)
);
UNIQUE Constraints:
• This constraint ensures that no rows have the same value in the specified column(s). A table must
have many unique keys.
• Example: UNIQUE constraint applied on PID of PRODUCT table ensures that no rows have the
same PID value, as shown below
18. Chapter 14- SQL Commands
18 | P a g e Prof. K. Adisesha
CREATE TABLE PRODUCT
(
PID CHAR (4) NOT NULL UNIQUE,
Description VARCHAR2 (25), NOT NULL
CompanyId CHAR (10),
DOM DATE,
Type CHAR (10),
Price NUMBER (10,2)
);
PRIMARY KEY Constraints:
• A primary key is a field which uniquely identifies each row in a database table. A primary key in a
table has special attributes:
• By default this column is NOT NULL. It defines the column as a mandatory column i.e. the
column cannot be left blank.
• The data held in this column must be unique.
• Example:
CREATE TABLE PRODUCT
(
PID CHAR (4) PRIMARY KEY,
Description VARCHAR2 (25), NOT NULL
CompanyId CHAR (10),
DOM DATE,
Type CHAR (10),
Price NUMBER (10,2)
);
FOREIGN KEY Constraint:
• A FOREIGN KEY is used to link two tables together.
• A foreign key is a column whose values are derived from the PRIMARY KEY of some other table.
• Example:
CREATE TABLE PRODUCT
(
PID CHAR (4) PRIMARY KEY,
Description VARCHAR2 (25), NOT NULL
CompanyId CHAR (10) REFERENCES COMPANY (CID)
DOM DATE,
Type CHAR (10),
Price NUMBER (10,2)
);
CREATE TABLE COMPANY
(
CID CHAR (10) PRIMARY KEY,
CProfile VARCHAR2 (200),
Noofproducts NUMBER (20),
DOE DATE
);
19. Chapter 14- SQL Commands
19 | P a g e Prof. K. Adisesha
DEFAULT Constraints:
• A default value can be specified for a column using the DEFAULT clause.
• The DEFAULT constraint provides a default value to a column when the INSERT INTO
command does not provide a specific value.
• Example:
CREATE TABLE PRODUCT
(
PID CHAR (4) PRIMARY KEY,
Description VARCHAR2 (25), NOT NULL
CompanyId CHAR (10),
DOM DATE,
Type CHAR (10),
Price NUMBER (10, 2) DEFALUT 1000.00
);
CHECK Constraints:
• The CHECK Constraint is used to establish a TRUE/FALSE condition that is applied to the data
placed in a column.
• If a value does not meet the condition, it cannot be placed in the column.
• Example:
CREATE TABLE PRODUCT
(
PID CHAR (4) CHECK (PID LIKE ‘P%’),
Description VARCHAR2 (25),
CompanyId CHAR (10),
DOM DATE,
Type CHAR (10),
);
Price NUMBER (10, 2) CHECK (Price>0)
TABLE Constraints:
• When a constraint is applied to a group of columns of the table, it is called a table constraint.
• Column constraint is defined along with the end of the column.
• Table constraints are defined at the end of the table.
• Example:
CREATE TABLE PRODUCT
(
PID CHAR (4) NOT NULL,
Description VARCHAR2 (25) NOT NULL,
CompanyId CHAR (10),
DOM DATE,
Type CHAR (10),
Price NUMBER (10, 2),
PRIMARY KEY (PID, Description)
);
20. Chapter 14- SQL Commands
20 | P a g e Prof. K. Adisesha
Joins
• The SQL Joins clause are used to fetch/retrieve data from two or more tables based on the join
condition which is specified in the WHERE condition.
• Basically data tables are related to each other with keys. We can used these keys relationship in
SQL joins.
SQL Join Types:
There are different types of joins available in SQL:
o INNER JOIN: returns rows when there is a match in both tables.
o LEFT JOIN: returns all rows from the left table, even if there are no matches in the right
table.
o RIGHT JOIN: returns all rows from the right table, even if there are no matches in the left
table.
o FULL JOIN: returns rows when there is a match in one of the tables.
o SELF JOIN: is used to join a table to itself as if the table were two tables, temporarily
renaming at least one table in the SQL statement.
o CARTESIAN JOIN: returns the Cartesian product of the sets of records from the two or more
joined tables.
Creating VIEWs:
• Database Views are created using the CREATE VIEW statement.
• Views can be created from a single table, multiple tables or another view.
• To create a view, a user must have the appropriate system privilege according to the specific
implementation.
• Syntax: The basic CREATE VIEW syntax is as follows:
SQL> CREATE
VIEW
view_name AS
SELECT column1, column2…..
FROM table_name
WHERE [ condition ];
Privileges and Roles:
• Privileges: Privileges defines the access rights provided to a user on a database object.
• There are two types of privileges:
o System Privileges: This allows the user to CREATE, ALTER, or DROP database objects.
o Object privileges: This allows the user to EXECUTE, SELECT, INSERT, UPDATE or
DELETE data from database objects to which privileges apply.
21. Chapter 14- SQL Commands
21 | P a g e Prof. K. Adisesha
CHAPTER 14 – STRUCTURED QUERY LANGUAGE BLUE PRINT
VSA (1 marks) SA (2 marks) LA (3 Marks) Essay (5 Marks) Total
- 01 Question - 01 Question 02 Question
- Question no 17 - Question no 36 06 Marks
Important Questions Two
Marks Questions:
1. Give the syntax and example for DELETE command in SQL. [March 2015]
2. List the data types supported in SQL. [June 2015]
3. Write the syntax for DELETE and INSERT commands in SQL. [March 2016]
4. Mention the logical operators used in SQL. [June 2016]
5. Give the syntax and example of UPDATE command in SQL. [March 2017]
6. What is the difference between ORDER BY and GROUP BY clause used in SQL? Give example
for each. [June 2017]
7. List the relational operators supported by SQL.
8. Why the DROP command used? Write its syntax.
9. What are the difference between DROP and DELETE command?
10. Give the syntax and example for CREATE VIEW command in SQL.
11. Classify the built-in functions in SQL.
Five Marks Question:
1. Explain various group functions in SQL. [March 2015, March 2017, June 2017]
2. What is data definition language? Explain SELECT and UPDATE command. [June 2015]
3. Describe any five logical operators available in SQL. [March 2016]
4. What is SQL? Explain the different SQL commands.
5. What is the purpose of CREATE command? Write the syntax and example of CREATE command.
6. Explain SELECT statement with syntax and with minimum 3 examples.
7. Explain 5 variations of SELECT command.
8. What are SQL constraints? Explain any two constraints.
****************