Forma Normala 1

postat acum 4 ani de Stefanescu Mihai in categorie SQL

Prima forma normala vine cu un set de reguli destul de standard entru organizarea structuriii unei baze de date.

    • Asigura-te ca ai o singura valoare in fiecare camp.
    • Asigura-te ca nu exista grupuri de informatii ce se repeta

Asigura-te ca exista o cheie primara.


Nume Telefon 1 Telefon 2
Nume Student 0728848714 0764748627

Exemplul de mai sus este gresit pentru ca in timp ce un student are 2 numere de telefon si se potriveste perfect altul are 1 numar de telefon (lasand un camp gol), iar altul poaet avea 10 (si nu avem unde sa le bagam).

Acum probabil va ganditi sa faceti urmatorul lucru:

Nume Telefon
Nume Student 0728848714, 0764748627

Nici asa nu este corect pentru ca daca dorim sa extragem un numar de telefon pentru un student o sa extragem tot ce scrie acolo…si nici nu mai vorbesc de alte probleme ce pot aparea din cauza asta.

Acum hai sa va arat un exemplu corect.

In primul rand trebuie sa facem 2 tabele: Studenti si Telefoane:


ID_Student Student
1 Nume Student


ID ID_Student Telefon
1 1 0728848714
2 1 0764748627

Acum Putem cate numere de telefon dorim fiecarui student fara sa ne mai facem probleme ca apar erori.

Sunt un tanar programator din Bucuresti ce lucreaza in PHP/Mysql (MySqli/PDO), Laravel, CodeIgniter, MySQL, PostgreSQL, Wordpress, HTML5/CSS3, Sass, Photoshop si multe altele.
Google+ Community Facebook Group
Acest articol a fost mutat de pe vechea platforma.
Pentru orice eroare aparuta la mutare va rog sa ma contactati!

Comentariu postate de g la data de 13.05.2019
Please let me know if you're looking for a article author for your site. You have some really great articles and I think I would be a good asset. If you ever want to take some of the load off, I'd love to write some content for your blog in exchange for a link back to mine. Please send me an email if interested. Many thanks!
Comentariu postate de minecraft download mojang la data de 15.05.2019
What i do not understood is in truth how you are now not actually a lot more neatly-liked than you may be now. You are so intelligent. You know thus significantly on the subject of this matter, produced me in my view believe it from so many various angles. Its like men and women don't seem to be interested until it is one thing to do with Lady gaga! Your own stuffs great. Always deal with it up!
Comentariu postate de how to download minecraft free la data de 16.05.2019
Wow, amazing weblog layout! How lengthy have you been running a blog for? you make blogging glance easy. The total glance of your web site is great, as smartly as the content material!
Comentariu postate de minecraft for free la data de 17.05.2019
Way cool! Some very valid points! I appreciate you penning this post and also the rest of the website is also really good.
Comentariu postate de mojang minecraft download la data de 17.05.2019
Magnificent goods from you, man. I have have in mind your stuff prior to and you're just extremely fantastic. I really like what you've received here, certainly like what you're stating and the best way through which you assert it. You're making it enjoyable and you continue to care for to stay it smart. I cant wait to learn far more from you. That is really a great site.