B
B
beginer1232016-08-18 14:11:02
PHP
beginer123, 2016-08-18 14:11:02

SQL DB what to set the maximum length?

I'm starting to design a database .
I need to make several varchar fields
. And I stopped at the question, what is the maximum length of the fields to set?
50?100?250 characters?
again, I can't know right now how long my title or name can be
. How to determine what max length to set?
If you set 99999 what will happen then? Will the base weigh more?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Максим Федоров, 2016-05-14
@xFreaky

не мешало бы увидеть текст ошибки, по коду первое что бросается в галаза:
1. Зачем Вы взяли переменые $platform, $appName, $store_url, $status в `` это же значеня полей...
2. Перед WHERE не должно быть запятой

M
Maxim Fedorov, 2016-08-18
@qonand

At the design stage, you can’t guess exactly how much this or that parameter will take. You can only guess, for example:
Surname - it is unlikely that the length of a person's last name is more than 30 characters First
Name - it is unlikely that the length of a person's first name is more than 20 characters.
Based on such an analysis, make an approximate length, and during operation, already with the help of logging and a validation system, see what and how.

F
Fat Lorrie, 2016-08-18
@Free_ze

stackoverflow.com/questions/332798/equivalent-of-v... You can read the manual about RTFM
limitations .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question