Sunday, January 1, 2012

Explain and learn in detail the mysql databases boring part1

Explain and learn in detail the mysql databases boring part1

Introduction:This educational series designed to teach according to MySQL easy steps and simple, so after God based on the following:1. Building a special application to a database is a simple but sufficient for the exercise through the lessons of this series.2. Make the lessons short so as not to feel bored and brother reader dissatisfaction.Snsthl five lessons of this series is simple and very important as it speaks of these lessons on the following:The first lesson: a simple explanation of the concept of databases.Lesson Two: I will give him how to build the database for these series and that it will implement all instructions that MySQL Sntalmha in the rest of the lessons God willing.Lesson Three: Some of the few concepts and important to know the philosophy of relational databases. Relational DataBase Systems RDBLesson Four: Explanation of a simple but adequate for each of the following PHP, Apache, MySQLLesson Five: How to install the database server MySQL and Apache web server under Windows systemAnd now we go to God's blessing.

The first lesson


Lesson Title: The concept of databases.Purpose of the lesson: to introduce the concept of simple databases.Database Database is a collection of tables Tables Each table consists of columns or fields Columns or Fields and records, rows, Records, and the intersection of the column with the row to the composition of the cell Cell, where information is stored in only one single cell.This definition of the database in terms of the physical database definition in terms of the logical expression is true if the warehouse, which includes and contains all information about the organization or a company or organization is ... Etc. Whatever the size of this regulation or the type of information and the Take, for example a primary school, the database to which they relate will include all information relating to teachers in and put this information in the table of special teachers where the table includes a record for each teacher, and also includes this database All information related to the students and also this information is classified in the tables and have each student record his own and other information vary from school to school Kanjazadtha in the field of sports, debates, scientific and cultural ... Etc..Sure, you brother, the reader has noticed the similarity between the database by the computer and the database leafy huge for any school or organization, which called archives, and thus realize the importance of the electronic database because of its ease of storage and speed to reach any search for a record to a teacher or student and to make comparisons and statistics ... Etc..This is all in the field of school Imagine how important the database in the field of a large trading company or a bank or ministry and even access to e-government.This modest clarification of the concept of the database I hope that the benefit of fellow readers.In the name of God the MercifulLesson II - Part ILesson Title: structure of the database - the first part.Purpose of the lesson: to inform the reader on a database of this educational series.In this lesson, we'll build the database for this series and is a private educational center to sell movies directly to customers and via the Internet.Let's start with the blessing of God, we will need here belong to a few tables in the application instructions for MySQL, and you simple method with which to build this database:Suppose you are selling your products that is the center for you, so you need to a table set in which all information about your products this first, then you need to schedule another place where every employee information you have (and in our situation this you I create two tables for employees first includes information on staff in their work and the second information on the addresses of employees in order to allow us greater freedom in the application instructions MySQL), and since you are out buying and selling, you need to a table containing information on customers and another table contains information about suppliers, and thereby became you have a database called movie-store consists of five tables are:- Table films movies- Table workers employees- Address table addresses workers- Table of customers clients- Table suppliers suppliersAnd each table of these tables consist of columns and are as follows:First, the table employees:1. No worker emp-no: includes a unique value for each factor2. Full name of the agent name3. His job4. Salary lump salary5. Bonus incentives6. Date of commencement of work dateSecond, the table addresses:1. No. Title I of the worker add-no: includes a unique value for each address.2. No worker emp-no: includes a reference value (key Ghraib) for each factor.4. Province working state.7. Group e-mail emp-email.Third, the table suppliers:1. No. supplier sup-no: includes a unique value for each address.2. Name of the resource sup-name.6. E-mail sup-email.Fourth, the table clients:1. Customer number cli-no: includes a unique value for each customer.2. Name of the customer cli-name3. Email cli-emailFifth: The table movies:1. No movie mov-no: where we store the unique numbers for each product in this column.2. Name of the movie mov-name: and we store the name of each product in this column.3. Name of the hero the first star-1: This column contains the names of the main heroes of the film.4. Name of the hero the second star-26. Genre kind: This column contains the type of product of any type of film (comedy, Policy, Historical, Romance, Horror, Fiction, violence).7. Price of the movie price: Surely you knew that this column includes the prices of products.

In the third lesson we will give a brief explanation for each of the unique value and the reference value, and some other concepts of databases, God willing.These tables do not include all the columns required that any of this database is not complete because a primary goal of which is the application instructions for MySQL so I chose the tables and columns that do the job alone.In the name of God the MercifulThe second lesson - Part II
Lesson Title: structure of the database - Part IIPurpose of the lesson: to inform the reader on a database of this educational series.In this lesson we will continue what we have said in the previous lesson, where we put the tables that concern us all and we have identified the fields that concern us all as well, and now we have a database ready for training.Let's start with the blessing of God, we will continue now systematically build the database, Fbalaudh to the previous tables we note that each of the following tables: employees, addresses, suppliers are separate tables which there is no interaction among themselves only between the two tables employees, addresses where there is referential integrity between them, and As I mentioned above in a note that I and God's help I will explain some of the concepts and terminology pertaining to databases in the third lesson.As for the two tables, movies, clients there is interaction between them as a customer when he visits the location of the center, it does not care personnel and is not interested suppliers but care products, let us suppose that there are two clients want to buy a bunch of movies, so he wants the first purchase of a movie face off and the movie assassins while he wants the second buy movie assassins only.Note the relationship between movies, clients as possible to the customer the one to buy a collection of films and can be per movie to buy customer group, then the mark between the tables movies, clients is the relationship between (the parties to-many) and this one of the concepts of analysis and design, databases, and that we will cite mentioned in the The third lesson, God willing.You will learn, God willing, in the third lesson that this kind of relationship - the parties to the parties - is the wrong type of types of relationships are therefore circumvented by creating another table and mediator between the two tables so that this is a table between two tables link.This table name here bills and invoices table consists of the following columns:1. Invoice number bil-no: in this column includes the values ​​of each invoice a unique distinction from the other, taking into account the fact that when a customer buys two films will mark the two invoices and so on.2. Customer number cli-no: and this column is a link between the clients agenda and the agenda of any bills that key (strange).3. No movie mov-no: and this column is a link between the table and table bills moviesThat any key (strange).4. Date Edit this bill: The date when the billing.As we said before that these tables are not complete I have chosen only the columns that concern us.Thus we have a data base of adequate and author of six schedules are:employees, addresses, suppliers, movies, clients, bills, and now we go to the third lesson to explain some of the concepts of databases.Part II

Tomorrow we complete explanation

No comments:

Post a Comment