Cum sa normalizezi o baza de date

Dupa aproape 4 ani revin asupra acestui subiect pentru ca e clar ridica probleme in randul incepatorilor ce au de a face cu bazele de date. Spun incepatori deoarece sincer, eu nu mai folosesc aceasta metoda de mormalizare lucrurile venind de la sine.

Un exemplu de normalizare il gasiti aici: exemplu normalizare baza de date abonati telefonici

Iata scenariul:

Sa se proiecteze o baza de date pentru o organizatie, avand in vedere urmatoarele constrangeri: – constrangerea de integritate a entitatii; – constrangerea de integritate referentiala; – baza de date contine cel putin 6 tabele; – baza de date contine cel putin un tabel referential (entitate referentiala transversala).

Normalizarea se va face pe baza primelor 3 forme normale. Dupa proiectare, trebuie realizata diagrama entitate-asociere utilizand aplicatia MySQL Workbench, precum si scriptul SQL care implementeaza baza de date.

Sa se implementeze o operatie de tip JOIN pe trei tabele, care sa utilizeze cel putin o functie de sumarizare si sa contina cel putin o filtrare. Sa se implememnteze o vizualizare avand la baza o operatie de tip JOIN (diferita de cea precizata la punctul anterior).

Cum gandim si ce facem de aici:
In primul rand trebuie sa plecam de la ideea centrala pentru care dorim normalizarea.

De exemplu pentru o ferma cu animale sa zicem ca vrem sa tinem minte ce vaccinari ii sunt facute unui animal dealungul vietii. Pentru asta in baza de date vom aveam nevoie de date de identificare pentru animal, date de identificare pentru vaccin, date de identificare pentru cel ce a facut vaccinul, nu?

Pasul 1

bazaAnimale(idAnimal, numeAnimal, varstaAnimal, tipAnimal, idMedicIngrijitor, numeMedicIngrijitor, telefonMedicIngrijitor, idVaccin, numeVaccin, dozaVaccin, tarifDoza)

Pasul 2

Aici incepe pur si simplu normalizarea.

Procesul de normalizare consta in “spargerea” acestei baza de date in tabele astfel incat informatia gazduita in sistem sa fie minimala. (De ce sa avem un spatiu ocupat de 2Mb cand putem avea 1.5Mb?, nu?)

  • De exemplu mai multe animale pot sa aiba acelasi ingrijitor: nu ar fi mai util ca ingrijitorul la care se face referire sa fie identificat printr-un numar? (nu vom mai avea ceva de genul: animal 1, 10 ani, porc cu ingrijitorul Popescu Ion 0700 000 000 ci vom sti ca ingrijitorul x (x – un numar) este popescu ion si astfel vom rezolva mult mai usor situatiile in care acesta sa zicem is modifica numarul de telefon.
  • Un alt exemplu similar cu cel de sus este faptul ca unui animal ii pot fi facute o serie de vaccinuri. Dintre acestea o parte ii sunt administrate si unui al animal.

Procesul de nomalizare presupune mai multe etape, etape ce face ca Bazei de date normalizate sa ii fie aplicate mai multi algorimti de “simplicare” numiti si FORME NORMALE (NORMAL FORMS).

Continue reading

How to create a vanilla bootable Hackintosh USB

First of all you should know that the latest version of MAC OS X can be ruined only on a Intel PC. There are some kernels that are modded to support AMD architecture but those are not officially supported and in conclusion there could be some bugs while you’re running the system.

Now lets focus our attention on the main idea: building a bootable vanilla usb for your hackintosh. The system that I will demo on is the latest mac os version available from Apple: 10.9 MavericksOS-X-Mavericks-logo

Creating the installer

  1. Prepare your USB as GUID partition map with a HFS+ partition.
  2. SS1_zpsb4475ce9
  3. Mount your Mavericks DMG (Right click on “Install OS X 10.9 Golden Master” then its in /Contents/Shared Support/InstallESD.dmg)
  4. Mount BaseSystem.dmg by typing the following in terminal: open /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg or if you want a simpler way just open the show hidden files app attached and click SHOW. Now you should see the BaseSystem.dmg inside InstallESD.dmg
  5. Restore “OS X Base System” to your USB
  6. SS3_zpsaa1f3901
  7. Navigate to /System/Installation your USB drive Delete the “Packages” link then copy the Packages folder from “OS X Install ESD” to this location.
  8. Use pacifist to extract mach_kernel from /OS X Install ESD/Packages/BaseSystemBinaries.pkg to the root of your USB drive. (Note: This is in the attachment).
  9. Copy essential kexts to /System/Library/Extensions on your USB stick.
  10. Install chameleon to the USB drive (I personally like Enoch – a version of chameleon:
  11. SS4_zps58f52e7b
  12. SS5_zps01e0ed83
  13. Create the extra folder for the USB (copy your old one over – for those how have a pro book 4540s with a 3210i processor you could use the following one:
  14. Inside you extra folder copy the following extensions folder: (this will assure the correct boot of your mac installer)!
  15. Copy your folder of essential software & kexts to your USB stick.


After installing the system use the USB to boot into it and install the required Kexts (Kernel Extensions) and the Chameleon boot loader to be able to boot without USB later on.

Using this method i was able to make the the best vanilla install that could be. For sure this method is comparable with the result of Unibeast software, so please let me know how did this method worked for you or if it doesn’t work i’ll try to provide the correct answers to help you install the OS X on your particular hackinthos.

Get Romanian spell-checking in Mac OS X


As you may know—all too well—Apple’s Mac OS X doesn’t offer native support for Romanian spell checking. Quite an embarrassment.

However, it is possible to install a Romanian spell-check dictionary (with diacritics and all)—in three fairly easy steps—available to all applications using system spell-checking services, like Mail, Pages, Keynote, Safari, iChat etc.1

Romanian Spellcheck in Apple Mac OS X / Corector ortografic pentru limba română în Apple Mac OS X, © Cristian -Kit- Paul, Bucharest, 2010.

Here is how to add system-wide Romanian spell-check dictionary to Mac OS X—a simple step-by-step guide. Continue reading

Physical address extension patch for Windows 8

What does this mean?

It means that if you have an Windows on 32 bits that can normally detect only 4 GB of RAM will detect a larger amount, similar to 64 bits systems.

As the creator states:

This patch allows you to use more than 3/4GB of RAM on an x86 Windows system. Works on Vista, 7, 8, has been tested on Windows Vista SP2, Windows 7 SP0, Windows 7 SP1 and Windows 8 SP0. Instructions and source code included.

There is also another thing that you should be aware before installing this patch:

Before using this patch, make sure you have fully removed any other “RAM patches” you may have used. This patch does NOT enable test signing mode and does NOT add any watermarks.

Note: I do not offer any support for this. If this did not work for you, either:

  • You cannot follow instructions correctly, or
  • You cannot use more than 4GB of physical memory on 32-bit Windows due to hardware/software conflicts.

Download Page

As a conclusion this patch is very useful since there are allot of 32 bits applications and the necessity of switching to a 64 bit operating system is not sustained. Is known that a 32 bit operating system consumes less RAM memory and since is more older it is more stable and more responsive.

Windows 8 – Intel GMA 4500 driver adaptation

Probabil ca toti ati intampinat probleme la incercarea de a istala drivere de windows 7 pe windows 8. Daca in cazul altor drivere se intampla sa functioneze, in cazul driverelor pentru placile grafice intel acest lucru este imposibil.
Am gasit o solutie temporara pe pana cand cei de la intel vor scoate drivere pentru windows 8. Enjoy!

Windows 8 and Intel graphics driver

Edit: I’m surprised that people are still look at this blog post.  It’s a bit outdated (around 8 months), so there is a good chance that you don’t have to do these instructions.  Thanks for all the comments below that offer alternative suggestions.  I would recommend trying these options first:

  • Because Windows 8 is actually coming out very soon many of Intel’s drivers have been made for windows 8.  For example, this guide was for my laptop’s GM45 chipset.  Intel now has drivers for 32-bit and 64-bit windows 8. Always check Intel’s site for official drivers first!
  • Next “Unknown” mentioned that there was no need to mod any files for his Intel 965 Express chipset. This probably dependent on the specific installers for each chipset.  Before modding the files, just try it!  Hopefully you’ll get lucky.
  • Next “Testr” from the comments provide a link to some preedited drivers on windows eightforums.  These drivers are made by people much smarter than I and will most likely work the best for you.  If your chipset is not in that link I still suggest that you search the windows eightforums first.

IF none of that worked for you, here is the old guide. Good luck!:
Well this was something that I was trying to fix for days, so I could finally play a game or two.  In my laptop I have an integrated intel graphics.  To be specific, Mobile Intel(R) 4 Series Express Chipset Family (GM45).  This might work for other drivers they have, but I don’t know.  This guide is specifically made to overcome a obstacle that 64-bit windows have.  32-bit probably won’t have to follow the second half of this guide

So you would think since windows 8 has gone though development into customer preview, Intel would be on top of things and have drivers out… Well, not yet.  Actually windows 8 is a lot like windows 7!  Won’t the 7 drivers just work for 8 (granted not the best, but better than nothing?) Yes they will!  Will the intel 7 drivers nicely install? No they won’t!  So if you need something like OpenGL support for minecraft on windows 8, you’ll need these drivers. I gathered some instructions from the web, but I was running into vague error messages.  I finally figured out what each message meant, and I’m now enjoying my simple games.  Here are 5,10, or 15 easy steps I did:

  1. Download the Windows 7 drivers (zip) for your architecture (x64 or x86) Here is the download page for those having the 4 Series like me:
    4 series (32-bit)
    4 series (x64)
    If you have a different series, go to Intel’s download center and search for your chipset series
  2. Unzip it. (Do not just open the zip file or you could have problems opening, editing, saving, and running the installer!)
  3. Navigate explorer to that folder and go to the subfolder /Graphics/
  4. Find igdlh64.inf.  32bit will probably be named similar.  It’ll be the only .inf (setup information file) in that folder.  Open it withNotepad (Using word or wordpad might corrupt the file due to formatting!).  Find the line that says:
    %Intel%   = IntelGfx, NTamd64.5.1, NTamd64.6.0, NTamd64.6.2 
    ; no install on XP
    ; no install on Win8
    %iCNTG0% = iCNT0, PCI\VEN_8086&DEV_2A42

    Edit that to remove the OS checking. We will deleted everything between 5.1 and no install on Win 8 (everything in red). When you are done it should look something like this

    %Intel%   = IntelGfx, NTamd64
    %iCNTG0% = iCNT0, PCI\VEN_8086&DEV_2A42

    Make sure you also delete .6.0 from from “[IntelGfx.NTamd64.6.0]”. Save that file.

    —If you are 32 bit, this might be the end of the guide for you.  If 32 bit works without any more complication, hurray, reboot and enjoy.  If you are having more problems, continue—

  5. Now here come the tricky part.  I was getting a bland error message that it seems like no-one else was getting.  If I tried to install it just crashes without giving a reason for windows 64-bit.   I looked though the logs and found that it was a signed driver problem…  aka “it won’t install because windows says so” error. So we need to override that.  We are going to have to disable driver enforcement. Some comments below show that EasyBCD does not work, or their is an easier way. I’ll give two sets of instructions:

    Option A:
    The way I like to disable driver enforcement is to use EasyBCD.  It’s free for personal use, so don’t buy it (unless you want to donate).  If you wish to use the other way, skip down to Option B.  Find “Download free for limited, non-commercial use”

  6. Install, and run the program
  7. Go to advanced settings & Make sure windows 8 is selected
  8. Go to the advanced tab & check allow installation of unsigned drivers on 64-bit windows
  9. If you are sure you are an advanced user, click Save settings. Reboot. Skip past Option B below.

    Option B:

  1. Restart your computer.
  2. Alternatively sgryphon suggested instead of hitting F8 many times, before restarting your computer, go to the General – Advanced startup in the Windows 8 settings.  This should restart your computer and bring up the different boot options for windows without needing to press F8.
  3. If you did not use the advance startup, while your computer is booting up, continually press F8 until you get the screen that allows different boot options for windows. You should see “Safe Mode”, “Safe Mode with Networking” and so on.
  4. Find disable driver enforcement, and boot up with that option. See if you get the same error. (I do not know if you have to boot up using F8 every time after installing! Test to see if the driver works after you install if you tried option B (works for joshmertz)!
  5. Finally Go back to the Intel folder and run setup.exe.  When the red box of doom pops up saying it’s unsigned, accept it (you can trust Intel).

    —If your setup was like mine, this might be the end of the guide for you.  If it works without any more complication, hurray, reboot and enjoy.  If you are having more problems, continue—

  6. Still having Problems?  This part didn’t apply to me, but joshmertz had some other problems. Specifically: EasyBCD not disabling driver enforcement, and Setup.exe is not looking in the right spot for MediaSDK.
  7. First thing you want to do is go to C:/intel/logs/IntelGFX.log.  This shows what went wrong during installation.  Scroll down to the bottom.
  8. IF you see this:
    Looking for MediaSDK configuration at
    * config.ini not found
    Reading action file 
    ! Error loading action file

    Then we are having problems with Intel’s setup looking in the wrong spot. I’m not sure why, but this can be solved by copyingsetup.if2setup2.if2 files, and the MediaSDK folder, then pasting them inside the Graphics Folder. Try to install again.

  9. IF you see this:
    Installing C:\Users\JoshMertz\Desktop\Win7Vista_64_151718\Graphics\igdlh64.inf
    INF = C:\Users\JoshMertz\Desktop\Win7Vista_64_151718\Graphics\igdlh64.inf
    Execute command: C:\Users\JoshMertz\Desktop\Win7Vista_64_151718\x64\Drv64.exe 
    -driverinf "C:\Users\JoshMertz\Desktop\Win7Vista_64_151718\Graphics\igdlh64.inf" -flags 20 -keypath "Software\Intel\Difx64"
    ! DriverPackageInstall error 0xE000024B

    Then that’s the driver Enforcement kicking in. If you get this message, I’m not sure why EasyBCD didn’t work for you… sorry. Go back and try step 6 (option B) to see if that fixes the problem

  10. If all else fails, post your log in the comments and we’ll see if we can find a work around!

Congrats. if nothing went wrong, you now have new video drivers.  If something isn’t working (or heaven forbid you computer explodes) write me a comment, and we’ll see what I can do to help.