0% found this document useful (0 votes)
2 views

SQL NOTES

This document provides an overview of Structured Query Language (SQL) and its role in storing, manipulating, and retrieving data in relational databases. It explains the structure of a database, including tables, fields, records, and key fields, as well as the use of SQL commands for database access. Additionally, it discusses the differences between relational and non-relational databases, mentioning examples of database management systems and the use of JSON for data storage.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

SQL NOTES

This document provides an overview of Structured Query Language (SQL) and its role in storing, manipulating, and retrieving data in relational databases. It explains the structure of a database, including tables, fields, records, and key fields, as well as the use of SQL commands for database access. Additionally, it discusses the differences between relational and non-relational databases, mentioning examples of database management systems and the use of JSON for data storage.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

SQL NOTES

​Structured Query Language


★​ Storing and processing information in a relational database
★​ Storing, manipulating and retrieving data in databases

Structure of a Database:
★​ Table is a collection of related data entries and it consists of columns and
rows
★​ Broken up into smaller entities calleds fields and records
★​ Fields are Columns that are designed to maintain specific information about
every record in the table; etc PostalCode,Country,Address and City
★​ Records are Rows is each individual entry that exists in table
★​ A Key field makes a record unique:
○​ construct, something that is unique for each record such as cell phone
number/ ID number

★​ Database that has multiple tables, link them together by using key fields

★​ Relational database establishes relationship between tables by using key


fields

★​ SchoolStudentsDatabase Examples of Tables: 1. Name of subject


2.Description of subject ,
○​ 3. That consists of student number(SdntID) and subjectID - called
linking table/joining table​

We use SQL to access a database:


★​ A language that has commands such as select,update,insert, where and
delete data in the database
★​ RDSMs aka RDBS : Remote Database Management System (Software)
○​ Examples of modern database systems(program) : Oracle, MySql,
Microsoft Access
○​ The data in RDBMS is stored in database objects called tables
○​ To use HTML/ CSS to style the page
★​ DMBS aka DBMS : Database Management system (Software)
○​ Examples of DMBS software: FileMaker Pro, SQLite, PostgreSQL

Additional Information:
●​ Some large databases don’t use SQL because they don’t have structure such
as columns and records
○​ Meaning they their databases have large unstructured data sets or
rapidly changing data structures
○​ Advantage: Allow for quicker,easier data storage and access without
the need for a predefined schema
○​ Example: MongoDB-Which is a document database with the scalability
and flexibility that you want to with the querying and indexing that you
need
●​ Most use JSON file format to store data
○​ JavaScript Object Notation(JSON) - a standard text-based format for
representing structured data based on Javascript object syntax
■​ Commonly used- For transmitting data in web applications:
■​ Used to and storing data on the internet and transfer object data
file across the internet
●​ Therefore sending some data from the server to the client
so it can be displayed on a webpage
●​ Things such as sub queries
●​ Delete has 3 parts; specificity which table you are delete from and then; Need
a WHERE statement so that it doesn’t delete all info

Password for server:

DLSH4sql

Structure of Queries
** Use double hyphen to comment out statements

Format:

Select
From table_name
Join
On
Where/Having -- Having is used for calculation and can’t be used without GROUP BY
Group by
Order by

Examples(Containing Having):

Select *
From Orders
Group by Ship City
Having avg (Shipping fee) > 100

You might also like