| Author |
Topic |
|
edb2003
Yak Posting Veteran
66 Posts |
Posted - 2003-08-15 : 15:16:13
|
| Hello everyone, I have built my first Normalized Database and I was wondering where I can get information about creating Stored Procedures on Updating, Editing and TimeStamping information into these several tables I have made. Every table is being connected by a Primary key to the master table.Please help - I am new to Normalized Data - have come from a flat file background in SQL and need to crash into this over the weekend to build an ASP.Net Project which I have already built the Font-End UI.I appreciate your help :)Happy Day,Ed |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2003-08-15 : 15:28:15
|
| I would say start with Books Online.-Chadhttp://www.clrsoft.comSoftware built for the Common Language Runtime. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-15 : 15:35:53
|
| You need to learn how to join tables together. Such as:SELECT T1.ColumnA, T2.ColumnCFROM Table1 T1INNER JOIN Table2 T2 ON T1.Column1 = T2.Column1WHERE T2.ColumnB = 0I doubt that you will be able to pick this up over the weekend.I would start with Books Online as Chad mentions and also pick up a good T-SQL book. See the book sections here for examples.Tara |
 |
|
|
edb2003
Yak Posting Veteran
66 Posts |
Posted - 2003-08-15 : 17:07:28
|
| Thank you for your input Tara and Chad, I have played with inner joins with a field driven application but not a record driven application. Here is what I have.A masterDatabase with 16 tables outside of it. Each table has an ID linked to the Master Database by ID. The tables outside of the master database have the following information (Based on 1 of 16 tables)TableName UserDesignView user_id user_pwd / - Unique information to each of 16 tablesentered_by |entered_date |updated_by | - Log Tracking fields wrapped into eachupdated_date | Table to track changesWhen I insert new information to a flat table, it is Select Insert * From [My Table]Add rs.newThe above select statement would not work in my .net app but probably a select Insert to a stored procedure. If so, and based on my ID driven tables, how should I approach this?I have a book on Transact SQL by William C. Amo but it does not show many examples. I will look at Northwind this weekend unless I have a better record driven example to work with.Thanks bunches for your help :)Ed |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-15 : 17:12:23
|
| Could you provide the DDL (CREATE TABLE statements) for a few of your tables and some sample data (INSERT INTO statements)? I am just not understanding what you are describing. I do not know what you mean by field driven vs. record driven application.Tara |
 |
|
|
edb2003
Yak Posting Veteran
66 Posts |
Posted - 2003-08-15 : 17:34:38
|
| I can send you a backup SQL Database and you can see what I am doing. (1.5 meg with no records yet)It is not field driven. A field driven database pulls information by fields in a table. My project is a relational database that is pulling information from various tables.Please e-mail me at inevitabi1ity@hotmail.com and I can send you my SQL backup. I have also created a diagram too :).I appreciate your help :) ... sorry for the new thread ... bad me :(Happy Day,Ed |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-15 : 17:42:13
|
| I really don't want a SQL backup. CREATE TABLE and INSERT INTO statements is what is preferred here. I also don't know what this means:"It is not field driven. A field driven database pulls information by fields in a table. My project is a relational database that is pulling information from various tables."Relational databases pull data from fields that are in tables.Tara |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-08-15 : 19:54:34
|
| If you want to be absolutely precise, they are COLUMNS, not fields. And they are ROWS, not records. |
 |
|
|
|