Friday, 23 December 2016

Kindson Write on Introduction to Databases for Beginners

Introduction to Databases for Beginners
In this presentation, you will learn the basics of how databases work and how to create and manage databases I Microsoft Access. You will learn how to write SQL Queries including
  • SELECT Queries
  • INSERT Queries
  • UPDATE Queries
  • DELETE Queries
You will also learn how to Create Primary Key and Foreign Key as well as how to create relationships between the two tables
What you will need.
  • Microsoft Access
  • Basic Computer literacy
  • Knowledge of Windows (the demo is done on windows)

Steps to Follow
  • Open Microsoft Access
  • Create a database and give it a name
  • Create a table and rename it to tblStudents. This table would hold the student information
  • Create a second table and rename it to tblFaculties. This table would hold information about the faculties.
  • Create a Primary Key RegistrationNumber in the tblStudents table
  • Create a Primary Key FacultyCode in the tblFaculties table
  • Add three records to each of the table
  • Add a foreign key FacultyCode to the tblStudents table. 
  • Create a relationship between the two tables using the FacultyCode Foreign key. To do that, follow the instructions below
    • Click on Database Tools tab in the Ribbon
    • Click on the Create and choose relationships
    • Select the two tables in the dialog box that appears and click on ADD
    • Close the dialog box
    • Drag the Primary Key column (FacultyCode) from the tblFaculties table to the corresponding Foreign key in the tblStudents table 
    • Click ok in the dialog box that appears
  • If you have successfully created the relationship, then open the tblFaculties table and make sure that the relationships is properly created

I hope you have learned how to create databases as a beginner. You can leave a comment to let me know how helpful this was to you

How to Write Store Procedures in SQL Server 2008

How to Write Store Procedures in SQL Server
In this video, Kindson The Tech Pro explains how to write stored procedures in SQL Server in few minutes.
Personally I could not believe it when I learned how to write stored procedures in SQL Server. I was so easy to learn. Sometimes even  news DBAs find it difficult to get a starting point in writing stored procedure.
Once thing you need to remember is that stored procedures are simply sql queries that have been saved for resuse.
Items you would require include
  • SQL Server Management Studio
  • Some data to use for the test.
  • Some knowledge of SQL Queries
So carefully follow the instructions below:
  • Open SQL Server 2008. SQL Server 2008 R2, 2005 or 2014 would also work. This presentation is made using SQL Server 2008 R@
  • Import the data you want to use into SQL Server ( Tasks – Import)
  • Expand the database node
  • Expand the Programability node
  • Right-click on the Stored Procedures node and click on New Stored Procedure
  • Erase Everything that appears so that you will have a bland space.
  • Enter the code below:
CREATE Stored procedure GetMembers
AS
SELECT * FROM tblMembers
  • Click on the execute button on the toolbar to execute the stored procedure. (this assumes that you have a table named tblMembers)

How to Modify and Existing Stored Procedure
  • Expand the Stored Procedure node
  • Right-click on the Stored Procedure you want to alter
  • Click on Modify( the Second item in the context menu). This opens the stored-procedure window
  • Go ahead to make the needed modification an click on execute to save the changes.

To Create a Parameterized Stored Procedure, use the syntax below
CREATE Stored procedure GetMembers
@Firstname VARCHAR(50)
AS
SELECT * FROM tblMembers WHERE Firstname = @Firstname


Thank you for reading. If you have any issued, do leave a comment below.

Friday, 23 September 2016

Mum Died on 11th July 2015


I’m making this post with tears as I remember the day mum died, 11th of July 2015. It was a cold day as I was working to clean up my room when I received a call from my elder brother, Mr Osondu Munonye. He insisted that  I need to come home immediately.
After trying to find out what the issue was, he finally told me ‘mma ayi anwugo‘ in Igbo which means Mum has died.
At that moment I knew those three words were completely life-changing as i felt intensely an emotional pain deep inside me and I just felt that the world has come to a complete stop.
I would provide more update later…