|
Cee Ann wrote: For multiple table update, are you referring to other table such as classes or course? I don't have the entire schema so I can't say to which tables it applies. Let's take a fictive person called Jane and enlist her into three courses. That's 4 items that need be "approved".
Now enlist 400 students in 40 different courses
Cee Ann wrote: If you see any issue with it, please point it out Whether it is valid depends on the users' needs; I can't tell whether it's valid, but one can always apply the normalization principles. To me it'd be valid if it is in BNF.
Cee Ann wrote: Forgive my laziness on the prefixing of fieldname Lazy? I was wondering why you're doing all that work, when it doesn't seem to help much
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Now enlist 400 students in 40 different courses It will be a lot of approval need to be done.
Luckily I'm the developer not the person who need to approve it.
Eddy Vluggen wrote: To me it'd be valid if it is in BNF. BNF?
Eddy Vluggen wrote: it doesn't seem to help much So, if is for you, you will do it as below?
Student Table
- StudentId
- StudentCode
- StudentName
- StudentAddress
- RecordStatus
|
|
|
|
|
Cee Ann wrote: Luckily I'm the developer not the person who need to approve it Make sure to add in an extra dialog, asking the user whether he/she is sure about the edit and wants to save
Cee Ann wrote: BNF? Sorry, BCNF[^]; the normal forms are numbered. The model is said to be in 3NF if you validated the first three rules. BCNF is "rule 3.5", it's somewhere between 3 and 4.
Cee Ann wrote: So, if is for you, you will do it as below? I'd drop the word "Student" from the fieldname, as there would not be any other entities with an Id in the Student-table. If you're referring to a name in the student-table, then "name" would probably apply to the student. Then I'd rename "RecordStatus" to "ApprovedByFool", as it is more descriptive.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Go on Eddy - why don't you tell them how you really feel
Everyone dies - but not everyone lives
|
|
|
|
|
Eddy Vluggen wrote: Make sure to add in an extra dialog, asking the user whether he/she is sure about the edit and wants to save Got it.
BCNF... Something new for me to study..
Eddy Vluggen wrote: I'd drop the word "Student" from the fieldname, as there would not be any other entities with an Id in the Student-table. If you're referring to a name in the student-table, then "name" would probably apply to the student. Then I'd rename "RecordStatus" to "ApprovedByFool", as it is more descriptive. What if StudentId is a foreign key to other table? Write 'StudentId' as fieldname in the other tables and 'Id' as fieldname in Student table?
|
|
|
|
|
Cee Ann wrote: What if StudentId is a foreign key to other table Then you could name it after the table it comes from, but it'd be better to come up with a descriptive name. Take "Employee" and "Person" as a fictive example with multiple references to itself;
Employee
Id
Name
FK_Manager
FK_DedicatedDriver
Person
Id
FK_Mother
FK_Father
As you can see, there's no mention of the fact in the fieldname to the table. That's because we can assume that people will recognize "mother" as a person, and "manager" as an employee. If it weren't, "FK_MotherPerson" might be needed.
Cee Ann wrote: Write 'StudentId' as fieldname in the other tables It's not an id, but a foreign key; it's something that points to the id of a record in a different table
That information is also obvious from the above naming; anything with a "FK" points to the Id-field of another table.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Got it,
Thanks a lot Eddy for everything.
|
|
|
|
|
You're welcome
|
|
|
|
|
Howdy,
I've a program that receives GPS through a serial port. The GPS class is child to the main form. When the user calls to open the port, the GPS class creates a thread and runs it, firing off a dataReceived event to the main form, the eventArgs class contains the location data and can be read by main form. This program runs constantly for up to a week at a time and interacts with user input the whole time. Usually, once or twice in a week, the program coughs up an error that can freeze the laptop, but at the very least requires a program restart. Because it happens so seldom, I cannot track this sneaky jerk down.
The enventArg data is stored writ to a listArray, which can be polled by the user to get locations at appropriate times for their task. When requested, the form posts a median location, empties the listArray and waits until the array is full again before the user can make their next request.
If the event fires at the same time as a user request, would this cause a problem? If so, how should I approach a fix?
Should I run the GPS class on a thread from the main form?
When a connection to the GPS is closed, should I kill the thread that the dataStream came in on? The stream is disposed of, but I never put closed parenthesis on the thread itself.
public void GpsOpen()
{
if (_gpsStatus.Equals(GpsStatus.Disconnected) || _gpsStatus.Equals(GpsStatus.NoGpsDetected))
{
_gpsStatus = GpsStatus.Connecting;
FireStatusChangedEvent(_gpsStatus);
ThreadStart ts = new ThreadStart(openGps);
gpsThread = new Thread(ts);
gpsThread.Start();
}
}
Suggestions are definitely appreciated!
TnM
If you're not sure you're in a cult, you are.
-- Stephen Colbert
|
|
|
|
|
Random thoughts.
If a thread throws an exception which isn't caught then the entire C# application terminates.
If you are not in fact creating one thread but are creating many then I would suspect the entire OS to fail.
Get a logging library and use it.
|
|
|
|
|
Does the event viewer show any information for that application hang? Well, it hardly ever useful, but might be better than no information at all.
A tight logging of all program calls is preferred.
By the way, are some kind of system events happening at that moment, e.g. hibernate, USB power off, ...
|
|
|
|
|
Unfortunately, this happens in the middle of the ocean and we're on the clock and have to keep going, so it's restart with some random cursing and get back at it. I brought my development machine out once and ran the program through the VS debugger, but the break was not helpful at all. Definitely not a power off or hibernate, that stuff is all turned off, it might be USB, but there are three other peripherals running through the application on their own threads and have never had a problem. Of course, the other three are also not constantly streaming.
Back at sea in a few weeks, I'll definitely check the event log...as you said, w/out much hope! Not sure I've ever gotten any help there.
Don't have much time to spend on this, thought I'd throw this out there and see what came back.
Thanks for your feedback,
TnM
If you're not sure you're in a cult, you are.
-- Stephen Colbert
|
|
|
|
|
I'm looking to build a desktop application which primarily is used for data entry. However, the application needs to have a few features that assist the user in selecting the appropriate data. If you have experience designing applications and have good models/ frameworks that you think would be best after reading this, please let me know. Here are many of the details.
The application idea is to create a UI with one page that has a host of listboxes, comboboxes, textboxes, and tabcontrols. The user will select the data from the combination of controls, then press CREATE RECORDS somewhere in the application. The data that is entered is either going to be entered directly into a database ( postgresql) or will begin in a datagrid and then after review of the records ( perhaps a separate tabitem) , will be placed into the database. The best part about this application would be the speed at which it is able to build records based on looping through the controls. Many of the records that are currently being created have data that is easily created by looping through controls such as listboxes as the data on the records is only different by a slight change in the value that can be shown in a listbox and selected with a multiselect.
I would like to separate the application into its parts as this seems to be common practice for application design and efficiency gains when coding. ( MVVM is just one I have read about recently.) I am going to be using NPGSQL as a data adapter and the rest is simply up for design grabs. If you have any recommendations, please let me know. I would really like to know if there is a better framework to design such an application and have so far been working looking into WPF. All knowledge and recommendations are welcomed. Thank you so much.
|
|
|
|
|
|
Hi Peter, and thank you for the reference material that microsoft wrote. It appears that the article has some relevent information for me, specifically approaches to creating a n-tier application. However, do you feel that this document is slightly outdated considering it was written 12 years ago??
|
|
|
|
|
|
Member 10420054 wrote: The best part about this application would be the speed at which it is able to build records based on looping through the controls That simply means that you should not be doing a blocking database-insert from the UI-thread.
Get the data, when the user presses "enter" create a new thread and have it insert the data. Reset the UI at the same time so that the user can continue inserting data. That way they can type without having to wait for the server.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Get the data, when the user presses "enter" create a new thread and have it insert the data. Reset the UI at the same time so that the user can continue inserting data. That way they can type without having to wait for the server.
That can be done also by using MQ (Message Queueing). Put your output record on the OUT queue and get on with life without bothering about creating a new thread.
|
|
|
|
|
Member 10420054 wrote: ...which primarily is used for data entry.... that assist the user in selecting the appropriate data
People who actually do data entry where speed matters typically don't need 'help'. Attempts to make it faster for them tends to slow it down because they type based on patterns. Thus it doesn't matter to them if they must type values into 10 fields but if they must learn that sometimes the only type values in 7 fields, or 4 fields, then they must learn not only what to type but must also learn the rules that is trying to help them in the first place.
If on the other hand you are not dealing with real data entry people or perhaps in terms of training new data entry people then finding a solution there depends on the application. But a knowledge based tutorial which one can use while learning (and can be turned off) might be suitable.
Member 10420054 wrote: I would like to separate the application into its parts ...
No, no, no.
As this forum suggests there is a reason someone starts with "Design and Architecture". You don't look at technology UNTIL you know what your application needs to do. And you don't know that yet.
|
|
|
|
|
Please I need guide on how to design webserver using Linux operating system
|
|
|
|
|
|
You forgot to say the magic words: "Plz send codz. Urgenz."
|
|
|
|
|
Would anyone be willing to give me some constructive feedback on my most recent article?
ITAdvisor Blog
All constructive feedback is genuinely appreciated.
Thanks
JD
http://www.seitmc.com/seitmcWP
|
|
|
|
|
Actually articles are expected to be posted here on CP, not simply advertised here...
|
|
|
|
|
Why not you link your CP account to your blog - it will give you a larger publicity and us something to read...
Also you will get all the feedback you ever wanted (I don't know about constructive )
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|