Basic Database Design

Mar 27, 2006

Amanda writes "I'm a student currently taking a class working with the SQL database and I'm not doing too well in that class because I'm struggling on some basics. I have worksheets and everything i just need help working on them, and this being and on-line class makes it hard for me to work with my teacher. If someone is willing to work with me one on one through a messaging program or Email that would be great, i can send you the worksheets and we can work it out together."

View 5 Replies


ADVERTISEMENT

Loading Images In A SQL Server Express Database Table At Design Time Using Visual Basic Net Express Editon

Jun 24, 2007

I am new to this type of programming and and have read all articles on adding an image to the database and it seems they all use sql queries to add an image but I want to add an image at design time. I am using Visual Basic 2005. I am also using Visual Basic 2005 Express Edition to try the same thing. I am trying to build a Translator program for english to Brazilian Portuguese and the reason I want to add the images is so that when I translate the word cat from english to Portuguese, I can also show an image of a cat. Can anyone please help me

View 3 Replies View Related

A Basic Design Question

Apr 17, 2007

When I set the relationship between two tables with a one-to-many relationship and I want all records deleted from the many side when a row is deleted from the one side, how should I set the Insert and Update Specs (Delete and Update) CASCADE or NO ACTION?
Then if there is a lookup table on the many side how should it be set?

View 3 Replies View Related

Basic Design Question

Oct 30, 2007

i am a beginner and any response will help me a lot.
i have 20 types of products,each product has about 40 fields, most of them are common fileds for all products, but some of them are unique.
the number of the unique fields of all the product types is 75.
the question:Should i build one products table with 75 fields and leave nulls where a field is not property of a product type?Or should i build a products table for the 30 common fields and a 20 different tables for each product type extra fields?Or just build 20 different tables each product type?
other ideas are welcome
 

View 2 Replies View Related

Basic DB Design Question

Dec 5, 2005

I have decided to build a Football Pool app as a way of teaching myself asp.net with non code-generating tools.  I am stuck on some basic DB design thoughts and would appreciate some feedback.
Right now I have pages that let me input some of the initial data like Users, Teams and Game Schedules.  I need to be able to record whether a user has paid their weekly entrance fee but I don't know which table to store this info even what datatype would be the best solution.
Here is the table design I have so far http://www.insecurepc.com/FootballPoolDBDesign.jpg Before you ask, the users tables would be the asp.net 2.0 mambership ones which are too many to list...
Thoughts please.  TIA
 

View 2 Replies View Related

Table Basic Design

Jan 26, 2005

Hi,

we have records with login.out of employees.
i.e.
this is a set of login/out for an employee for 1 day (but the actual data shows 2 dates )

login 1/1/2005 15:00
logout 1/1/2005 16:00
login 1/1/2005 17:00
logout 1/1/2005 18:00
login 1/1/2005 23:00
logout 1/2/2005 1:00
login 1/2/2005 2:00 <-----------this is the reason why we need a new table called schedules
logout 1/2/2005 3:00 some employee goes over the next day to finish their shift

I think in order to get the proper Start Time and Stop time we need a new table called schedules.

schedules will contain employee work schedules, kindly help me design how to accomplish this.

question is, will it be for each day?

so I'll have 365 record per employee?

help me design the columns

employeeID, startTime,stopTime, workdate -do I need only four?

Thanks.

View 2 Replies View Related

Basic Design To Record Questionaires

Jun 21, 2007

Hi all, this is a really simple application to record results of a questionaiire. Basically, each question can have multiple yes/no type answers.

Any help appreciated. Also going to develop a c# front end.

View 2 Replies View Related

Basic Design Question Re Effective Relationship

Jul 20, 2005

Hi,Probably a very simple question but I'm afraid my experience at this issomewhat limited so...In a database with a many to one relationship, say orders to customers, isit preferable to have an UID for a customer and store this in the orderstable rather than the customer name, for example.CUSTOMERS++++++++++UID: Name: Address: Postcode: etc01 Alpha 12 Acacia Ave HN7YHH02 Beta 23 Acacia Ave HN6YTH03 Gamma 28 Acacia Ave HN7UYHORDERSCustomer Amount dateAlpha 100 20030823Alpha 250 20030824Beta 90 20030825Alpha 800 20030825Gamma 1000 20030826Or is it is better to have:ORDERSCustomer Amount date01 100 2003082301 250 2003082402 90 2003082501 800 2003082503 1000 20030826Assuming that the second option is the best, how far do I go? I can see howit would beof benifit to do this for orders and customers where there may beseveral hundred thousand orders and hundreds of customers, but for examplewould I need to do this for a customer contact database with titles - egeach title having a UID and using this ID in the customer table?Thanks for taking the time to read this. Any advice is gratefully received.Kind thanksChris S

View 4 Replies View Related

DB Design :: Database Design For Matrix Representation

May 13, 2015

I have a scenario like below

Product1
Product2 Product3
Product4 Product5
Product1 1
1 0 0
1
Product2 1
1 0 0
1
Product3 0
0 1 1
0
Product4 0
0 1 1
0
Product5 1
1 0 0
1

How to design tables in SQL Server for the above.

View 2 Replies View Related

Database Design/query Design

Feb 13, 2002

Ok, I'm doing a football database for fixtures and stuff. The problem I am having is that in a fixture, there is both a home, and an away team. The tables as a result are something like this:

-------
Fixture
-------
fix_id
fix_date
fix_played

----
Team
----
tem_id
tem_name

-----------
TeamFixture
-----------
fix_id
tem_id
homeorawayteam
goals

It's not exactly like that, but you get the point. The question is, can I do a fixture query which results in one record per fixture, showing both teams details. The first in a hometeam field and the second in an away team field.

Fixture contains the details about the fixture like date and fixture id and has it been played

Team contains team info like team id, name, associated graphic

TeamFixture is the table which links the fixture to it's home and away team.

TeamFixture exists to prevent a many to many type relationship.

Make sense? Sorry if this turns out to be really easy, just can't get my head around it at the mo!

View 2 Replies View Related

Basic Calculations In A Database

Jan 17, 2007

I am trying to write a small program to keep track of my bank accounts using Visual Basic Express and Sql databases. My database has the usual expected columns in my table - deposit, withdraw and Balance. I am displaying this infor on my form in Datagrid view. My problem is I have no Idea how to get it to to the necessary calculations. I.e. if I enter an amount in the deposit or withdrawel column I want it to automatically update the balance column.

I have no Idea how to do this, where to code it or anything so some help for a newbie (in as simple steps as possible) would be really really appreciated. Since my program is useless without this bit working

Diane

View 7 Replies View Related

Basic About Database Mirroring

Jan 28, 2008



Hi Can Anybody help me what exectly is database mirroring? I am working in a small scale company. we have SQL server 2005 installed for a software used by our staff. Can any body expalin me what is mirrroring? how can i implements to my Database? What are the Basic Requirements? What are the Steps? Plz.. Thanks in advace who ever help me out for this......


View 1 Replies View Related

How To Create Sql Database In Visual Basic

Jan 11, 2007

First i am newbie in vb and Sql server...

Is possible to create and attaching, via vb classic or VBA, a sql
database in this instance:\DVD377-14D9E48CSQLEXPRESS...
I have Sql Express.

Database name: mydatabase
Database Table: mytable

fileds:
fiedl1 text format
fiedl2 text format
fiedl3 text format
fiedl4 date format
fiedl5 number format
fiedl6 text format

View 2 Replies View Related

How To Create Sql Database In Visual Basic

Jan 11, 2007

First i am newbie in vb and Sql server...

Is possible to create and attaching, via vb classic or VBA, a sql
database in this instance:\DVD377-14D9E48CSQLEXPRESS...
I have Sql Express(msde).

Database name: mydatabase
Database Table: mytable

fileds:
fiedl1 text format
fiedl2 text format
fiedl3 text format
fiedl4 date format
fiedl5 number format
fiedl6 text format

View 3 Replies View Related

SQL Database - Hit Counter - Using Visual Basic In VWD

Apr 21, 2008

Let me get VERY specific.
This site has 40+ pages Using VWD 2008 (Studio 2008)
I have created in local IIS7 (129.0.0.2) http://cumc.lcl
Navigation.master, Web.config and Web.sitemap alll are structured
And all 40+ pages have been built.
NOW I added (using VWD) a sql server database named pagedata.mdf
With a table named: pages
and fields:
PageID - Primary Key (auto numbered)
pagename - nchar(30) exmp Default
hitcount - numeric(18,0)
createdate - nchar(15) exmp 04/18/2008
updated - nchar(15) similar to createdate
hitdate - nchar(15) similar to createdate
bottom of each page is to show 99999 visitors
and under that is to be Updated on mm/dd/yyyy
On pageload should accomplish the following increment the hitcount
field and save it and display it in HitLabel.text
Set UpdateLabel.text to updated field
Save the date the page was hit in hitdate field. (will only show when last hit)

The "tester.aspx" page now has:


<%@ Page Language="VB" MasterPageFile="~/Navigation.master" Title="tester" %>

<script runat="server">

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

End Sub
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<p align="center">This page is for various tests<br />and will NOT be site mapped.</p>
<p align="center"></p>
<p align="center">

Can this SqlDataSource be moved into Sub Page_load above?
How do I extract, process and save the Hit and Date data
for each individual page referenced by pagename field?
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStringsageConnect %>"
SelectCommand="SELECT * FROM [main] WHERE ([pagename] = @pagename)">
<SelectParameters>
<asp:QueryStringParameter Name="pagename" QueryStringField="thispage"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</p>
<p align="center">
<asp:Label ID="HitLabel" runat="server"></asp:Label>
&nbsp; Visitors<br />
Updated on&nbsp; <asp:Label ID="UpdateLabel" runat="server"></asp:Label>
</p>
</asp:Content>

View 2 Replies View Related

Create Sql Database From Txt File Via Visual Basic (6.0)

Jun 1, 2007

Admit have a txt file similar:

filed1 filed2
aaaaaaaaaa bbbbbbbbbbbbbb
cccccccccccc dddddddddddddd
.............
yyyyyyyyyy zzzzzzzzzzzzzz

How to create VIA VISUAL BASIC (ADO or DAO) a new SQL Server databse?

View 2 Replies View Related

Create Database With Visual Basic (Urgent)

Aug 22, 2006

can i run such a transact SQL script with VB

use master
go
create database Ayhandeneme
on (Name=AyhanDeneme_Dat, FileName='c:ayhandeneme.mdf')
go

View 6 Replies View Related

Visual Basic With SQL-database Connection And Windows XP

Dec 21, 2005

When you work with Visual Basic 2005 Express Edition on windows XP, and if your application contains references to SQL-databases, I have discovered that it is important that all identities be logged off before you open the particular identity where you want to work on your Visual Basic project. I have earlier assumed that it was only possible to work with Visual Basic on one identity, the one where the version was registered.
 
This assumption was not quite correct. Actually, you may run Visual Basic applications with SQL-references on all identities on XP, provided that no other identities that are using the SQL-server are currently running.
 
For example, suppose you start your computer and log on the identity James. Then you switch identity, but you actually don't log off James. Then you log on the John identity. There you discover that it is impossible to create a new SQL-database in Visual Basic's Data-connections view. An error message appears. Why is that? It is because the SQL-server is busy on the James-identity. To solve this problem you want to log off the John identity, don't just switch. Then log on the James identity again, and log off properly. All identities should now be logged off. Now you may log on the John identity again, and it is now possible to create an SQL database.
 
Concerning deploying applications for XP. This issue is similar to the one I just described. You cannot run the installation-file successfully on one identity if the SQL-sever is busy on another identity. You want to log off all identities before logging on the identity where you want to install the application. Same thing when you want to run the deployed application.
 
Question. Does this limitation exist only in the express-editions of Visual Studio 2005 as a drag on free-ware, or is it prevalent in commercial editions as well?  I would like to know a little more about this before purchasing the standard or professional edition of Visual Studio 2005.
 
Best Regards
Ziper

View 7 Replies View Related

Can I Upload A Database Using Visual Basic 05 Express Edition ?

Feb 17, 2007

Hi,
Can I upload a database using visual basic 05 express edition ? or do I have to download sql server ?
Thanks

View 8 Replies View Related

What Are The Basic Processes For Maintaining An SQL SERVER 2005 Database

Mar 24, 2008

What are the basic processes for maintaining an SQL SERVER 2005 Database?
Is there a top ten list of things you should do periodically to all SQL SERVER 2005 databases?

View 2 Replies View Related

How To Backup My Database Using Visual Basic Express 2008

Mar 28, 2008

I have an application written with Visual Basic Express 2008, which has a Sql Server Express Compact database incorporated into the application. I've been trying to follow the suggestions listed on several threads on how to backup up my database and have not gotten very far. The following code seems to be in most threads.


Dim dbstring = "Data Source=.SQLExpress;Integrated Security=true;User Instance=true;AttachDBFilename=|DataDirectory|ImmuLogDataBase.sdf"

Dim sqlconn As New SqlClient.SqlConnection(dbstring)

sqlconn.Open()


When run, this code returns the following error at the sqlconn.Open() command.

An attempt to attach an auto-named database for file G:ImmuLogImmuLoginDebugImmuLogDataBase.sdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

My solution is saved on a flash drive which I take between home and work. I'm hoping that that isn't the issue. I believe that Visual Basic loads the database when it starts and it is already open when this code is run. Is there a way to access this open database and run a backup procedure on it from within VB express 2008?

I'm new to this and self taught so explain everything in detail. Thanks for your help.
Bruce

View 3 Replies View Related

How Can I Connect A Sql Server Database To Visual Basic 2005 Express

Oct 8, 2007

Hi, i am new to sql server and visual basic, i need to connect my sql server database to a new application i've developed in visual basic 2005 express. Can any one tell me the steps to do this. Many Thanks.

View 2 Replies View Related

I Cannot Create A Brand New MDF (sql Server Database) With Visual Basic 2005

Apr 20, 2007

Hi everybody:

I go to Server Explorer, right click on Data Connection, input the server name (that is, my own computer), give a new name to the database to create, and then inevitably get the error window saying:

An error occurred while establishing a connection to the server. When connectiong to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connections. (Provider: Named Pipes Provider, error 40, could not open a conection to SQL Server)

So, how to open a connection to SQL server 2005? I looked in the msdn but found absolutely nothing.

Please help

Paolo

View 5 Replies View Related

How Can I Copy The Content Of MS Access Table In Database SQL Using Visual Studio Basic

Sep 26, 2007

Code Snippet

Hi there,

I'm struggeling for more than a week now with this problem, without a finding the solution.

I have two databases, MS Access and SQL Server 2005 Express Edition

Using a procedure in Visual Studio i would like to copy all the records from one table in MS Access into an existing table in SQL Server (the tables have the same name and the same layout)

I tried to prepare one Dataset to copy from Access into SQL Server but when i run the command 'DaSQL.Update(DsSQL, "Tabella") nothing happens (not even an exeption has been raised), looking during debug, the DataSet seems filled though...

Please could anyone explain what's wrong and / or is there a more quicker way to copy data from a table to another?


Note i woul have as a final goal to get data from an AS400 database by ODBC, manage it, and put it on SQL Server for a 'data mining' scope (eliminating the use of MS Access, not suited for FE-BE).

the procedure goes like this;


' Create a connection to the MS Access Database
Dim connectionToAccess As New OleDbConnection(DBConnectionAccString)
strsql = "SELECT * FROM [TABELLA]"
connectionToAccess.Open()
Dim DaAccess As New OleDbDataAdapter(strsql, connectionToAccess)

Dim DsAccess As New DataSet("ACCESS")
DaAccess.FillSchema(DsAccess, SchemaType.Source, "Tabella")
DaAccess.Fill(DsAccess, "Tabella")

' Create a connection to the SQL Database
Dim connectionToSQL As New SqlConnection(DBConnectionSQLString)
connectionToSQL.Open()
Dim DaSQL As New SqlDataAdapter(strsql, connectionToSQL)

Dim DsSQL As New DataSet("SQL")
DaSQL.FillSchema(DsSQL, SchemaType.Source, "Tabella")
DaSQL.Fill(DsAccess, "Tabella")

DaSQL.Update(DsSQL, "Tabella")

Note I tried also the following, withou a result;


DsSQL = DsAccess.Copy
DaSQL.Update(DsSQL, "Tabella")

Please is there someone who could respond !!???

View 6 Replies View Related

DB Design :: Buffer Database - Insert Information From Partners Then Make Update To Main Database

Oct 29, 2015

I actually work in an organisation and we have to find a solution about the data consistancy in the database. our partners use to send details to the organisation and inserted directly in the database, so we want to create a new database as a buffer database to insert informations from the partners then make an update to the main database. is there a better solution instead of that?

View 6 Replies View Related

Cache Database Structure (How To Detect If Database-design Has Changed..)

Feb 24, 2006

Hello everyone,I have a webcontrol that uses database-structures alot, it uses the system tables in SQL to read column information from tables. To ease the load of the SQL server I have a property that stores this information in a cache and everything works fine.I am doing some research to find if there are anyway to get information from the SQL server that the structure from a table has changed.I want to know if a column or table has changed any values, like datatype, name, properties, etc.Any suggestions out there ?!

View 3 Replies View Related

Designing A Database Within A Database... Design Question Storing Data...

Jul 23, 2005

I have a system that basically stores a database within a database (I'msure lots have you have done this before in some form or another).At the end of the day, I'm storing the actual data generically in acolumn of type nvarchar(4000), but I want to add support for unlimitedtext. I want to do this in a smart fashion. Right now I am leaningtowards putting 2 nullable Value fields:ValueLong ntext nullableValueShort nvarchar(4000) nullableand dynamically storing the info in one or the other depending on thesize. ASP.NET does this exact very thing in it's Session State model;look at the ASPStateTempSessions table. This table has both aSessionItemShort of type varbinary (7000) and a SessionItemLong of typeImage.My question is, is it better to user varbinary (7000) and Image? I'mthinking maybe I should go down this path, simply because ASP.NET does,but I don't really know why. Does anyone know what would be the benifitof using varbinary and Image datatypes? If it's just to allow saving ofbinary data, then I don't really need that right now (and I don't thinkASP.NET does either). Are there any other reasons?thanks,dave

View 7 Replies View Related

Knowledgeable Yet Simple Book For Database Modelling Or Database Design

Aug 16, 2007

Hi All,Can u please suggest me some books for relational database design ordatabase modelling(Knowledgeable yet simple) i.e. from which we couldlearn database relationships(one to many,many to oneetc.....),building ER diagrams,proper usage of ER diagrams in ourdatabase(Primary key foreign key relations),designing smallmodules,relating tables and everything that relates about databasedesign....Coz I think database design is the crucial part of databaseand we must know the design part very first before starting up withdatabases.....Thanks and very grateful to all of you....Vikas

View 3 Replies View Related

Database Design- Referencing Multiple Database

Sep 27, 2007

Hi All,
I am designing database where few of the master tables will reside in different database or in case different server. Scenario is
Server "A" with Database "A" may host the "Accounts" table.
Server "B" with Database "B" may host the "Product" table.
I am designing database "Project" which will hosted in Server "A".
My application requires this master tables [readonly access] as data inserted in my application refers this tables. Also there are reports to be generated which refer this tables.
How do i design my database and sql queries?
I am thinking of approach of having equivalent tables created in my database and writing service which keep tables in my database in sync. This will ensure good perfomance during transaction and reports as they will need to refer this table locally as opposed to different database or different server.

Any thoughts on above approach?? or any better/standard way for such scenarios ?

Thanks in Advance. Your inputs will be of great help.

View 14 Replies View Related

Database Design - Multiple Vs. Single Database

Apr 12, 2007

Hello:

My client has a db with the following structure:

Online US Searchable Map of the 50 US States. Users search criteria is the following: Query records by selecting state, county, then record. Each County table has 10-20 tables. All databases combined = 500MB and TLogs = 100MB.

How would you re-design a relational DB where users could query data by state-county-record. Currenty the DB's are created by the County of each state which creates hundreds of DB's in SQLServer with no realtionship to each US state. What would be the best design to ensure good performance, data integrity and maintenance? Would you create 1 DB with all 50 states, create 4 DB's and divide by region(N,S,E,W), 50 DB's of each state or leave it as is with each county it's on DB? Any suggestions would be appreciated.

thx
rob

View 7 Replies View Related

Database Design???

Oct 20, 2006

Hello, I am designing my first database with 5 tables for a demo project and am not sure if it works. an example below.2 of the many things I want visitors to the site to do is find a company by the industry sector they belong to,..andwhat sort of service or products they can supply. For instance a Employment agency maybe under professional services  Table 1 Customer Customer_ID = primary key,,,, Sector_ID = Foreign keyComapany Name, Address, Phone, Postcode etcTabel 2 Industry SectorsSector_ID = primary key,,,,Customer_ID= foreign key banking, Education,Prof Services, etc  Table 3  Trading ActivityTrading_ID = primary key,,,,Sector_ID =  Foreign key, Products_ID= FkEmployment Agent, School, Lawyer etcTable 4 ProductsProducts_ID = primary key,,,,Trading_ID = foreign keySupply frozen foods, transport services, sports goods, etc  Table 5 Account Account_ID = primary key,,,,Customer_ID = foreign keyAccount Name, Credit Limit, Payment Terms, Open date, Account contact etc  One big point of confusion is, can I have the Customer_ID from the principal Customers tablein every table as a foreign key or must the tables be chained together one after the other as such. Advice appreciatedThanks 

View 1 Replies View Related

Database Design

Apr 10, 2007

Hi,
 I need a hand with designing a database.
 I am collecting results from a survey which has the following questions:
Call ref? How did you place your support call?  Were you satisfied with the amount of time you had to wait until getting acknowledgement of the support call placed? 1 = very satisfied and 10 = very unsatisfied.  How happy were you with the customer service you received upon placing the support call?   1 = very unhappy and 10 = very happy.How satisfied were you with the amount of time you had to wait until you heard from an engineer? 1 = very satisfied and 10 = very unsatisfied.   How satisfied were you with the time taken to get your problem/query resolved? 1 = very satisfied and 10 = very unsatisfied  Did you feel the engineer had enough knowledge to deal with your call? 1 = very good and 10 = not very good  Overall how satisfied were you with the support call placed? 1 = very satisfied and 10 = very unsatisfiedIs there anything we can do to improve the quality of the support and service you received?
I want to store this in a database.  Obviously I want to use best practice for design, normalisation etc.  The stumbling block I am coming accross is the fact that each question has a number and each question has a score from 1 to 10 and storing this in the database.  Any help appreciated!
Thanks
Andrew 
 

View 9 Replies View Related

Database Design

Apr 26, 2007

I am creating database tables for company testimonials.  Database columns: name, position, companyname, comment, service we provided. 
My question is that for each company - may have a multitude of different services from us, and different people with different positions in the same company may make comments.
What is best practice for putting this db structure together?
Thanks
Andrew

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved