So I'm having a little self-doubt as to whether or not I am setting up this database I am working on correctly or not. This is the first large-scale database project I have ever worked on, and I'm doing I've been tasked with doing it alone. So you know, no pressure at alllllllll.
This question isn't about whether or not I am setting up my tables correctly. I at least have enough confidence in myself to say I know how to create proper relational database tables, and how to normalize them properly.
What I am concerned with are in facts things like Views, and Stored Procedures.
Quick synopsis of what the project is. I am retrofitting the company database, updating it to a new relational model. I need to set up an entirely new database structure from scratch for all the data, and then alongside the database create a VB.Net program that employees can use to interact with the database in various ways.
You see I've basically set up the database so that the Tables act as where all the data is stored, and the Views act as where all the data is retrieved. I figured that setting it up this way makes it so that it is easier to select data that needs to be shown to people using the .Net app since Views already contain all the proper Joins for all the data. Sure if you need to select just one piece of data from a table, you can do a simple table query, but for large data sets I figured Views were the way to go. Was I correct in thinking this?
And then there are the Stored Procedures. Essentially if the VB.Net project is doing anything variable related for data collecting, I am just setting up a stored procedure within the database to take those variables and work with internal SQL script.
For example, let's say I need to select everything from my PartsData
View that has a specific supplier. Instead of creating a large query string in VB.Net and then passing that String as an SQL Command, I am instead just passing the supplier name as a variable to a 'PartSupplier' Procedure on the database which spits back the information I need.
To me this feels like it just makes more sense to do it this way, as opposed to just constructing long String queries in VB.Net and then throwing them at the database. Part of what isn't helping my confidence in my approach is that my boss seems to think I'm wasting time and being stupid for doing things my way. :\
I know this isn't exactly something anyone can give me a 100% answer on because I know that you can't give me something like that without knowing all the information. But am I on the right track here? Are there some obvious flaws with my logic you can easily see?