DAT702 First Lecture
September 4, 2007
D group
INT213 we end up to a bit of a webpage to a database a webpage talking to databases and will connect to mysql, you will need to have.
We need a hard drive which is about 4gig of space
Mysql is on the internal machine Password mysql
We are going to get in to activities; Bin is the directory, in which we will be using all the time,
Mysql> \T doppy96.txt
All this is done so after every key stroke is logged
Two data bases u don’t touch info-schema and mysql, do not touch this.
Tell my sql what database to use, after we have created the database Harvey, you will have to type use harvey
Int – interger
Decimal
Varchar
We typed create table allan(mary int, sam varchar(30));
Oracale is case sensitive
Two fields Mary Int Sam is VarChar
Describe allan; which describes what we have just created
We close the log file by /t
Into the command prompt to load the database and browsed to the bin file this is to make or load backup files
Mysql – hlocalhost – uroot – pfrank banana > backupname.sqbac <---load
Mysqldump – hlocalhost – uroot – pfrank banana
DAT702 Second Lecture
Lab01
This is the concept of using MySql
Databases are series of data and quote “connected”. The easiest ways to visualize this is imagine three tables with headings of student, grades, courses, and there is a fields under each heading, student number is a unique, the stunum is the primary key unique and exist only once in the table, every thing below this primary key there is one record, you are one line and in one table only... WHY? Because if you want to update you want to update one table only, in order to build the school he has to build courses, theirs a primary key Code, grades is another field , stunnum primary key is linked to a foreign key Stunum in grades table, this saves you from being an idiot, what the link is saying you cannot put a student number in a foreign key constraint their must be a record in the students number this stops you from making stupid errors, the same thing goes for courses it will not put a code unless the record is in their. When creating a table and you connect it and you do not click Enforce the line does not do anything,
Don’t put spaces in you field names.
The most dangerous thing in a data base is an empty field.
SQLYOG
Thursday, September 6, 2007
First Lecture DAT702
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment