August 22, 2005 at 1:58 pm
BTW, I'm sorry, my english is not the best. Sometimes it's hard to type out an english sentence and make it sound comprehensive to a native english speaker.
August 22, 2005 at 2:07 pm
Your english is fine, but you're design is wrong, by a lot and I don't have time/want to redo it and then rebuild the proc and then the calling code. I'm sorry but you need a teacher or a real programmer to finish this.
August 22, 2005 at 2:12 pm
wow...you know how to make a girl cry...
Anyway, could you give me a hint as to why my design is all wrong? Is it the design of the ASP? The tables?
August 22, 2005 at 2:26 pm
The id of all the tables are nullable which means you don't even have a clustered index, also they should be identity (nobody starts that discussion again here please). Also you have no foreign keys to link the data together so you just have a pile of useless data as is. Also when you see ColName1, ColName2... you need to put that in another table. That's just to give you a small idea.
How much formation do you have in system design??
August 22, 2005 at 2:39 pm
oh dear - what a mess....magyar...i'm afraid all this can be traced back to when you asked:
As far as table structure goes, I have 5 tables: School, Students, Professors, Buildings, Computers. Each table will have a column titled UniqueId that unifies the data across the 5 tables.
Even if I do somehow manage to write the stored procedure, how do I handle to uniqueid? How do I link all the tables together?
..the response was...
Insert into....
err check goes here
--that gives you the id of the last insert in the proc, then you can use that variable in another insert.
SET @IdVar = Scope_Identity()...
when remi, noel etc. gave you the solution they just took you at your word - that you needed a unique id that you were going to use to link all the tables together....not realizing the basic flaw of having all these unlinked tables....and that the unique id you were creating in one table really had no bearing on the others....
you would really have to go back to redesigning your tables first before attempting anything else otherwise the problems can only get compounded from here on...i'm stuck with crappy legacy databases and believe me - they're almost unworkable with...will take less time to tear it down and rebuild than to twist and wring it's flawed neck till it delivers results that you want....
**ASCII stupid question, get a stupid ANSI !!!**
August 22, 2005 at 2:45 pm
I don't want to push the pain any further, but if you don't have relations, the system is just behond repair.
August 22, 2005 at 3:13 pm
Thanks guys...
So should I just redesign using only one table? I can't change the form, because that is the info the people at school want and need.
I just thought it would be logical to break down the data into tables like all the building info in one table, all the school info in another, etc....
I thought the purpose of relational databases was to break down the data into tables.
I really can't just cancel this project. I was so so so close, and I've learned so much.
This is only a web app for a few people. It's not like it's a business solution that is mission critical or anything.
Thank you, M
August 22, 2005 at 3:36 pm
magyar - what you really need to do is to identify each of the entities...eg: you seem to have - school, college, attorney, physician, claimant, center, employer, building, rehab..(wow)....identify how they are all "linked to each other" - for only you know how they are all related......
You do have to break down (normalize) the data but not based on the forms you have....you need to break them down based on how each of them relates to the other...I know I'm not explaining very well but the bottom line is - no - you do not redesign using just one table....it'll have to be all of them and more...- you'll have to shuffle columns between them....the best way to go about this would be to first read up on normalization...besides, mission critical or not...this is the best opportunity you have to learn...you can start small so you can grasp the concepts in digestible bites and then go on....regardless of its' purpose, a well-designed database is a well-designed database is a well-designed database......
**ASCII stupid question, get a stupid ANSI !!!**
August 22, 2005 at 3:58 pm
magyar...while you are reading up on normalization basics, why don't you start another thread....this time ask for help with the database design...identify all the different entities you have, how they are related, how they are going to be queried (for you're not going to just stuff the data in but also query them either individually or in different combinations based on user requirements...) -
using someone's suggestions would at least give you a starting point...and pave the way for the rest of the design!
**ASCII stupid question, get a stupid ANSI !!!**
August 22, 2005 at 6:16 pm
Mgyar, sushila is right on the money. A new Thread starting with building your tables is the way to go. Once you have established the tables and the relationships building your queries will be much easier.
Sushila, nice to see you are calmed down and only wringing flawed necks. Oh and the things you said when I wanted to KILL tables.
Mike
August 23, 2005 at 9:06 am
LOL...mike...did you want to KILL tables at one time ?! don't really remember (link me a link..."find me a find")...
it's difficult to remember anything unless you're gifted with remi's grey cells, speed, comprehension powers etc...for me the posts are starting to blur into each other..
ps:just realized...i've always called remi the "resident genius"...and his name r.g could be "acrosticised" (sorry - can't think of a better word) to just that..henceforth he shall be referred to as rg - to be used interchangeably of course...
**ASCII stupid question, get a stupid ANSI !!!**
August 23, 2005 at 9:13 am
Is REMI a computer? "his" answers seem so quick and concise, it's like it's coming from a computer. If he really is human, I hope he makes $$$.
August 23, 2005 at 9:18 am
oh magyar...didn't you know...yes, of course..he's a computer! did you think he's made of flesh and blood ?!
he's actually been planted (think he's a prototype and a darn good one) by the site-owners of SSC to fool people into thinking that there's a "live person" resolving the worlds' problems..!!!!!
**ASCII stupid question, get a stupid ANSI !!!**
August 23, 2005 at 9:24 am
Yup, but unfortunately I can't give you confidence so obviously my makers didn't make me perfect, yet!!!!
August 23, 2005 at 9:32 am
my makers didn't make me perfect, yet.....OMG - do I actually detect a touch of humility in that statement...how totally out of character
rg - this will send you skyrocketing into a mood exhilaration (if machines could experience it, ie..)..this is about as perfect as you'll ever get...SSC is getting ready to break the mold last i heard...
**ASCII stupid question, get a stupid ANSI !!!**
Viewing 15 posts - 151 through 165 (of 167 total)
You must be logged in to reply to this topic. Login to reply