DB/Reporting :: Database Design Quandary Modelling 'substitutions' Or 'equivalency' Of Records

Jan 14, 2009

I've got a large and complex database system that is about to get even more complex, and I'm having trouble coming up with a reasonable way to model the new requirements so as to minimize the performance hit.For simplicity's sake, I'm going to use the example of certification exams, although it's not a perfect analogy for my system. So we have the following tables:

- Person
- Certification
- Exam
- Certification_Exams (join table indicating which exams are required per cert)
- Person_Exams (join table indicating which exams a person has taken)

Given that model, we can easily show that Certification A requires Exam 1, and Certification B requires Exam 2 and Exam 3.We can also determine whether a person is certified by checking Person_Exams to see if they have passed all exams required for the certification we're querying. (Note that we are not directly storing certifications for a person; these must be derived. That's one of the areas where the cert exam analogy doesn't quite match my real-life scenario, so please accept that there's a good business reason for it.In my world, the cert requirements are going to change frequently, so a person might get suddenly "un-certified.")Now enter the new requirement: We now need to be able to indicate that Certification A could be satisfied by either Exam 1 or Exam 4.And furthermore, Certification B always requires Exam 2 but also requires either Exam 3 or the combination of Exams 5, 6, and 7.I've come up with a couple different approaches so far, but the subsequent queries to be able to tell whether someone meets the criteria for a given certification are then incredibly complex.

View 11 Replies


ADVERTISEMENT

DB/Reporting :: Moving Through Database Records?

Feb 2, 2009

I am a high school student and i am teaching myself VB, C# and C++... it is a slow process containing mainly trial and error, looking up things online, and when the time is right asking assistance from people who know more then I.

I am currently creating a VB program that creates a database of questions, and the same or separate database. using them questions it can initiate a quiz that will save results in a different database for each student. I am having difficulties getting the code right for reading the databases, and getting it to move to the next portion of the database for each question... a little more info:

Question # = Primary key (there will not be more then 1 of the same # problem)
Question Type = i am using different integers right now to specify if the question is a T/F, Multiple Choice, Open info Et Cetra.... Question Answer = Correct answer Alt answer (x3) = option to add other answers for multiple choice problems...

I don't know exactly how to get it to read a problem and when clicking a next button on a form to have it go to the next question in the database..

View 3 Replies

Design A Datagrid That Displays Records?

Apr 3, 2012

How can I design a datagrid that displays records and when one record is double-clicked, you can edit that record or when the datagrid record is double-clicked you can view the past history of that particular record in detail?

If you can view the "chart of accounts" in QuickBooks, then you will understand what I mean.

View 4 Replies

DB/Reporting :: Relation DB Design?

Apr 21, 2010

I am designing a system for our sales team to enter their sales expenses. I have designed an input form and need some advise on what exactly I should store in the expenses table VS lookup from the employee table.

First, the form has a text box where the user must enter their EmployeeID. Management asked for a text box VS a combo box because they do not want users looking at each others expenses. The form has a search feature where by after you enter your employee number, it will look for an existing expense ticket first before allowing you to create a new one. Anyway, here are some of the decisions I have to make.

When the user enters their employee number, I would like to display their employee name. The EmployeeID is saved in the Expense table but should I also store the name in the expsense table? If I do save it, it's duplication of data, if I do not, I have to look it up each time the record is loaded. But is there a point storing the name long term? Does this qualify as related data? If I was to perform some reporting, could this cause a problem if an employee changes their name etc.

The expense data is spread over 2 tables, the first for the header details including employeeID, expense date and Expense ID etc. The second table contains the expense lines information. Amount, customer, category etc. My next question is when the employee chooses an expense category, there is an associated general Ledger code with that category. Again, the expense category data is stored in a table. When the user chooses the expense category, should I store the categoryID or store the values associated with the ID (GLAcct, CategoryDescription etc.) Does this qualify as related data or should lookup values always be duplicated in the master table? It is possible that over time, the GL accounts associated with the Expense categories could change. So for accuracy purposes, should they be stored in the expense lines table?

View 2 Replies

Get Hits On Searches No Matches Have Answered Quandary?

Mar 19, 2009

I have searched the forums and although i get hits on my searches no matches have answered my quandary. I am using visual studio 2008

So to the question: I have 10 label's named label1, label2 label3 etc. and i have a dataset with 2 fields and 10 rows (2x10) i would like to create a for loop like the following:

for x = 1 to 10
label(x) = ds.row(x).field(0)
next

View 3 Replies

Regular Expressions - Conditional Substitutions When Rebuilding A String

Nov 25, 2011

Just wondering if its possible in VB.NET RegEx's if you can do conditional substitutions when rebuilding a string, in the sense that extra characters can be inserted if missing. I offer this bank account example, were we're trying to standardize a bank account into the format XX-XXXX-XXXXXXX-XXX, note the 3 XXX's in the suffix

[Code]...

View 7 Replies

DB/Reporting :: Created Columns For The Datagridview At Design Time

Mar 5, 2009

Am using VB.net 2005, and I've created columns for the datagridview at design time. But when I run the code the fill method of the DataAdapter, the columns I created are not filled with data, but automatically generated columns appear. How can the columns I created at design time be filled with data?

View 1 Replies

DB/Reporting :: Making Design Changes To Table In Live Environment

Apr 12, 2012

In a program I am creating, i want to let the user add and remove fields on an entity, lets say "people". So I have a table named "People", with ID and Name columns. Now, I want to let the user choose "add field" in a webpage, define for instance "email" field, and then use "ALTER TABLE" from the codebehind to create the new field in the table. What I want to know is: is this recommended? It seems like a simple way to do this, but since I have never seen any other programs doing it like this (Using ALTER TABLE statements from codebehind in a live environment) - and since it changes the design of the DB -

View 3 Replies

Can Retrieve Records From Database Fine / Having Trouble Updating Records

May 17, 2006

I can retrieve records from my Database fine, but I'm having trouble updating records. I am getting a syntax error on [code] I get this error when I change the Last Name (Row 0, Column 1). [code]

View 4 Replies

DB/Reporting :: .Net/Oracle Application Best Design When Building Sql Command Parameters

Oct 2, 2009

Currently working on a web-service with Oracle10g as back-end. Here is my problem.

1. The table I need to populate has 100 columns. I have no control over the design of the table.

2. I wanted to use the "deriveparameters" method of OracleCommandBuilder, but found out that this is "costly" in terms of performance. What I initially planned to do was to derive the parameters from an open connection, close the connection, then maybe cache the parameters obtained but I don't know if this is possible.

I am unsure how big of a hit the performance will get if I continue using the "deriveparameters" method WITHOUT caching the parameters driven. The environment is as follows

-intranet
-around 2000 users
-users spread out in different parts of the country

I am not familiar where they will put the web pages of the application, the web service and the database. I don't know if they'll be putting it in different servers or on one server, but that's something we cannot control too, that's why I am looking for the best approach.

I just don't want to hard-code all that parameters and if, for instance, we need to change some properties/parameters, it will be a pain to maintain the code. It would be nice if someone here can point a way to automate the whole thing w/o the performance of the system taking a hit.

View 3 Replies

Get Records Into Oracle Database Delete From DB And Update The Records?

Oct 27, 2009

how to get records into oracle database delete from db & update the records i have successfully connected my vb 2008 win form with oracle 10g.

View 1 Replies

DB/Reporting :: Counting The Records?

Feb 28, 2008

I have a database table that has in it, for example:

Room1
Room2
Room3

[code].....

View 3 Replies

DB/Reporting :: Check Whether Records Inserted?

Nov 20, 2008

i have a query as follow:

gconn.BeginTrans
strSQL = "INSERT table_name (....) " & _
"SELECT fields_name FROM table_name2..." & _

[code].....

View 4 Replies

DB/Reporting :: Create Some Records Using Structures?

Feb 24, 2012

I am basically trying to create some records using Structures as you can see below, however the value of Index doesnt seem to be incrementing as I am assigning it to txtCustomerId.text each time form loads, however the value of the text box remains at 1000 all the time

Code:

Public Class Form1
Dim NumberOfCustomers As Integer
Dim Index As Integer

[Code].....

View 1 Replies

DB/Reporting :: Retrieve Last 10 Records From Table?

Apr 1, 2009

Is it possible to have a quick and easy way of retrieving the last 10 records from a table?

Currently what I have been doing is retrieving all the records then one-by-one cylcing through each record until I have the last 10. To me this seems to have a lot of over-head reading each record. I just wondered if there was a quicker way of doing it.

View 2 Replies

DB/Reporting :: Allow Users To Edit Existing Records

Aug 17, 2009

I have a DataGridView bound to a non-SQL Server database.I need to allow users to edit existing records but under certain circumstances I need to intercept the edit and instead of committing and updating the dataset I need to delete the edited record and re-add it as a new record.I have tried using every event I can think of to do this but haven't managed to get it right. [code] This almost works but sometimes completely messes up and re-adds rows twice and all kinds of other bad side effects.

View 9 Replies

DB/Reporting :: Creating New Records By Draging And Dropping?

Jun 2, 2008

An order can have many OrderDetails, and a Product can be on many different orders. The OrderDetail table just has the OrderID and productID, so there is essentially a many-to-many between order and product).I have a form for the user to enter a new order. I want to have an unbound box that contains the names of all the products, and to be able to drag these names into a box under the order, to add a new OrderDetail record using the productID of the dragged order along with our orderID.

View 1 Replies

DB/Reporting :: Inserting Records - No Open Connection?

Apr 17, 2008

If I use the CmdObj.ExecuteNonQuery() I got an error
I'm not having an open connectoin.

View 2 Replies

DB/Reporting :: Check If Newly Added Records Have Been Saved

May 7, 2008

I'm trying to build a new customer data entry page for a db project. One of the features I would like to add is a way to check and see if there have been any new records that have been added that haven't been explicitly saved to the db. If so, when the form_closing events fires I want to evaluate whether or not new entries have been made that weren't saved, and then count the number of rows that haven't been saved.

[Code]...

View 1 Replies

DB/Reporting :: Display / Edit And Create Insurance Records

Mar 14, 2008

I'm using Visual Basic 2005 and I have created a program to display, edit, and create insurance records. Right now I am using an access database and it is hosted locally. What I want to be able to do is host it on our server here at our office and have the program installed on every computer on the network.

My connection string at the moment looks like this:
Code:
Public con As New OleDb.OleDbConnection
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:Insurance ProgramInsurances.mdb"
'Opens connection
con.Open()

View 11 Replies

DB/Reporting :: OleDataAdapter With Parameters Finds 1 Of 3 Matching Records

Apr 15, 2008

I am using Windows XP and Visual Studio 2003 .NET in VB.

I have created a parameter query using data controls on a form. The SQL works when I paste it into MS Access (and set the values to those I type in the input form) it returns 3 records. In the VB form I only ever get the first matching record. By changing the input by sorting in different orders I still only get the first matching record ( a different one). If I alter my input so the first does not match but the second and third do match I get only the second. Why Don't I get the set of three?

<Code>
Part SQL:
'WHERE
' (Houses4Sale.HousesAskingPrice <= ?)

[Code].....

View 1 Replies

DB/Reporting :: Ado.net - Get Current Records Informations When Click In Gridview Or Listview Value

Dec 14, 2008

I created a project in VB.Net 2008. i use a code to Add,Update and Delete record. It works fine. The problem is: How to get current records informations when i click in gridview or listview value.

[Code]...

View 8 Replies

Reporting Services - Input Parameter Needs To Return All Records If Left Blank

Jul 9, 2009

I have an input parameter for my stored Proc, Instead of choosing available values from a drop Dwn, the customer wants an empty input box that when left blank returns all records. the parameter type is numeric(6,0) in the Db. I have not found a way to leave the input blank and retrieve all records. my default value for all records is '-99' and also is declared as the default value for the param in the proc.

View 1 Replies

Database Connectivity - Design The Database In Access2003 And Forms

Jun 3, 2010

I m working on an school management application, i design the database in access2003 and forms in vb.net2005. but i dont have any idea about the database conectivity. with the help of a book to connect with the db but i cannot save the data in the mdb file. in my application 1 add the followin buttons add new record modify record delete search using id or enrolment no.

View 1 Replies

Asp.net - Simple Explanation Of "Unified Modelling Language", Why Is It Important?

Jan 22, 2011

i am new to asp.net and i was told that i need to know UML thoroughly to build successful software, is this correct? i mean cant i just "code and fix" and "model" in my brain. how important is UML and what is the best way to learn it?

View 3 Replies

Data Modelling Techniques To Handle Lots Of Data?

Apr 6, 2011

So I have a relatively small website with growing amounts of data - the fastest growing table is pageviews, as we do all our analytics ourselves. The website is made using VB.Net, SQL Server 2008 and jQuery. I am limited to .net 2.5.I currently handle all the data and validation using objects with a list of attributes. Each attribute is of a specific datatype and has a validation function when a new value is given to it. If the data does not validate then it won't even get as far as updating the database and feeds back an error to the user. Currently I have "Manager" classes and "Item" classes - Items are managed by a particular Manager class, for example Users are managed by the UserManager, so to get all the users I just have to call UserManager.Items. These Manager classes are stored in the cache and are created as needed - but once a Manager class is referenced it creates all of the Items within it. This is getting rather slow now, as the company is growing fast. It takes 2 - 3 seconds to load the first page (the page which makes most first-time requests to data) but I am not happy with this time. After that it is nearly instant.

Now the way I see it I have 3 options to speed the website up: Keep it as it is, but try to make it more efficient through other techniques;Change to creating all these objects on every page load, in the hope that it is simply so slow because I am using the cache to store a fair amount of data (about 10 MB or so at least);Forgetting using object oriented techniques and just use straight SQL queries and loop through records.

View 1 Replies

DB/Reporting :: OLE Database Access - Move My Programs And The Database To Another Computer And Hard-disks

Apr 21, 2008

I want to move my programs and the database to another computer and hard-disks. It looks to me as though I nearly have to re-create the controls and rewrite some of the code to make it so the programs still work after the move. At least with ODBC all I would change was the DSN definitions external to the programs. Is there an easy way to move or rename a database without loads of work?

View 3 Replies

DB/Reporting :: Copy A Table From A Network Database To A Local Database

Mar 30, 2008

I am trying to copy a table from a network database to a local database. I used DAO and could check if the network table existed using a function that tried to assign a TableDef object to the table in question. If there was no error then I assumed that the table existed and the function returned true...Or it would error out and return false.I could then proceed with the copy or not as the case may be.I am converting the code to ADO.net and need to know how to check for a table. [code]

View 1 Replies

DB/Reporting :: Master - Detail Data - Overwrite The Primary Field Value In The First Grid And The Detail Records

Jul 13, 2010

I have made several posts on here lately regarding master/detail or parent/child data setups but no one has been able to help. It seems like a subject people don't like to tackle BUT I really need help.

I'm having a real hard with the DataView.RowFilter functionality and it is driving me insane.

For the most part, I have the basic master/detail functionality working. When you select a record in the first grid, it shows the correct data in the second grid. When you enter a record in the first grid, you can enter related data in the second grid. I accomplish this by using a dataview and row filter bound to the 2nd grid. When you change the record in the first grid, the rowfilter for the 2nd grid is restated and reapplied.

The problem arises when I overwrite the primary field value in the first grid and the detail records become orphaned. You would think all I have to do is change the ID in the 2nd grid to match the new ID in the 1st grid but this is where I am having problems. I wrote a loop to change the ID of each record currently loaded in the 2nd grid to match the newly changed ID in the first grid. The code is here:

Code:
Dim I As Integer

For I = AuthorizationGroupsDGV.Rows.Count - 2 To 0 Step -1
AuthorizationGroupsDGV.Rows(I).Cells(0).Value = StrEmployeeID
Next

I have used this code before and it works great. It has to step backwards through the grid because when the ID's are changed, they no longer match the RowFilter criteria and they disappear from the grid. They still exist in the dataset. The problem is, while the code "works" the intended effect does not. Some of the records completely disappear from the dataset and do not reload when I restate the row filter against the new ID number.

View 2 Replies

Multilingual Database Design In Sql?

Jan 11, 2012

Need a procedure in SQL for translate a datatable in English to Arabic .I am having English table which is having category ID ,Code etc upto 25 columns in the SQL Database.We want to translate this table to arabic when user opts for Arabic .So need a procedure to convert this English table to Arabic.Do i want to use google translator for this case . Then how will it is linked with database .

View 1 Replies







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