•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 423,404 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,621 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser: Programming Forums
Views: 945 | Replies: 4
![]() |
•
•
Join Date: Aug 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hi everybody!
I am Daniel and I am developing a Alumini Database right now using MySQL and Ruby On Rails. First of all, I must say this is an amazing forum. I really enjoy reading the posts. I hope you will be able to help me.
I have the following problem in my design. Every alumni will have certain properties, such as Adress, Study, Birthdate, Employers . . . you get the picture. Now the Alumi should be able to select which data are publicly viewable and which only by other alumni.
There is a sulution in place, which I inherited, but I would like to change it. The old solution is to have one large Table where there is an extra binary column for every data column. -> Adress, Adress_Public
Well this is not optimal. Now I thought of having a properties table and a properties_public table in which I could save the memberID and the property that is public.
But I do not really know how to implement without havong to loop over all the findings.
If I would, with the above scheme, select all properties I would get
And then I need to loop over this to get the actual information. That is not really effective either.
Do you maybe have an idea?
Thank you very much!
All the best
Daniel
I am Daniel and I am developing a Alumini Database right now using MySQL and Ruby On Rails. First of all, I must say this is an amazing forum. I really enjoy reading the posts. I hope you will be able to help me.
I have the following problem in my design. Every alumni will have certain properties, such as Adress, Study, Birthdate, Employers . . . you get the picture. Now the Alumi should be able to select which data are publicly viewable and which only by other alumni.
There is a sulution in place, which I inherited, but I would like to change it. The old solution is to have one large Table where there is an extra binary column for every data column. -> Adress, Adress_Public
Well this is not optimal. Now I thought of having a properties table and a properties_public table in which I could save the memberID and the property that is public.
But I do not really know how to implement without havong to loop over all the findings.
If I would, with the above scheme, select all properties I would get
1, Adress 1, Birthdate 1, Job
Do you maybe have an idea?
Thank you very much!
All the best
Daniel
Hi,
We lately started adding all the allowed information to be view in 1 field for each user as a concatunated strings seperated by a special char like ";" or "/" then we check parts of it using string functions like mid, IN, find, search or substr depending on language being used the table usually looks like:
1 Name;Address;Phone
2 Name;Phone
I hope this helped.
We lately started adding all the allowed information to be view in 1 field for each user as a concatunated strings seperated by a special char like ";" or "/" then we check parts of it using string functions like mid, IN, find, search or substr depending on language being used the table usually looks like:
1 Name;Address;Phone
2 Name;Phone
I hope this helped.
•
•
Join Date: Aug 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hi thank you very much for this tip!
This looks quiet good. As far as I understand, I still need to make two querys to get only the public data as a result. I first would select the public columnames and the build a query with them to receive the actual data.
Isn't there a possibility to put the whole logic of this into the DB so that a SELECT only gives me publicly viewable data?
I am busting my head about this, but I can't find a solution.
Thanks
Daniel
This looks quiet good. As far as I understand, I still need to make two querys to get only the public data as a result. I first would select the public columnames and the build a query with them to receive the actual data.
Isn't there a possibility to put the whole logic of this into the DB so that a SELECT only gives me publicly viewable data?
I am busting my head about this, but I can't find a solution.
Thanks
Daniel
![]() |
•
•
•
•
•
•
•
•
DaniWeb Database Design Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
access avatar backup breach broadband code combo creative crime daniweb data data protection data transfer database design drive dropdownlist forensics government hacker hard hardware hitachi howto ibm illustrator internet linux medicine module navigation net news normalization photoshop print research reuse security server sql storage survey terabyte toread tutorials web wikipedia
- (reformatted) How to return Multi-Dimensional Arrays (C++)
- Private Access (C++)
- Why Data Structures???...QUESTIONS INSIDE (C++)
- Creating data access layer in java (Java)
- Bank account class (C++)
- accessing private data members (C++)
- storing references to classes (C++)
- Classes (C++)
- Objects (C)
Other Threads in the Database Design Forum
- Previous Thread: Recomendations for a book on database design
- Next Thread: help me on blog Dtabase


Linear Mode