Building a library database administration, it has a many-to-many relation (books, writers) and i wonder how to present to the user the management interface.
When editing a book, one must choose writer(s). But how? From a multiple choice drop-down-list? - It would be huge. From a number of drop-down-lists? - hard to control their number and present them in a dedicated module in the page. (Actually the later seems to me a doable solution.)
Any other suggestions? Cheers.
I suggest to use the same way StackOverflow uses to enable you tag multiple technologies while posting a question
It enables you to write the tag manually, and helps you with smart auto complete.
I see this way avoids huge drop down lost and simplifies controlling
Related
Good Morning,
as from the title, i'd like to create a proprietary database to be integrate in a Typo3 website.
I'd like to receive some advise on which is the best solution:
- is it possible to create tables directly from Typo3?
- is it better creating a database, for example with MySQL and then integrate
it?
In the second case, how coud that be done?
are there other options?
I hope this is not an already answered topic, in case, please send me to it ( i could not find so much information.
Thanks in advance.
If I understand your question correctly, you want to add a custom Extension to TYPO3, containing custom tables. From a content side, this is perceived as a "database", right?
TYPO3 has a framework for that called Extbase. You can "kickstart" a TYPO3 extension with the "Extension Builder" https://typo3.org/extensions/repository/view/extension_builder by entering the "Model" (the data structure) via GUI and then you get all tables etc. automatically set up.
After that (aside from general TYPO3 knowledge), there is some coding involved. In theory, it's possible to make a "round trip" back to the extension builder from the code, but I've never done that.
You need to know / learn the specificities of extbase / php, which is is based on some "convention over configuration" rules and has some additional tweaks to plain PHP (functional comments). Here's a great resource: http://www.extbase-book.org/.
With that, you have great flexibility and powerful tooling to build almost anything inside TYPO3.
From a TYPO3 view it is best if you are able to hold your data in the TYPO3 database. You need to create an extension to handle your data. In TYPO3 an extension can define it's own tables and with updates of the extension updates in the datastructure are handled automatically.
Since version 8 there is a new layer (doctrine) and so it is possible to define further databases for individual tables. With some restrictions you are able to even use different database (-systems) for different tables.
Anyway you could program your own database interface to get and store your data independent from any TYPO3 restrictions, but then you need to handle everything on your own.
Using the TYPO3 core API will help you in multiple ways to handle your data without programming everything anew.
Especially if you use extbase (and the EXT:extensionbuilder) you will get a complete BE data handling, FE-Plugins with Fluid templates to present your data, even data management from the FE could be generated for you just by defining the datastructure. Of course versioning, workspace and timed visibility support are also available if you use TYPO3 structures which includes some (mostly invisible) fields aside from uid, hidden, deleted.
I am creating a CV website, but in difference to most I am trying to make it with database. I mean that usually such websites are static and all of the information is hard coded in the HTML. Since I am back-end developer I like to make it so everything including buttons and welcome messages are taken from the database. I am trying to store projects that I have worked on. There are several types:
Github Repository - a project that is done purely on github.
Work related - a project I have done on work and there is no github repository of it, only link to view the final result
UpWork or other freelance website - as a freelancer I have projects to fix something on a website and those projects can be viewed only on my profile there and I would like to list them with link to UpWork or wherever there is information on what exactly I was hired to do.
Now my question is - should I have different Entities and therefore different tables for these types of projects or should I have all of the possible properties in one table. For example if it is Github there is repository field and if it is work related then there is company field. If it is freelance it has link to the website I was hired on. Also there are different sub-types - web applications, desktop applications, games and so on.
As you can guess the changes are small (1 or 2 properties). I could very easily leave empty some properties and have another property projectType, but is this the right way? Should I have different tables and entities for them?
To give some info - I can work with both MySQL and NoSQL and I havent decided yet on which one should my website be made on. I am currently thinking about NoSQL. This means I am asking on how to store the projects on MySQL and NoSQL (by NoSQL I mean MongoDB). If it helps the languages I am choosing from are PHP (MySQL) and JavaScript (NoSQL)
I know that usually questions without code are downvoted, but this is more of a logic based problem as I know how to do it, but I don't know the best practices for my situation. This being said here is a small code for you -
console.log('Thank you in advance')
MongoDB lends itself very well to this exact situation.
You can create a collection where documents leave out certain fields if they are not needed for that type. The querying parameters of MongoDB allow you to check $exists on fields if you need to, and documents are stored efficiently, only taking up memory where a field is needed.
You can even setup a sparse index which is not required for every document. As long as your core document structure is the same, it is a good idea to keep them in one collection, and vary them based on their type.
I am very new to database design and structuring - I have had no formal training and am purely self taught so I apologize in advance if this is a bland question.
I am designing a web app and am thinking to the future as users will have to be able to interact with each other sharing part of their data. I am wondering if there is a standard convention to controlling access to tables in MySQL and how I should generally tackle this problem with code written in NodeJS, ExpressJS, KnexJS, and BookshelfJS.
For example: a user will be matched with another user, both users will be able to see location, favourite book, etc but not able to see last name, birth date. etc.
How do I control this?
If anyone could point me to a few resources they have found helpful that would be great as well.
You seem to have learned a bit of MySQL and its access control features. Well, database user level access control IS NOT used by modern applications -- that could make resource management, like connection pools, very hard to implement. Usually SQL databases backing web applications have a single or, at most, two users: one for general data access and one for admin purposes.
The kind of access control you mentioned MUST be handled by your application code, YOUR code. There are libraries that help take care of authentication (e.g. passport) and authorization but ultimately it is YOUR CODE responsibility.
So my answer to your "How do I control this?" question is:
With YOUR code.
This is the whole point of Software Development.
I want to import data from a relational database in order to integrate it and load it in a transit database that I will use to form OLAP cubes. I've seen many tutorials about SSIS and they're all so basic and working on just one data flow task.
Now I wonder if I have to use one data flow for each table that I gonna bring or for each group of tables which are related to each other. Many details concerning BI tools are still unclear.
I really appreciate your help and if you can propose some advaced tutorials for me that will be grate too. :)
I've also another question concerning the transit database is it gonna be multidimensional and have I to create an empty one first??
Now I wonder if I have to use one data flow for each table
Most developers do it this way, mostly for ease of logging, but also having multiple sources and targets in a single data flow task means it multi-threads, and you lose control over it. In my case, in each data flow task I'm grabbing the row counts in the source / inserted / updated / deleted / failed validation / no action, and that's not possible if there are multiple sources and destinations.
I really appreciate your help and if you can propose some advanced tutorials for me that will be grate too.
I recommend searching Pragmatic Works free SSIS training webinars, and while you're at it see if they are offering an SSIS workshop in your area. Of course other people will have other preferences, and your mileage may vary.
Also, define 'advanced'.
I've also another question concerning the transit database is it gonna be multidimensional and have I to create an empty one first??
Not enough information here to give you an answer, and how about splitting this off as a separate question with details, as opposed to bundling multiple questions (with an unknown amount of follow-up questions) in a single SO question.
Good luck.
While this question asked something similar too, I'm interested in this from another angle. I'm not interested in the GUI part but in the database/domain part.
(My preference is SQL Server with C#/ASP.NET but this Q should be language agnostic.)
When designing a CMS system, data needs to be stored in tables and a business layer needs to provide access to this data. First of all, a user database with user roles, of course. A mailbox for private messages per user would be nice. Allowing users to set up their own profiles with images and eye-candy would make it even more interesting but let's not focus on the users.
What else should there be in the database for a CMS system? And how should it relate to the other tables?
My focus is to get a clear domain model to use as a basis for any CMS system. Something they all share in common. I'm only interested in the design, so I can later evaluate sseveral existing systems with the preferred domain model, to see which one matches the most ideal situation.
You need to decide what features your application needs, and what features beyond that you want to have in your application. From there you can work out what needs to go in your database. You're thinking about this backwards. The database supports the application, not the other way around (unless you're writing phpMyAdmin or similar!).
If it's a CMS for [I assume] dynamically maintaining a website, the first and foremost features should enable the users to:
Add/Edit/Remove pages (aka. nodes) - the structure of the site
Add/Edit/Remove menus, links - the navigation of the site
Add edit media (photos, video, etc.) - the content of the site
Then you can think of the other website-specific management features such as:
Managing products/customers if it's going to manage e-commerce websites
Various kinds of interactivity features -- comment/contact forms, etc.
A CMS is a big project to tackle, specially if you want to make it portable and/or reusable, expandable. I have already come through three versions of my own CMS -- first two versions in PHP and the latest one in .NET.
While design Database for CMS,must be care full about Product/content data tables,registered user data tables and UI related changes data tables.
UI related data is nothing but a themes,skin which is most important.
Most of the CMS application has developed as requirement comes.so most of the times need to break the relation ship in tables and normalization rule.
But if we careful about some basic db structure which is Content pages or content data tables,Product tables,User permission tables(if using aspnet tables then its better),Order management table(for e-commerce sites) etc.
As well as business layer doing most important role when some big changes comes in CMS Project.
Some times tables have a big changes which not effect on pages,need to change in business layer.
What you are asking is a technology question, which is not necessary related to the features the CMS itself has. My advice and the way I would approach it would be to use an ORM. The reason is that when you start designing the database you fall into the niche of DB concepts. The purpose of a CMS is to provide an easy way to manage content.
In this regard, extensibility is far more important than your database design and the user will not be able to see the database design. In short, start with an API, or if that is too much - just start with what you need to expose to the topmost layer. Then just somehow map this to the database without thinking about the structure itself. In this way, you would be concentrating on the problem you are solving rather than on the technology that might be needed to solve it. It feels more natural that way.