Database, database

Source: Internet
Author: User

Database, database

Guest string: hacker form artifact

Recommendation: Teach you how to create a keyword matching project (search engine) ---- 17th days

Before the beginning of the article, I spoke to myself: I don't know what I 've done in college for four years. Do I spend all my time in love, even if you want to fall in love, you have no love. If you do, I can only think that you are playing the game.

Although I have been working in college for four years, at least some things have not been lost to the teacher.

Directory:

1. Data Type

2. Storage Engine

3. Glossary

4. Object VS class

5. Relational VS object-oriented

Before the beginning of the article, let's talk about it first: the people who step into the society from school have more snacks. Don't get down to the ground every day, hurt and sad, and the bottom is okay, if you refuse to move forward, it will be a big deal. Not every head is so kind, but you will write training documents for you at AM.

This article is based on Mysql.

1. Data Type

1) Integer

Tinyint

Int

Bigint

What is the difference between int (20) and int (12? (The length in the brackets) the audience is silenced ......

2) numeric type

Decimal

What happens when I ask decimal 10? What should you do in the financial industry? The audience was silenced ......

3) balanced

Char

Varchar

What is the difference between char (2) and varchar (2? (The length in the brackets) the audience is silenced ......

Are there any differences between char and varchar fields that use indexes? The audience was silenced ......

Tinytext

Text

Mediumtext

What is the maximum text size? Can text fields be indexed? The audience was silenced ......

4) Time Type

Datetime

Timestamp

What is the difference between datetime and timestamp? What is the difference? The audience continued to silence ......

5) Enumeration type

Enum

A boy's shoes stood up and asked, is there a difference between enum (Y, N) and char (1?

2. Storage Engine

Innodb

Myisam

Memory

When I asked about the differences between innodb and myisam, a tech expert stood up and killed a group of people with a single stick, saying that innodb is used directly. By default, innodb is recommended for mysql.

If we really want to talk about it, we will talk about the lock, which is another topic of the pitfalls. Or the technical cool ....

3. Glossary

Integrity

Redundancy

Entity

Object relationship

Relational

One of the children's shoes stood up and said: they are all thrown to the teacher. I really admire the forgetful child shoes. It's really good to have amnesia. I also threw it to my teacher.

4. entity VS class

At the beginning of this article, I would like to share with you the knowledge that many companies are developing from bottom up. Today I will tell you how to develop from top down.

At that time, a senior person said that the older generation liked the idea from bottom to top, because their ideas were not attacked by Object-Oriented Programming during that time.

From top to bottom is what you will do in the 90 s.

From bottom up: Database relationship ---> code programming ----> Interface

From top to bottom: interface ---> code programming ----> database relationship

This is to go against the day. Check the following instance first, whether or not it is against the day:

class Person {     public $name;     public $age;     public $sex;     public $weight;}

Then I found a shoes and switched the data structure.

Id int Name varchar (50) Age int Sex enum ("male", "female ") Weight int

This kid's shoes is really awesome.

Then I wrote it again.

$ Person1 = new Person (); $ person1-> name = "Zhang san'; $ person2 = new Person (); $ person2-> name =" Li si ';

The boy shoes again wrote the following:

Id int Name varchar (50) Age int Sex enum ("male", "female ") Weight int

1 Zhang San      
2 Li Si      

 

I believe that when you see this, you should know what happened!

I continue to write:

Class Person {public $ name; public $ age; public $ orders = array (new Order (), new Order ();} class Order {public $ money; public $ items = array ("hands-on instructions for keyword matching projects", "hacker form artifacts ");}

The young man in the 90 s soon completed:

Order table:

Order_id Person_id Money

Order_item table:

Item_id Order_id Item_name

After reading this, I realized that the current graduates are interested in classes and are immune from the associations between entities and entities.

I have realized that I don't know if my children's shoes are familiar with me. After all, this training is for those children's shoes.

 

5. Relational VS object-oriented

Object-oriented => relational (not mentioned)

 

Conclusion: after class, they want to explain how to optimize the database in the next class. I can only talk about Nima, tinyint, char, varchar, and index, if you don't understand the lock, you can learn how to optimize the database. Which of the following is the case?

Of course, I am also happy with their willingness to ask. After all, there is motivation when there is demand.

 

Of course, there are so many reasons why we still need to solve the problem. What's the solution? Well, I 've already lost it to my teacher. What should I do? There must be some enthusiastic people in the comment area below to talk about these problems. Don't worry .....


For that thing

I guess you should want to know how he feels about you and how you can properly express your feelings.

In fact, feelings are just a natural thing. If you are not familiar with it, you can familiarize yourself with it first. Now that you can chat on QQ, you can have more opportunities to chat.

When you know each other better, you can take care of him occasionally to see what his attitude is. I believe that a boy may feel a girl's affection for herself in some details.

If you like him and he also like you, congratulations, you are the happiest person ~

Happy ~

For that thing-

I guess you should want to know how he feels about you and how you can properly express your feelings.

In fact, feelings are just a natural thing. If you are not familiar with it, you can familiarize yourself with it first. Now that you can chat on QQ, you can have more opportunities to chat.

When you know each other better, you can take care of him occasionally to see what his attitude is. I believe that a boy may feel a girl's affection for herself in some details.

If you like him and he also like you, congratulations, you are the happiest person ~

Happy ~
References: Baidu
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.