What is RDBMS?
RDBMS stands for Relational Database Management System. RDBMS is the basis for SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.
A Relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by E. F. Codd.
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.
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.
Data Definition Language (DDL), Data Definition Language (DDL), Data Manipulation Language (DML) , Transaction Control Language (TCL) , Data Control Language (DCL) - , SQL Constraints
This Presentation is about NoSQL which means Not Only SQL. This presentation covers the aspects of using NoSQL for Big Data and the differences from RDBMS.
PL/SQL is a combination of SQL along with the procedural features of programming languages.
It provides specific syntax for this purpose and supports exactly the same datatypes as SQL.
Data modeling is a process used to define and analyze data requirements needed to support the business processes within the scope of corresponding information systems in organizations.
Data Definition Language (DDL), Data Definition Language (DDL), Data Manipulation Language (DML) , Transaction Control Language (TCL) , Data Control Language (DCL) - , SQL Constraints
This Presentation is about NoSQL which means Not Only SQL. This presentation covers the aspects of using NoSQL for Big Data and the differences from RDBMS.
PL/SQL is a combination of SQL along with the procedural features of programming languages.
It provides specific syntax for this purpose and supports exactly the same datatypes as SQL.
Data modeling is a process used to define and analyze data requirements needed to support the business processes within the scope of corresponding information systems in organizations.
In this presentation, you will see simple ways of quickly deploying MySQL and start exploring the potential of SQL databases.
You will see how to deploy locally, using docker and some potential of the SQL language to extract not only data, but useful information from the database.
This presentation is recommended for begineers.
Microsoft released SQL Azure more than two years ago - that's enough time for testing (I hope!). So, are you ready to move your data to the Cloud? If you’re considering a business (i.e. a production environment) in the Cloud, you need to think about methods for backing up your data, a backup plan for your data and, eventually, restoring with Red Gate Cloud Services (and not only). In this session, you’ll see the differences, functionality, restrictions, and opportunities in SQL Azure and On-Premise SQL Server 2008/2008 R2/2012. We’ll consider topics such as how to be prepared for backup and restore, and which parts of a cloud environment are most important: keys, triggers, indexes, prices, security, service level agreements, etc.
Webstack Academy - Course Demo Webinar and Placement JourneyWebStackAcademy
At WebStack Academy, we understand the importance of providing valuable insights to aspiring professionals like yourself. That's why we host monthly webinars tailored to address the needs of ambitious individuals. Led by our esteemed experts - Mr. Jayakumar (Director, WebStack Academy) and Mr. Mubeen (Technology Head, WebStack Academy), the presentation will offer a firsthand understanding of industry trends, career pathways, and how our Full Stack course can be the catalyst to realizing your career aspirations.
WSA: Scaling Web Service to Handle Millions of Requests per SecondWebStackAcademy
In this presentation of Venkata Ramana Gollamudi, Principal Architect at Flipkart, as our esteemed speaker. With his expertise and experience, he'll guide us through the intricate process of “Scaling web service to handle millions of requests per second”.
Key Takeaways:
Understanding the specific challenges of scaling for Indian users
Strategies to ensure service availability, reduce latency, and maintain reliability
Leveraging tools like ELBs, K8s, message queues, and NoSQL databases effectively
Don't miss this unparalleled opportunity to gain invaluable insights and elevate your expertise in scaling web services to new heights.
We eagerly await your participation in this transformative webinar. Let's embark on the journey to mastering scalability together!
WSA: Course Demo Webinar - Full Stack Developer CourseWebStackAcademy
At WebStack Academy, we understand the importance of providing valuable insights to aspiring professionals like yourself. We host monthly webinars tailored to address the needs of ambitious individuals. Led by our esteemed experts - Mr. Jayakumar (Director, WebStack Academy) and Mr. Mubeen (Technology Head, WebStack Academy), these webinars presentation deck offer a firsthand understanding of industry trends, career pathways, and how our Full Stack course can be the catalyst to realizing your career aspirations.
Career Building in AI - Technologies, Trends and OpportunitiesWebStackAcademy
We from WSA always believe in sharing the right information and enabling you to make decisions for your long term career.
In this regard, Masterclass Webinar on "Career Building in AI - Technologies, Trends and Opportunities” by Renganathan Sekar - Product Manager, Artificial Intelligence - Samsung Research Institute.
Key takeaways from this slide deck:
*Gain a comprehensive overview of AI and its wide range of applications.
*Explore real-world use cases that exemplify the incredible potential of AI.
*Delve into the core technologies driving AI innovation.
*Stay ahead of recent trends in AI, including the intriguing concept of Gen AI.
*Uncover a wealth of opportunities in the AI landscape.
*Learn effective strategies to up skill and advance your career in the AI industry.
WSA Free online Internship for Web Development is an Online real-time experience for Engineering students. It will take you through a journey of skill building and project building experience. You will understand the various product development phases and skills required to work on any Web Application product in Industry.
A guide designed to help you master the art of web development. The roadmap provides a comprehensive step-by-step guide to learn foundational web technologies like HTML, CSS, & JavaScript, advanced frameworks, and concepts required for modern web development. It aims to equip aspiring developers with the necessary resources and tools to excel in the ever-evolving world of web development. 💡
Angular - Chapter 9 - Authentication and AuthorizationWebStackAcademy
Authentication is the process of validating a user on the credentials (username and password)
and provide access to the web application(ex: Email)
Authorization helps you to control access rights by granting or denying specific permissions
to an authenticated user (Ex: User / Manager / Admin).
Http Service will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. Let us consider an example to understand how to make use of the http service.
AngularFire is the officially supported AngularJS binding for Firebase. ... The focus of this library is to abstract much of the boilerplate involved in creating Angular bindings from Firebase to Angular, and to make it easy to create services that sync to your database.
A directive is a custom HTML element that is used to extend the power of HTML. Angular 2 has the following directives that get called as part of the BrowserModule module.
ngif
ngFor
If you view the app.module.ts file, you will see the following code and the BrowserModule module defined. By defining this module, you will have access to the 2 directives.
Angular - Chapter 4 - Data and Event HandlingWebStackAcademy
In Angular , events such as button click or any other sort of events can also be handled very easily. The events get triggered from the html page and are sent across to Angular JS class for further processing.
Data binding is a core concept in Angular and allows to define communication between a component and the DOM, making it very easy to define interactive applications without worrying about pushing and pulling data. There are four forms of data binding and they differ in the way the data is flowing.
Components are the most basic UI building block of an Angular app. An Angular app contains a tree of Angular components.
Angular components are a subset of directives, always associated with a template. Unlike other directives, only one component can be instantiated per an element in a template.
A component must belong to an NgModule in order for it to be available to another component or application. To make it a member of an NgModule, list it in the declarations field of the NgModule metadata.
TypeScript lets you write JavaScript the way you really want to. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. TypeScript is pure object oriented with classes, interfaces and statically typed like C# or Java. The popular JavaScript framework Angular 2.0 is written in TypeScript. Mastering TypeScript can help programmers to write object-oriented programs and have them compiled to JavaScript, both on server side and client side.
AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. AngularJS's data binding and dependency injection eliminate much of the code you would otherwise have to write. And it all happens within the browser, making it an ideal partner with any server technology.
JavaScript String:
The String object lets you work with a series of characters; it wraps Javascript's string primitive data type with a number of helper methods.
As JavaScript automatically converts between string primitives and String objects, you can call any of the helper methods of the String object on a string primitive.
JavaScript Arrays:
The Array object lets you store multiple values in a single variable. It stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
Debugging in JavaScript
It is common to have errors while writing codes and the errors can be due to syntax or logical. These errors create a lot of ambiguity in the logic and understanding of both users and programmers. There can also be errors in the code which can remain invisible to the programmer’s eye and can create havoc. To identify these errors we need Debuggers that can go through the entire code or program, identify the errors and also fix them.
-Debugger
The debugger keyword is used in the code to force stop the execution of the code at a breaking point and calls the debugging function. The debugger function is executed if any debugging is needed at all else no action is performed.
Form validation normally used to occur at the server, after the client had entered all the necessary data and then pressed the Submit button. If the data entered by a client was incorrect or was simply missing, the server would have to send all the data back to the client and request that the form be resubmitted with correct information. This was really a lengthy process which used to put a lot of burden on the server.
JavaScript provides a way to validate form's data on the client's computer before sending it to the web server. Form validation generally performs two functions.
Basic Validation − First of all, the form must be checked to make sure all the mandatory fields are filled in. It would require just a loop through each field in the form and check for data.
Data Format Validation − Secondly, the data that is entered must be checked for correct form and value. Your code must include appropriate logic to test correctness of data.
The Browser Object Model (BOM) in JavaScript includes the properties and methods for JavaScript to interact with the web browser.
BOM provides you with window object, for example, to show the width and height of the window. It also includes the window.screen object to show the width and height of the screen.
What is the DOM?
The DOM is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The W3C DOM standard is separated into 3 different parts:
Core DOM - standard model for all document types
XML DOM - standard model for XML documents
HTML DOM - standard model for HTML documents
The HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
The HTML DOM model is constructed as a tree of Objects.
With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
4. www.webstackacademy.com
Definition
● RDBMS stands for Relational Database Management System. RDBMS
is the basis for SQL, and for all modern database systems like MS SQL
Server, IBM DB2, Oracle, MySQL, and Microsoft Access.
● A Relational database management system (RDBMS) is a database
management system (DBMS) that is based on the relational model as
introduced by E. F. Codd.
● The data in RDBMS is stored in database objects called tables.
6. www.webstackacademy.com
DBMS & RDBMS
● DBMS applications store
data as file.
● DBMS does not support
client/server architecture.
● DBMS does not allow
normalization.
● DBMS does not impose
integrity constraints.
● RDBMS applications store
data in a tabular form.
● RDBMS supports
client/server architecture.
● RDBMS allows
normalization.
● RDBMS imposes integrity
constraints.
8. www.webstackacademy.com
Creating Table
● The data in RDBMS is stored in database objects called
tables. The table is a collection of related data entries and
it consists of columns and rows.
● Remember, a table is the most common and simplest form
of data storage in a relational database.
9. www.webstackacademy.com
Field, Record or
Row
● Every table is broken up into smaller entities called fields.
The fields in the CUSTOMERS table consist of ID, NAME,
AGE, ADDRESS and SALARY.
● A record, also called a row of data, is each individual entry
that exists in a table. For example there are 7 records in
the above CUSTOMERS table.
11. www.webstackacademy.com
Null Value
● A NULL value in a table is a value in a field that
appears to be blank, which means a field with a
NULL value is a field with no value.
13. www.webstackacademy.com
SQL
● SQL is a standard language for accessing
databases.
● SQL stands for Structured Query Language
● SQL lets you access and manipulate databases
● SQL is an ANSI (American National Standards
Institute) standard
14. www.webstackacademy.com
Benefit of SQL
● SQL can execute queries against a database
● SQL can retrieve data from a database
● SQL can insert records in a database
● SQL can update records in a database
● SQL can delete records from a database
15. www.webstackacademy.com
Using SQL in your
Project
To build an application that shows data from a
database, you will need:
● An RDBMS database program (i.e. MS Access, SQL Server,
MySQL)
● To use a server-side scripting language, like Java, PHP or ASP
● To use SQL to get the data you want
● To use HTML / CSS
16. www.webstackacademy.com
SQL Data Types
● Number Data types :-
- INTEGER :- The Integer data type is used to
specify an integer value.
- SMALLINT :- The SMALLINT data type is used to
specify small integer value.
- NUMERIC(P,S) :-It specifies a numeric value. Here
'p' is precision value and 's' is a scale value.
17. www.webstackacademy.com
SQL Data Types
● Float Types :
- FLOAT(P) - It specifies floating-point value. Here
'p' is precision value.
- DOUBLE PRECISION - It specifies double
precision floating point number.
- REAL - The real integer is used to specify a
single precision floating point number.
- DECIMAL(P,S) - It specifies a decimal value. Here
'p' is precision value and 's' is scale value.
18. www.webstackacademy.com
SQL Data Types
● String Types :-
- CHAR(X) - Here 'x' is the character's number to
store. Here char should be used for storing fix
length strings.
- VARCHAR2(X) - Here 'x' is the character's
number to store. varchar is used to store variable
length strings. The String value's length will be
stored on disk with the value itself.
19. www.webstackacademy.com
SQL Data Types
● Date & Time Type
- DATE :- It stores year , month and days values.
- TIME : -It stores hour,minute and second values.
- TIMESTAMP :- The timestamp data type is used
to year , month ,day ,hour ,minute and second
values.
21. www.webstackacademy.com
MySQL Datatypes
● Text Types:
– CHAR(size):(can contain letters, numbers, and special
characters).Can store up to 255 characters
– VARCHAR(size):can contain letters, numbers, and special
characters).Can store up to 255 characters.
– TEXT: Holds a string with a maximum length of 65,535 characters
– BLOB: For BLOBs (Binary Large OBjects). Holds up to 65,535
bytes of data
23. www.webstackacademy.com
MySQL Data Types
● Date types:
– DATE(): A date. Format: YYYY-MM-DD
– DATETIME(): A date and time combination. Format: YYYY-MM-DD
HH:MM:SS
– TIME(): A time. Format: HH:MM:SS
– YEAR(): A year in two-digit or four-digit format.
24. www.webstackacademy.com
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
29. www.webstackacademy.com
SQL Syntax
● Operators in the where clause:
=, >,<,>=,<=, BETWEEN, LIKE, IN
●
SQL AND Operators
– SELECT * FROM Customers
WHERE Country='Germany'
AND City='Berlin';
● OR Operator Example
– SELECT * FROM Customers
– WHERE City='Berlin'
– OR City='Munchen';
31. www.webstackacademy.com
ORDER BY Keyword
● The ORDER BY keyword is used to sort the result-set by one or more
columns.
● The ORDER BY keyword sorts the records in ascending order by
default. To sort the records in a descending order, you can use the
DESC keyword.
32. www.webstackacademy.com
ORDER BY Keyword
– SELECT column_name,column_name
FROM table_name
ORDER BY column_name,column_name ASC|DESC;
– SELECT * FROM Customers ORDER BY Country;
– SELECT * FROM Customers ORDER BY Country DESC;
– SELECT * FROM Customers ORDER BY
Country,CustomerName;
33. www.webstackacademy.com
INSERT INTO
Statement
● INSERT INTO table_name
VALUES (value1,value2,value3,...);
● INSERT INTO table_name (column1,column2,column3,...)
VALUES (value1,value2,value3,...);
● INSERT INTO Customers (CustomerName, ContactName, Address,
City, PostalCode, Country)
VALUES ('Cardinal','Tom B. Erichsen','Skagen
21','Stavanger','4006','Norway');
34. www.webstackacademy.com
Update Statement
The UPDATE statement is used to update existing records in a table.
● UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;
● UPDATE Customers SET ContactName='Alfred Schmidt',
City='Hamburg' WHERE CustomerName='Alfreds Futterkiste';
35. www.webstackacademy.com
DELETE Statement
● The DELETE statement is used to delete records in a table.
● DELETE FROM table_name WHERE
some_column=some_value;
● DELETE FROM Customers WHERE CustomerName='Alfreds
Futterkiste' AND ContactName='Maria Anders';
37. www.webstackacademy.com
SQL Injection
An SQL Injection can destroy the database. SQL injection is a
technique where malicious users can inject SQL commands into
an SQL statement ,via web page input.
Injected SQL commands can alter SQL statements and
compromise the security of a web application.
38. www.webstackacademy.com
SQL Web Page
When SQL is used to display data on a web page,it is common
to let web user input their own search value.
Since SQL statements are text only,it is easy,with a little piece
of computer code, to dynamically change SQL statements to
provide the user with selected data.
39. www.webstackacademy.com
SQL WEB Page
txtUserId =getRequestString(“UserId”);
txtSQL =”SELECT * FROM Users Where
UserId=”+txtUserId
● The example creates a select statement by adding a
variable (txtUserId) to a select string. The variable is
fetched from the user input (Request) to the page.
41. www.webstackacademy.com
SELECT TOP
● SELECT TOP clause is used to specify the number of records
to return.
● SELECT TOP clause can be very useful on large tables with
thousands of records. Returning a large number of records can
impact on performance.
46. www.webstackacademy.com
BETWEEN
Operator
● SELECT column_name(s) FROM table_name WHERE column_name
BETWEEN value1 AND value2;
SELECT * FROM Products WHERE Price BETWEEN 10 AND 20;
● NOT BETWEEN
SELECT * FROM Products WHERE Price NOT BETWEEN 10 AND
20;
● BETWEEN Operator with IN
SELECT * FROM Products WHERE (Price BETWEEN 10 AND 20)
AND NOT CategoryID IN (1,2,3);
47. www.webstackacademy.com
BETWEEN
Operator
● BETWEEN Operator with Text Value
– SELECT * FROM Products WHERE ProductName BETWEEN 'C'
AND 'M';
● NOT BETWEEN Operator with Text Value
– SELECT * FROM Products WHERE ProductName NOT
BETWEEN 'C' AND 'M';
● BETWEEN Operator with Date Value
– SELECT * FROM Orders WHERE OrderDate BETWEEN
#07/04/1996# AND #07/09/1996#;
49. www.webstackacademy.com
LIKE
Operator
● Select all Customers starting with a City starting with the letter “m”
SELECT * FROM Customers WHERE City LIKE 'm%';
● Select all Customers with a City ending with the letter “m”
SELECT * FROM Customers WHERE City LIKE '%m';
● Select all customers with a City not containing the pattern
“nadu”
SELECT * FROM Customers WHERE City NOT LIKE '%nadu%';
50. www.webstackacademy.com
Wildcards
A wildcard character can be used to substitute for any other
character(s) in a string.
Two types of Wildcard characters :
● Percent sign(%) : Matches one or more Characters
● Underscore (_) : Matches one Character
51. www.webstackacademy.com
Wildcards
● Find any value start with 50
SELECT * FROM Product where price LIKE '50%';
● Find any value that have 50 in any position.
SELECT * FROM Product where price LIKE '%50%';
● Find any value that have 00 in the second and third positions
SELECT *FROM Product where price LIKE '_00%';
● Finds any values in a five-digit number that start with 2 and end with
3
SELECT * FROM Product where price LIKE '2___3';
52. www.webstackacademy.com
IN Operator
In operator allows to specify multiple values in a Where clause.
● IN Operator Syntax :
SELECT column_name(s) FROM table_name WHERE column_name
IN (value1,value2,....);
53. www.webstackacademy.com
IN Operator
● Select all Customer with a City of “Manchester” and “London”
SELECT * FROM Customers WHERE City IN
('Manchester','London');
● Select all Customers Except City of “Manchester” and “London”
SELECT * FROM Customers WHERE City NOT IN
('Manchester','London');
56. www.webstackacademy.com
Aggregate Functions
● SUM() - Returns the sum
● AVG() - Returns the average value
● COUNT() - Returns the number of rows
● MAX() - Returns the Largest value
● MIN() - Returns the Smallest value
● FIRST() - Returns the first value
● LAST() - Returns the last value
58. www.webstackacademy.com
Group By
● The GROUP BY clause is a SQL command that is
used to group rows that have the same values.
● It is used in conjunction with aggregate functions to
produce summary reports from the database.
● GROUP BY clause are called grouped queries and
only return a single row for every grouped item.
59. www.webstackacademy.com
Group By
● Syntax :
SELECT column_name , aggregate_function(column_name
) FROM table_name WHERE column_name operator value
GROUP BY column_name;
● Example :
SELECT Department ,SUM(Salary) AS “Total Salary “ FROM
Employee
GROUP BY Department ;
61. www.webstackacademy.com
SQL Scalar Functions
● UCASE() - Converts a field to upper case.
● LCASE() - Converts a field to lower case.
● LEN() - Returns the length of a text field.
● MID() - Extract characters from a text field.
● ROUND() - Rounds a numeric field to the number of decimal
specified.
● NOW() - Returns the current date and time.
● FORMAT() - Formats how a field is to be displayed.
62. www.webstackacademy.com
UCASE()
The UCASE() function converts the value of a field to
uppercase.
● Syntax
SELECT UCASE(column_name) FROM
table_name;
● Syntax for SQL Server
SELECT UPPER(column_name) FROM
table_name;
63. www.webstackacademy.com
LEN()
The LEN() function returns the length of the value in a
text field.
● Syntax
SELECT LEN(column_name) FROM table_name;
● Syntax for Oracle
SELECT LENGTH(column_name) FROM
table_name;
64. www.webstackacademy.com
MID()
The MID() function is used to extract characters from a text
field.
● Syntax
SELECT MID(column_name,start,length) AS
some_name FROM table_name;
● column_name - The field to extract characters
● Start - Specifies the starting position
● Length - The number of characters to return.
65. www.webstackacademy.com
ROUND()
The ROUND() function is used to round a numeric field to the number
of decimal specified.
● Syntax :
SELECT ROUND(column_name ,decimals) FROM table_name;
● column_name - The field to round.
● Decimals - Specifies the number of decimals to be
returned.
66. www.webstackacademy.com
NOW()
The Now() function returns the current date and time.
● Syntax :
SELECT NOW() FROM table_name;
● Example :
SELECT Product_Name ,Price ,NOW() AS “ Per Date” from
Products;
67. www.webstackacademy.com
FORMAT()
The FORMAT() function is used to format how a field is to be
displayed.
● Syntax :
SELECT FORMAT(column_name,format) FROM table_name;
● Example :
SELECT Product_Name ,Price, FORMAT(NOW(),'YYYY-MM-DD')
AS 'Per Date' FROM Products;
70. www.webstackacademy.com
Column Alias
● Syntax :
SELECT column_name(s) FROM table_name AS
alias_name;
● Example
SELECT ID AS CUSTOMER_ID , NAME AS
CUSTOMER_NAME FROM CUSTOMERS WHERE
SALARY IS NOT NULL;
73. www.webstackacademy.com
SQL Joins
● The different SQL JOINs you can use:
– INNER JOIN: Returns all rows when there is at least one match in
BOTH tables
– LEFT JOIN: Return all rows from the left table, and the matched
rows from the right table. The result is null in the right side if there
is no match.
– RIGHT JOIN: Return all rows from the right table, and the
matched rows from the left table. The result is null in the right side
if there is no match.
– FULL JOIN: Return all rows from the left table and right table. It
combines the result of both LEFT and RIGHT join.
74. www.webstackacademy.com
SQL Joins
● The most common type of join is: SQL INNER JOIN (simple
join). An SQL INNER JOIN return all rows from multiple tables
where the join condition is met.
76. www.webstackacademy.com
SQL Joins
Have a look at a selection from the "Customers" table:
● CustomerID CustomerName ContactName Country
1 Alfreds Futterkiste Maria Anders Germany
2 Ana Trujillo Trujillo Mexico
3 Antonio Moreno Moreno Mexico
● Notice that the "CustomerID" column in the "Orders" table refers to the
customer in the "Customers" table. The relationship between the two tables
above is the "CustomerID" column.
77. www.webstackacademy.com
SQL Joins
Example:
● SELECT Orders.OrderID, Customers.CustomerName,
Orders.OrderDate
FROM Orders
INNER JOIN Customers
ON Orders.CustomerID=Customers.CustomerID;
● It will produce the following:
OrderID CustomerName OrderDate
10308 Ana Trujillo 9/18/1996
81. www.webstackacademy.com
Union Operator
The SQL Union operator combines the result of two or more select
statement. Union Operator Select only distinct values by default . To
allow duplicate values use ALL keyword with UNION .
Syntax :
SELECT Column_name(s) FROM table1
UNION
SELECT Column_name(s) FROM table2;
82. www.webstackacademy.com
Select Into
The SELECT INTO statement copies data from
one table and insert it into a new Table.
Syntax :
● SELECT * INTO new table [ IN External db ]
FROM table1
OR
● SELECT column_name (s) INTO new table [IN
external db]
FROM table1;
83. www.webstackacademy.com
Insert into Select
The INSERT INTO SELECT statement copies data from one table and
insert it into existing table.
Syntax
● Copy data from one table to another existing table.
INSERT INTO table2
SELECT * FROM table1;
● Copy only columns into another existing table
INSERT INTO table2
( column_name (s))
SELECT column_name(s) FROM table1;
84. www.webstackacademy.com
SQL Constraints
● SQL constraints are used to specify rules for the data in a table.
● Constraints can be specified when the table is created (inside the
CREATE TABLE statement) or after the table is created (inside the
ALTER TABLE statement).
86. www.webstackacademy.com
NOT NULL Constraint
NOT NULL Constraint enforces a column to not accept a null values.
● Example
CREATE TABLE Student
(Stud_ID int (10) NOT NULL,
Name varchar (20) NOT NULL,
Address varchar(20)
Course varchar (20));
87. www.webstackacademy.com
Unique Constraint
The UNIQUE Constraint uniquely identifies each record in a database
table.
Example
CREATE TABLE Student
(Stud_id int NOT NULL UNIQUE,
Name varchar (255) NOT NULL,
Address varchar (255),
City varchar (255) );
88. www.webstackacademy.com
PRIMARY KEY Constraint
● PRIMARY KEY Constraint uniquely identifies each record in a
database table.
● PRIMARY KEY must contain UNIQUE values.
● PRIMARY KEY column cannot contain NULL values.
● Each table can have only one PRIMARY KEY.
92. www.webstackacademy.com
Foreign Key Constraint
● A Foreign Key in one table points to a PRIMARY KEY in another
table.
● A Foreign key is a field or a column that is used to establish a link
between two tables.
● The Foreign Key constraint also prevents invalid data from being
inserted into foreign key column ,because it has to be one of the
values contained in the table it points to.
93. www.webstackacademy.com
Foreign Key Constraint
● CREATE TABLE Student_Detail
(Stud_Id int PRIMARY KEY,
Name varchar (20) NOT NULL,
Address varchar (20) ,
City varchar(35));
● CREATE TABLE Marks_Detail
(Stud_Id int PRIMARY KEY,
Name varchar (20) NOT NULL,
Address varchar (20) ,
City varchar(35)
FOREIGN KEY (Stud_Id) REFERENCES STUDENT_DETAILS(Stud_Id)
);
94. www.webstackacademy.com
Check Constraint
● The CHECK constraint is used to limit the value range that can be
placed in a column.
CREATE TABLE Student
( Stud_Id int PRIMARY KEY,
Name varchar(20) NOT NULL,
Address varchar(20) NOT NULL,
City varchar(20) NOT NULL CHECK (City ='Banglore'));
95. www.webstackacademy.com
Default Constraint
Default constraint is used to insert a default value into a column.
Default value will be added to all new records ,if no other value is
specified.
CREATE TABLE Student
( Stud_Id int PRIMARY KEY,
Name varchar(20) NOT NULL,
Address varchar(20) NOT NULL,
City varchar(20) DEFAULT 'Banglore');
96. www.webstackacademy.com
Indexes
● Indexes allows the database application to find data
fast , without reading the whole table.
● An Index can be created in a table to find data more
quickly and efficiently
● The users cannot see the indexes, they are just used
to speed up searches/queries.
97. www.webstackacademy.com
Indexes
● Create Index Syntax
CREATE INDEX index_name
ON table_name (column_name)
● Create Unique Index
CREATE UNIQUE INDEX index_name
ON table_name (column_name)
98. www.webstackacademy.com
Index Example
● Creating Index on a single column
CREATE INDEX ID1 ON Student(Name);
● Creating Index on a multiple Column
CREATE INDEX ID2
ON Student (FirstName , LastName);
99. www.webstackacademy.com
SQL Drop
● DROP TABLE
– The DROP TABLE statement is used to delete a table.
– DROP TABLE table_name
● DROP DATABASE
– The DROP DATABASE statement is used to delete a database.
– DROP DATABASE database_name
● ALTER TABLE
– The ALTER TABLE statement is used to add, delete, or modify
columns in an existing table.
– ALTER TABLE table_name ADD column_name datatype
101. www.webstackacademy.com
SQL AUTO
INCREMENT
● Very often we would like the value of the primary key field to be
created automatically every time a new record is inserted.
● We would like to create an auto-increment field in a table.
● CREATE TABLE Persons(ID int NOT NULL
AUTO_INCREMENT,LastName varchar(255) NOT
NULL,FirstName varchar(255),Address varchar(255),
City varchar(255),PRIMARY KEY (ID))
102. www.webstackacademy.com
SQL AUTO
INCREMENT
● By default, the starting value for AUTO_INCREMENT is 1,and it will
increment by 1 for each new record.
● To let the AUTO_INCREMENT sequence start with another value, use
the following SQL statement:
– ALTER TABLE Persons AUTO_INCREMENT=100
● To insert a new record into the "Persons" table, we will NOT have to
specify a value for the "ID" column (a unique value will be added
automatically):
– INSERT INTO Persons (FirstName,LastName) VALUES
('Lars','Monsen')
103. www.webstackacademy.com
Views
● View is a virtual table based on the result-set of
an SQL statement.
● A view contains rows and columns , just like a
real table.
● The fields in a view are fields from one or more
real tables in the database.
105. www.webstackacademy.com
View
View Syntax :
CREATE VIEW view_name AS SELECT column_name(s) FROM
table_name WHERE condition
Example :
CREATE VIEW StudentList AS SELECT Stud_Id ,Name FROM
Students WHERE City ='Banglore' ;
We can query the view as follows :
SELECT * FROM StudentList ;
107. www.webstackacademy.com
SQL DATES
Assume we have following “Orders” table
● OrderID CustomerID OrderDate
10308 2 2011-09-18
10309 37 2009-09-19
10310 77 2012-09-20
10311 78 2012-09-21
SELECT *FROM Orders WHERE OrderDate='2011-09-18'
108. www.webstackacademy.com
SQL DATE Function
● GETDATE() returns the current date & Time from SQL Server.
Example
SELECT GETDATE() AS CurrentDateTime
● DATEDIFF() function returns the time between two functions.
DATEDIFF(datepart, startdate, enddate)
Example
SELECT DATEDIFF(day,'2016-08-05' ,'2016-08-06') AS DiffDate
109. www.webstackacademy.com
SQL NULL Values
● NULL values represent missing unknown data.
● By default ,a table can hold NULL values.
● NULL values are treated differently from other
values.
Example
SELECT OrderId ,CustomerId from Orders
where OrderId IS NULL
110. www.webstackacademy.com
NULL Functions
● ISNULL() :- function is used to specify how we want to
treat NULL values.
● NVL(), IFNULL(), and COALESCE() functions can also
be used to achieve the same result.
111. www.webstackacademy.com
Subquery
● Subquery or Inner query or Nested query is a query in query is
usually added in the WHERE clause of the SQL Statement.
● Subqueries are an alternate way of returning data from multiple
tables.
● Subqueries can be used with the SELECT ,INSERT ,UPDATE
and DELETE statements along with the operators like =
,<,>,>=,<=,IN ,BETWEEN etc.
112. www.webstackacademy.com
Subquery
Syntax :
SELECT select_list FROM table WHERE expr operator
(SELECT select_list FROM table);
● The subquery (inner query) executes once before the main
query (outer query) executes.
● The main query(outer query) use the subquery result.
113. www.webstackacademy.com
Subquery Example
● We have the following two tables
student and marks.
● Student Table
StudentIDName City
A001 John Paris
A002 Smith London
A003 Mac Berlin
A004 Ivan London
115. www.webstackacademy.com
Subquery Example
● We want to write a query to identify all students who get better
marks than that of the students who's StudentID is A002,but we
don't know the marks of A002.
Here two query one query return the the marks stored in
Total_marks field another query identifies the students who get
better marks than the result of the first query.
116. www.webstackacademy.com
Subquery Example
SELECT a.StudentID , a.name , b.Total_marks FROM
Student a , Marks b WHERE a.StudentID =b.StudentID AND
b.Total_marks > (SELECT Total_Marks FROM Marks
WHERE StudentId='A002');
● Output :
StudentID Name Total_Marks
A001 John 95
A004 Ivan 81
118. www.webstackacademy.com
Single Row Subquery
● Subquery which returns single row output. They mark the usage
of single row comparison operators when used in where
condition.
AGENT_CODE | AGENT_NAME | WORKING_AREA | COMMISSION | PHONE_NO | COUNTRY |
+------------+----------------------+--------------------+------------+-----------------+---------+
| A007 | Ramasundar | Bangalore | 0.15 | 077-25814763 | |
| A003 | Alex | London | 0.13 | 075-12458969 | |
| A008 | Alford | New York | 0.12 | 044-25874365 | |
| A011 | Ravi Kumar | Bangalore | 0.15 | 077-45625874 | |
| A010 | Santakumar | Chennai | 0.14 | 007-22388644 | |
| A012 | Lucida | San Jose | 0.12 | 044-52981425 | |
| A005 | Anderson | Brisban | 0.13 | 045-21447739 | |
| A001 | Subbarao | Bangalore | 0.14 | 077-12346674 | |
| A002 | Mukesh | Mumbai | 0.11 | 029-12358964 | |
| A006 | McDen | London | 0.15 | 078-22255588 | |
| A004 | Ivan | Torento | 0.15 | 008-22544166 | |
| A009 | Benjamin | Hampshair | 0.11 | 008-22536178 | |
+------------+----------------------+--------------------+------------+-----------------+---------+
Agent Table
119. www.webstackacademy.com
Single Row Subquery Example
SQL Statement :
SELECT agent_name ,agent_code,phone_no FROM agents
WHERE agent_code=(SELECT agent_code FROM agents
WHERE agent_name ='Alex';
● Output
AGENT_NAME AGENT_CODE PHONE_NO
Alex A003 075-12458969
121. www.webstackacademy.com
Multiple Row Subquery
● Multiple row subquery returns one or more rows to the outer
SQL statement. We can use IN, ANY, or ALL operator in outer
query to handle a subquery that returns multiple rows.