⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqllecture.html

📁 黑客培训教程
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<HTML>

<HEAD>

   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

   <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (Win95; I) [Netscape]">

   <TITLE>Sql Database Lecture</TITLE>

</HEAD>

<BODY>



<HR SIZE=1 NOSHADE WIDTH="60%">

<CENTER>Sql Databases Mini Lecture</CENTER>



<CENTER>by</CENTER>



<CENTER>d4JinX / AZTEK / Spiderman / Mikkkeee</CENTER>



<CENTER><A HREF="http://blacksun.box.sk">http://blacksun.box.sk</A></CENTER>



<CENTER>

<HR SIZE=1 NOSHADE WIDTH="80%"></CENTER>

<B></B>



<P><B>*Note: This lecture was held&nbsp; impromptu so we didn't have a

chance to cover many more important areas of sql databases.</B><B></B>



<P>*** Mikkkeee sets mode: +m

<BR>&lt;Mikkkeee> okay we got something set

<BR>&lt;Mikkkeee> its going to be an sql lecture

<BR>-xenitanus- thanks :)

<BR>&lt;Mikkkeee> pl/sql then php/sql then cracking sql

<BR>&lt;Mikkkeee> then we can kill reptile after we are done

<BR>*** Mikkkeee sets mode: -m

<BR>&lt;_ciR_> lol

<BR>&lt;MASTURB4TION> sounds ok

<BR>&lt;N0_Nick> hm

<BR>&lt;N0_Nick> okay

<BR>&lt;UnHaFox> lol nick, now its 4.30?&nbsp;&nbsp; and before 10.00?=))))))))))))

you are are from california, aren t you?

<BR>&lt;N0_Nick> we will survive

<BR>&lt;UnHaFox> =)

<BR>&lt;UnHaFox> ok mikkee

<BR>&lt;MASTURB4TION> espescially the end

<BR>&lt;_ciR_> im 4 killing reptile

<BR>&lt;N0_Nick> n0 man

<BR>&lt;AZTEK> d4JinX: is starting

<BR>*** AZTEK sets mode: +m

<BR>&lt;d4JinX> lol

<BR>&lt;AZTEK> take it away d4JinX

<BR>&lt;d4JinX> Am I?

<BR>*** Mikkkeee sets mode: +o d4JinX

<BR>*** ChanServ sets mode: -o d4JinX

<BR>&lt;AZTEK> well you want to start with history

<BR>&lt;d4JinX> I think sql should run first..

<BR>*** SySt3mShk has joined #bsrf

<BR>&lt;AZTEK> ok

<BR>&lt;Mikkkeee> ----------------sql lecture------------------------

<BR>&lt;d4JinX> Okay, SQL stands for Structured query language

<BR>&lt;AZTEK> SQL originated from IBM's research labs in the early 1070's

<BR>&lt;d4JinX> k..

<BR>&lt;AZTEK> SQL is the post cursor to SEQUEL

<BR>&lt;AZTEK> Structured English QUEry Language

<BR>*** d4JinX is now known as d4J1nX

<BR>*** Lone[Star] has quit IRC (Quit: see ya pplz l8r)

<BR>&lt;AZTEK> sql is strictly a language to access relational databases

<BR>*** _ciR_ has quit IRC (Quit: )

<BR>&lt;AZTEK> such as oracle or paradox

<BR>&lt;AZTEK> the latest ansi is recomendation sql-92

<BR>&lt;AZTEK> and thats my history now for d4J1nX

<BR>&lt;AZTEK> brb

<BR>&lt;d4J1nX> As Aztek said SQL is a language used to access databases

<BR>&lt;d4J1nX> It has very simple syntax

<BR>&lt;d4J1nX> And is very easy to pick up

<BR>*** SySt3mShk has quit IRC (Ping timeout: 181 seconds)

<BR>&lt;d4J1nX> Languages such as ASP and PHP use SQL statements

<BR>&lt;d4J1nX> Say we had a database called people

<BR>&lt;d4J1nX> I hope everyone knows what a database is ;-)

<BR>&lt;d4J1nX> Within that database would be a number of tables

<BR>&lt;d4J1nX> These tables hold the data in the form of fields with their

corresponding types

<BR>&lt;AZTEK> ok back

<BR>&lt;d4J1nX> eg people table

<BR>&lt;d4J1nX> This could be made up of

<BR>&lt;d4J1nX> wb Az

<BR>&lt;AZTEK> thx

<BR>&lt;d4J1nX> SURNAME VARCHAR2(50)

<BR>&lt;d4J1nX> FORENAME VARCHAR2(50)

<BR>&lt;d4J1nX> TELEPHONE NUMBER

<BR>&lt;d4J1nX> VARCHAR and number are the types

<BR>&lt;AZTEK> PHONENUM INTEGER(7)

<BR>*** StartX has joined #bsrf

<BR>&lt;d4J1nX> There would also be an ID field

<BR>&lt;d4J1nX> Used for indexing and joining tables

<BR>&lt;d4J1nX> It has to be unique

<BR>&lt;d4J1nX> And it cant be null when a new record is added to the table

<BR>*** SySt3mShk has joined #bsrf

<BR>&lt;d4J1nX> PEOPLE_ID NUMBER

<BR>&lt;d4J1nX> So we have a table called people with the fields already

stated

<BR>&lt;d4J1nX> Say we have a web front end

<BR>&lt;d4J1nX> And we want to display all the people within the table

<BR>&lt;d4J1nX> We would use a statement like

<BR>&lt;AZTEK> SELECT * FROM People

<BR>&lt;d4J1nX> SELECT * from people

<BR>&lt;d4J1nX> * being all the fields

<BR>&lt;d4J1nX> We could pull back one field or two

<BR>&lt;d4J1nX> SELECT surname,forename FROM table

<BR>&lt;d4J1nX> If its a big table

<BR>&lt;d4J1nX> SELECT *

<BR>&lt;d4J1nX> Can take a long time

<BR>*** WishGenie has joined #bsrf

<BR>&lt;d4J1nX> So sometimes its better to pull back only the fields required

<BR>&lt;d4J1nX> If your lazy as well, SELECT * lol

<BR>*** Drager has quit IRC (Ping timeout: 180 seconds)

<BR>&lt;d4J1nX> Once we issue this statement a temporary table is setup

<BR>&lt;AZTEK> a view

<BR>&lt;d4J1nX> Which has the relevant fields and the relevant values

<BR>&lt;d4J1nX> Yes, you can have views too

<BR>*** CodE4 has joined #bsrf

<BR>&lt;AZTEK> i was just wondering when you were goign to start them

<BR>*** idiocy|idle has quit IRC (Read error: 104 (Connection reset by

peer))

<BR>&lt;d4J1nX> If we want to add to the people tablAka's: Brian-17-, Mr_Innocent

<BR>&lt;d4J1nX> Name: Brian

<BR>&lt;d4J1nX> Age: 17

<BR>&lt;d4J1nX> Department: Warez

<BR>&lt;d4J1nX> Rank: Head

<BR>&lt;d4J1nX> Skillz: nuking, kloning, email bombing, spoofing, flooding,

viral attacks, networking, troubleshooting, finding illegal software

<BR>&lt;d4J1nX> WeFuck

<BR>&lt;d4J1nX> My buffer

<BR>&lt;AZTEK> its what i would have done first

<BR>&lt;d4J1nX> kay

<BR>&lt;d4J1nX> You go for it

<BR>&lt;AZTEK> lol from that site form the message board

<BR>&lt;d4J1nX> phone

<BR>&lt;d4J1nX> Yep

<BR>&lt;AZTEK> no no your doing fine

<BR>&lt;d4J1nX> 2 secs phone

<BR>*** [PhaLanX] has quit IRC (Ping timeout: 180 seconds)

<BR>*** ken has joined #bsrf

<BR>*** CodE4 has left #bsrf

<BR>*** d4J1nX has quit IRC (Ping timeout: 180 seconds)

<BR>&lt;Mikkkeee> okay the lecture will presume in a few min

<BR>&lt;AZTEK> i am sorta not here and here

<BR>&lt;AZTEK> so i will be in and out

<BR>&lt;Mikkkeee> same here iam going to wrap some stuff for the cracking

part

<BR>*** freespeachlamer has joined #bsrf

<BR>*** AirriK has joined #bsrf

<BR>*** d4J1nX has joined #bsrf

<BR>*** [PhaLanX] has joined #bsrf

<BR>*** Mikkkeee sets mode: +v d4J1nX

<BR>&lt;Mikkkeee> wb

<BR>&lt;d4J1nX> Thx

<BR>&lt;d4J1nX> Side lecture - See when ya have a cable modem, dont let

your cellphone anywhere near it, especially when it rings

<BR>*** AirriK is now known as _AirriK-

<BR>&lt;AZTEK> lol

<BR>&lt;d4J1nX> Keep getting caught with that

<BR>&lt;d4J1nX> Had to reboot

<BR>&lt;d4J1nX> So, where were we?

<BR>&lt;bluehaze> was there any lecture?

<BR>*** _AirriK- has quit IRC (Quit: Leaving)

<BR>&lt;Mikkkeee> yah were doing an sql lecture instead

<BR>&lt;bluehaze> oh

<BR>&lt;Mikkkeee> &lt;d4J1nX> If we want to add to the people tablAka's:

Brian-17-, Mr_Innocent

<BR>&lt;Mikkkeee> &lt;d4J1nX> Name: Brian

<BR>&lt;Mikkkeee> &lt;d4J1nX> Age: 17

<BR>&lt;Mikkkeee> &lt;d4J1nX> Department: Warez

<BR>&lt;Mikkkeee> &lt;d4J1nX> Rank: Head

<BR>&lt;Mikkkeee> &lt;d4J1nX> Skillz: nuking, kloning, email bombing, spoofing,

flooding, viral attacks, networking, troubleshooting, finding illegal software

<BR>&lt;Mikkkeee> we were up to there

<BR>&lt;bluehaze> who's giving it?

<BR>&lt;bluehaze> oh ok

<BR>&lt;Mikkkeee> aztek/d4j1nx/and I

<BR>*** lostmode has joined #bsrf

<BR>&lt;d4J1nX> Kay

<BR>*** xenitanus has quit IRC (Quit:)

<BR>&lt;d4J1nX> So basically we pull back a temporary table from that statement

<BR>&lt;d4J1nX> We can also have conditional syntax

<BR>&lt;d4J1nX> Such as

<BR>*** freespeachlamer has left #bsrf

<BR>&lt;d4J1nX> SELECT surname FROM people WHERE surname LIKE '%on'

<BR>&lt;d4J1nX> Will pull back all the records where the surname has on

at the end

<BR>&lt;d4J1nX> Or

<BR>&lt;d4J1nX> SELECT phone_number FROM people WHERE phone_number>809090

<BR>&lt;d4J1nX> Self explanatry I hope

<BR>&lt;d4J1nX> If we want to add to a table

<BR>&lt;d4J1nX> Then we use an INSERT statement

<BR>*** Litte has joined #bsrf

<BR>*** cupelmen has joined #bsrf

<BR>&lt;d4J1nX> INSERT into people(surname,forname,phone_number) VALUES

('woods','jim',0202020)

<BR>&lt;d4J1nX> The ID will be created automatically by means of a trigger

- will get to it later

<BR>&lt;d4J1nX> If we wanted to update the table then we would use the

UPDATE statement..

<BR>&lt;d4J1nX> UPDATE people SET surname='newsurname';

<BR>&lt;d4J1nX> deleting would require knowing the id, more practical,

although not necessary

<BR>&lt;d4J1nX> DELETE from people where people_id=349

<BR>*** StartX has quit IRC (Quit: )

<BR>&lt;d4J1nX> The three basic db maintenance statements

<BR>&lt;d4J1nX> All pretty simple syntax, as I mentioned before

<BR>*** Devil_Panther has joined #BSRF

<BR>*** zwanderer has joined #bsrf

<BR>*** Shadow_Stalker has joined #bsrf

<BR>&lt;d4J1nX> So we know how to add to a table in a database, delete

from a table and update a record in a table

<BR>*** reptile has joined #bsrf

<BR>*** Litte has quit IRC (Quit: Clone for reptile w00t w00t)

<BR>*** _ciR_ has joined #bsrf

<BR>&lt;AZTEK> yep it is simple

<BR>&lt;d4J1nX> As I mentioned earlier..

<BR>&lt;d4J1nX> A trigger is used to created the id automatically

<BR>*** _ciR_ is now known as __ciR_-

<BR>&lt;d4J1nX> A trigger is a small script, if you like that will add

the id to the id field on an insert into the table

<BR>*** D12_BoyZ has joined #bsrf

<BR>&lt;d4J1nX> This ID number is taken from a number sequence in the database

<BR>&lt;d4J1nX> The sequences are created manually

<BR>*** ewren has joined #bsrf

<BR>*** D12_BoyZ has left #bsrf

<BR>&lt;d4J1nX> Each table that is normalized and has an ID field will

have a different sequence

<BR>&lt;d4J1nX> Now..

<BR>&lt;d4J1nX> Say we have another field in our people table

<BR>*** paranoid has joined #bsrf

<BR>&lt;d4J1nX> Called contact_name

<BR>&lt;d4J1nX> And contact_address

<BR>*** MrBS480 has joined #bsrf

<BR>*** cupelmen has joined #bsrF

<BR>&lt;d4J1nX> Now in order to normalise a db we would remove these two

"repeating" fields and replace them with one

<BR>&lt;d4J1nX> Contact_ID

<BR>&lt;d4J1nX> And a separate table would be created called contacts

<BR>&lt;d4J1nX> This table would have the fields.

<BR>&lt;d4J1nX> Contact_id

<BR>&lt;d4J1nX> Contact_name

<BR>*** Mikkkeee sets mode: +v Devil_Panther

<BR>&lt;d4J1nX> Contact_address

<BR>&lt;d4J1nX> brb door

<BR>*** paranoid has left #bsrf

<BR>&lt;Mikkkeee> okay seems like reptile showed up, so were going to finish

this lecture and then do the vb coding

<BR>*** MrBS480 has quit IRC (Quit: )

<BR>*** ewren has quit IRC (Quit: )

<BR>*** flipu has joined #bsrf

<BR>&lt;d4J1nX> back

<BR>&lt;d4J1nX> Kay, I hope this is making some sense here, didnt really

have time to prepare

<BR>&lt;d4J1nX> Right so we now have two tables

<BR>*** lostmode has quit IRC (Quit: )

<BR>&lt;d4J1nX> Contact table

<BR>&lt;d4J1nX> And people table

<BR>&lt;d4J1nX> Say we wanted all contact names for all the people whose

first name was john

<BR>&lt;d4J1nX> We would have to join our tables in the query statement

<BR>*** flipu has quit IRC (Not enough time connected)

<BR>*** torpor has joined #bsrf

<BR>*** __ciR_- has left #bsrf

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -