Sunday, January 1, 2012

Explain and learn in detail the mysql databases boring part2

Lesson III - Part ILesson Title: Concepts in relational databases - Part IPurpose of the lesson to learn some basic concepts in databases, which help to understand the mechanism of action of MySQL.Let's start with the blessing of God, through the previous lessons, we were a unique value of the term, what is this term and what are the other terms that we want?Initially, the database has grown to become a flexible and easy to use, especially the insertion and deletion, update and even reached to the concept of relational databases and Relational Database of the most important concepts of relational databases as follows:1. Fattah table's primary Primary Key:Mentioned in the first lesson that the table consists of rows Records and in the relational database must not be repeated grade full, but there should be a unique value that distinguishes each row on row of the other and this is what we call the primary key of the table, and an example in table employees can be Dlina staff have the same name and Iktnan in the same province, and all the data with them similar to that distinguish them by phone number for example, or e-mail, but this distinction somewhat difficult for this facilitated our databases, something beautiful is the AutoNumber so that when they register a new employee it takes its own number automatically and without that we include a number in the column emp-no, and therefore distinguish between the staff through his own that distinguishes it from other employee and the same applies to products, customers and suppliers and all the rules of the world's data approximately.2. Key strange Foreign Key:In databases there is a term called referential integrity referential Integrity that is, we have two tables, such as employees, addresses are linked between them by placing the column in one of this column has the same name as the primary key column in the table the other and has the same type of data Data Type and the same qualities Attributes This column is called a strange key, so that this column is a link between the table and the first and the second table.This process we call the referential integrity, if the definition of the final integration of the reactionary.Referential integrity is a relationship between two tables contains the first table on the primary key and the second table is associated with the first table a strange key has the same name the primary key and the same data and the same qualities.The key is the odd column in a table refers to a column in another table is the table's primary key and the last two columns, each of the primary and the same strange name and the type of data entered in them and the same qualities.When you're adding an item to the table with a strange key, and is not present in the table with primary key will the database server Ptnabiha that I do something that is not included in the primary table.Of useful things provided by our referential integrity is the process of deletion serial Cascading Deletes Vfrdha that you have employees registered in the table employees and to the employee three addresses listed in the table addresses and then gave the officer asked for the resignation and approved by you it would then delete the record from the database your business, imagine how difficult and confusing that it will be deleted at each process, especially with customers or with people who register on the free e-mail then do not return to the mail and a lot of similar operations?! Here highlight the importance of serial deletion when I ask the database server delete my record of this employee from the table employees it will automatically delete all records in the corresponding table that contains a key Ghraib.In the name of God the MercifulLesson III - Part II
Lesson Title: Concepts in relational databases - Part II.Purpose of the lesson to learn types of relationships between tables in relational databases and some other concepts.Let's start with the blessing of God, and we got in the previous lesson to the relations between the tables ..3. Relations between the tables Relationship:Mentioned in the second part of the second lesson that the relationship between the tables movies, clients are many-to-many, then what are the types of relationships between tables in databases:Relationship first is one relationship (One To One)This type of relationship is between two tables, at least so that only one record from the first table is linked with only one record from the second table and vice versa, and an example, suppose that we have a table of countries and another table of the capitals and the two tables there are referential integrity, Every country has the capital and only one, and all the capital is the capital of one country only.The second relationship: is-many relationship (One To Many)In this type the relationship between the two tables is that each record from the table first has to do with a record of at least one of the second table while each record from the table the second has to do with a record of one of the first table to take an example of this in our database movie-store every record (ie employees) employees of the table can be linked to more than one record (any address) of the table addresses, while each title is only one staff member.The third relationship: many-to-many (Many To Many)Ie, each record of the first table is linked to several records from the second table and vice versa, but I mentioned in Part II of the second lesson that this type of relationship is the kind of sinner and as an example by the relationship between the tables movies, clients, where each customer can buy more from the film and every film that can be purchased by more than a customer, so in that case create another table again be a link or intermediary between the two tables so that the relationship of the latter is-many relationship with each of the two tables separately.4. Value Null: in relational databases're going to be a lot of value is null and Allaqama any means nothing and is of course different from zero Zero is a value, but is now important to know that Null means no value.5. Indexes Indexes: Index in databases Kfihrs known for the books and does the same job in the book the index helps us to quickly move to a particular topic in the book, as well as the command in databases Valvhars help us to speed the transition to obtain information for a query.You my brother the reader to review these three lessons carefully so you can start easily with the rest of the lessons, and beware of that neglect this aspect so as not to have to go back to these lessons repeatedly while reading a few lines of each lesson.In the name of God the MercifulThe fourth lesson

Lesson Title: Know the mechanism of action of MySQL, Apache, PHPPurpose of the lesson: to identify the mechanism of MySQL, Apache, PHPLet's start with the blessing of God, to develop an integrated Web applications, you need to gear the following:1. Server databases.2. Web server.3. List of programming language Middleware

1. Database server: and the best thing about them is MySQL What is MySQL? Server is the server or any SQL database that is investigating the interaction between the user and databases, and SQL Server stores the data effectively, and you retrieve that data quickly Valmalghem is where the nest in which the data as easily and the server processes the query for this data and provide statistical information about the data you have stored. And database servers known also as the management systems, relational databases, Relational Database Management Systems and is indicated for short acronym RDBMS

2. Web server: task is to call the Web server address IP (Internet Protocol address) or call the scope of a particular Domain by hypertext transfer protocol HTTP (Hypertext Transfer Protocol) and is the language spoken by Web servers and Web browsers such as Internet Explorer, Netscape and months servers Web are:Apache, IIS (Internet Information Server) but it is better to use Apache with MySQL and often present these products together in a web applications.

3. Programming language of catalytic: and the best programming language, check the interaction with MySQL, in my view is the language of PHP, check the programming language of catalytic interaction between the Web server and database server when you have the model on the web and you fill it and send the web server receives the information sent by the browser which include information form, and here intervenes in the catalytic programming to look at the information coming true If any match with the type of data in SQL Server and pass (ie, catalytic programming) to you the results and it only re-form itself with the message that you where wrong just as happens with you when you register at the site of the membership of the Internet or recorded on the e-mail.And now, brother reader after you've installed Apache Triad on your computer and you confirm that everything is okay to start learning the commands MySQL,MasaglExplain and learn mysql databases boring detail Part 3Soon, God willing,

No comments:

Post a Comment