Full Stack Developer – The Datastore

Git  Code

So, I keep hearing the word ‘Full Stack Developer’ thrown around like many other terms these days. I have generally accepted that this means that if an individual is a full stack developer, he or she can create a complete application. More specifically, create and maintain the different sections of the application. Given that I spend a lot of time with web apps, in the Microsoft .NET stack, this means being able to take (or create) requirements and turn them into the following:

  • Front End – For a web application, this is generally the Cascading Style Sheets (CSS), Client interactions (i.e. JavaScript) and and server hosting code (i.e. Model View Controller (MVC) or whatever particular server host you are using).
  • Back End – For a web application, this is the Application Programmable Interface (API) that provides any needed Front End functionality. In my stack, this equates with a Web API (successor to the Windows Communication Foundation (WCF)) that handles any Front End calls.
  • Data Store – This can literally be anything. Traditionally, I have used relational databases because they are usually all you need for any average sized web application.

So, to explore my concept of a ‘Full Stack Developer’, I can going to create a relatively simple web application. However, I am going to start at the back end and work my way forward.  Once this is done, there will be another part of the data store…the ‘data layer’ which is the code that interacts with the database.

For this web application’s data store, I have decided to use my old faithful companion SQL Server. This application will be a list of places with details about each place. To create the data store:

  • Create database

db1

  • Create query window so we can start creating our database objects

db2

  • Create Schema

db3-createschema

  • Create locations table

db4-createtable1

Note:
1) Notice the []’s around location. It is a way to use reserved words as table or variable names.
2) created/createdBy and modified/modifiedBy columns. These are good things to do for traceability. If used properly, you will be able to tell who and when a record was created AND updated. Priceless when trying to perform data surgery on a fragmented or corrupt database (trust me!!!).

  • Create locations table detail

db5-createtable2

  • Set Primary Key

db6-createprimarykey

NOTE: You can do this with a script, but I find it easier to do some things through the designer.

  • Set Foreign Key (done by dragging primary key from top table to detail table)

db7-createforiegnkey

  • Insert some data into locations table

insertdata

  • Insert some data into locationDetail table

insertdata2

  • Select data

select

Now we have a data store that we can write the access layer for.

Stay tuned!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s