Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Need Help - Normalized Data

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.

-Chad

http://www.clrsoft.com

Software built for the Common Language Runtime.
Go to Top of Page

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.ColumnC
FROM Table1 T1
INNER JOIN Table2 T2 ON T1.Column1 = T2.Column1
WHERE T2.ColumnB = 0

I 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
Go to Top of Page

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 User

DesignView
user_id user_pwd / - Unique information to each of 16 tables
entered_by |
entered_date |
updated_by | - Log Tracking fields wrapped into each
updated_date | Table to track changes


When I insert new information to a flat table, it is
Select Insert * From [My Table]
Add rs.new

The 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

Go to Top of Page

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
Go to Top of Page

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
Go to Top of Page

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
Go to Top of Page

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.
Go to Top of Page
   

- Advertisement -