Yo, Zorro

No, not secret CIA crap.. but just about as tough to crack for most of us. He's got it all, css, html, xhtml, php.. you name it!

Moderator: Zorro

Yo, Zorro

Postby Bullet Magnet » March 14th, 2014, 1:11 pm

About that design we discussed last night...

I set up my tables as you suggested (see the attached model). However, I'm confused on how you would associate a credential with a "row" of data, i.e. an account. Since each credential is its own entity and not an attribute of an account entity, I don't see how you would relate them with this setup.

My assumption is that I still need an account entity. One account can have many credentials. This would allow each instance of an account to vary based on the category (and thus the columns). The GUI would be dynamic, i.e. the input fields are adjusted based on what columns the user adds/deletes. Allowing the user to submit entries directly in the DataGrid would probably be the best way to enable this.

What say you of my assumption?
Attachments
model.PNG
(15.3 KiB) Not downloaded yet
User avatar
Bullet Magnet
Squad Member
 
Posts: 1472
Joined: February 6th, 2011, 5:53 pm

Re: Yo, Zorro

Postby Zorro » March 14th, 2014, 10:33 pm

Opps. Yea, you'll need an account record. I can't believe I missed that! It helps when the code knows what "row" each value is supposed to be on. Sorry if I confused you.

:oops:

Anyways, here's a complete schema of that should work and get you started. As a side note, be careful with using certain names, as some RDMS engines have "column" as a reserved keyword. Here's a list I use to help me avoid any reserved keywords; it's best practice to avoid reserved keywords even if they're not reserved in the particular RDMS engine you're using.

credential_categories

id (int) | record_name (varchar) | display_order (int) | created (timestamp) | modified (timestamp)

credential_columns

id (int) | category_id | record_name (varchar) | display_order (int) | created (timestamp) | modified (timestamp)

credential_accounts

id (int) | category_id (int) | created (timestamp) | modified (timestamp)

Note: You won't need a "display_order" value for the account rows since you'll likely have ASC and DESC alphabetical sorting for each column, and obviously that would determine the order in which each account row is displayed.

credential_values

id (int) | account_id (int) | column_id (int) | record_value (varchar) | created (timestamp) | modified (timestamp)
Research shows that one in three Clinton supporters are just as stupid as the other two.
Zorro
Squad Member
 
Posts: 543
Joined: February 5th, 2011, 12:25 pm

Re: Yo, Zorro

Postby Bullet Magnet » March 15th, 2014, 12:38 am

Exactly what I was thinking, thanks. No problem on leaving it out. I was happy that I came up with the solution and just needed some verification.
User avatar
Bullet Magnet
Squad Member
 
Posts: 1472
Joined: February 6th, 2011, 5:53 pm

Re: Yo, Zorro

Postby Bullet Magnet » March 26th, 2014, 12:56 pm

Grrrr.

I am going back to hardcoding the fields. I give up. You win, C#.

The back-end implementation of this was easy. The front-end was a monster.
User avatar
Bullet Magnet
Squad Member
 
Posts: 1472
Joined: February 6th, 2011, 5:53 pm

Re: Yo, Zorro

Postby Bullet Magnet » March 26th, 2014, 1:01 pm

Zorro, do you use any web controls similar to the DataGridView used in PassShed?

Perhaps sharing thoughts on how you would implement the front-end of this would help me.
User avatar
Bullet Magnet
Squad Member
 
Posts: 1472
Joined: February 6th, 2011, 5:53 pm

Re: Yo, Zorro

Postby Bullet Magnet » March 26th, 2014, 3:46 pm

Well, we're getting somewhere.
Attachments
2.PNG
(4.38 KiB) Not downloaded yet
1.PNG
(3.57 KiB) Not downloaded yet
User avatar
Bullet Magnet
Squad Member
 
Posts: 1472
Joined: February 6th, 2011, 5:53 pm


Return to El Zorro's casa de la Codes

Who is online

Users browsing this forum: No registered users and 12 guests

cron