I have 3 brands, and each brand has it's own mysql database.
In general each database has the same schema, unless they're out of sync due to different release dates.
I have a Microsoft database with each mysql db as a linked database.
Also, I have different schema in the Microsoft database for each product, with views using openquery to get the data from the linked mysql databases.
Lastly, there is a 4th schema which is a union of the views from the different product schemas. All reports are based off this 4th schema, so they include data from all 3 brands.
Now, we need to segment by brand. Reports should be the same, but some people should only have permission to see specific brands, some should see all brands, etc.
What is the best way to do this, so I still only have to maintain one version of each report?
I thought of linked reports in different folders, but how do I build in the permission by brand?
You could try leveraging the built-in "UserId" variable (=User!UserID) to either integrate with an existing security schema, or build your own, and perform data filtering accordingly.
Related
have one question regarding report builder services and BI platforms.
We have multytenant database mongoDB, where we store all our users data, user's orders, user's transactions.
I want each user be able to build their own report (thinking about to use one of these: CrystalReports, JasperSoft, ReportServer).
But the issue is- when user will have access to database (via CrystalReports for ex.), he can easily generate report with other users Orders or transaction data.
What is best practices to provide data (from one database) for users which will use report building tool?
Users should use some UI that operates with intermediate semantic model (dimensions, measures, filtering parameters). They should not have direct access to database and write an SQL - only exception is possible if you have separate DB for each customer.
Right solution highly depends on the purpose why users create their own reports. If primary goal is business intelligence you may offer your users some kind of pivot tables / pivot charts builder.
I was looking into how to add a create user account/login to my website, so I could have members join and come back, etc and ended up finding out in order to do that, I'd need to create a new database in my SQL, to store the users credentials, I dont have the option to create any new databases by my webhost. Only the one database is what I can use. Could I just add this to my existing database? Do I really need more than 1 database on SQL for my website? If so, could I add another SQL server direct on my computer and use both, Mine and the web host one where I'm creating the site to manage my website? Im sorry for the few questions, Im really new to all this and so confused and overwhelmed.
You can create multiple tables in same database.just make a table with fields such as user id,password etc. and use it for saving,fetching user details using sql queries.
Could I just add this to my existing database?
Yes, you can tables to the existing database.
Do I really need more than 1 database on SQL for my website?
There are a lot of websites that use just one database. Some websites use connections to multiple databases. What information is stored in which database is frequently the result of factors other than the website. The ability to connect to multiple databases means that a website could use authentication/authorization info from one database, store user profiles and submissions in another, and read information from other sources (for example, historical stock prices, stored in another database.
All of that information could be stored in a single database. Having them as separate databases means that the databases can be managed separately (frequencye of backups, replication to DR site) and makes it easier to share the database across multiple applications. (For example, we would probably want employee payroll and health care information stored in a separate database, with separate access controls.
Could I add another SQL server direct on my computer and use both, Mine and the web host one where I'm creating the site to manage my website?
It may be technically possible to do that, but that's not the way you want to go. That would add another dependency... the website at the web hosting provider would be dependent on having access to another database, which is not being backed up and managed along with your website.
is it possible to create a graphical representation of specific object in database Schema and all it relationships with all linked metadata, views, and stored procedures assocated with this object? Example: I want to define a logical relationships between “Data Sheet” tab on Prestashop product page and the rest elements in a database schema.
Yes (partially) - use the mysql workbench. It has reverse engineering db tools
see mysql dev wb link
This will generate diagram of the tables + relationships. Stored procedures, views, trigger etc are not going to be supported (too complex). You will just have to browse and reverse them yourself.
Yes, you can find PrestaShop's new Physical Data Model here: http://www.prestashop.com/blog/en/a-new-physical-data-model-available-for-prestashop/
There is a MySQL workbench model in the dev directory of the Prestashop distribution (although the last one I looked out was out of sync with the actual release database schema, although that could have been a development release). I would make that my first point of call. Unfortunately it won't show up every relationship between tables though.
One of the quickest ways to do analysis is to take a snapshot of the database, insert a particular record (user, order, customer, data sheet etc.), take another snapshot, then diff them.
Background
My research group and I are developing a database to store our data and we are building an software tool that simplifies access to these data. The database will holds data that has been published and that we would like to make available, alongside data that has not been published and that belongs to other researchers.
Objective
We would like for our work to be easily reproducible, and to this extent, we need to allow the public to run SELECT statements on the data. Three possible solutions include:
for each publication, create a subset of the database that can be freely downloaded (possibly in a virtual machine so that the dependencies of the software tool are met)
for each publication, create a many-to-many lookup table that links data records to publications, and then provide public SELECT permissions to access these records. We could easily replicate the database for public use
Parameterization modules
Automation of prior generation
However, I have been told that even allowing wildcard statements compromises security, which is why I consider option 1 more plausible. Option 1 would also enable us to archive the database as it was used with a particular publication.
update: to clarify, I want the users to be able to reproduce the entire computational workflow, which requires using SELECT statements that can join data tables with auxillary data (like covariates, experimental details) in lookup tables.
Question
What is the best way to provide public access to a subset of the database?
You can distribute subsets of data as a SQLite database, that is, create a standalone datafile that people can download to their own computers. Many scholars, economists, etc use SQLite to share datasets because it is self-contained and installation is painless (and I should add, cross-platform).
Create views with appropriate access privileges, and users that can only access these views, but no underlying tables.
I'm trying to split a database into two pieces -- a backend that updates automatically, and a front-end that allows searching and adding/editing comments. The data in the source database is pulled together from multiple tables into a pair of queries, and I want to use these queries as the source of the current database.
Access 2007 supports splitting a database into multiple pieces, but not in the way I'm looking for. It keeps the tables in the source database and puts all the forms, queries, reports, and macros into the new database. The tables and queries are already in the back-end, and this new database should just provide a good GUI to the end-user.
Access 2007 also supports linked tables, but these can only use a table as a source, not a query object.
I was thinking that the best way to do this would be to do a SQL query along the lines of
SELECT * FROM SourceQuery IN "C:\Path\To\ExternalDB.accdb";
Is what I'm working towards even possible, and would this be the best way to do it?
Since its still relatively early in the project, rearchitecting the database isn't out of the question, but is something I'd prefer to avoid.
You described the usual Access BE-FE division correctly: only tables in the back-end. I'm aware not all DB programs do it that way, but this is Access and my approach would be to honor the usual division. (And you hardly have a choice in that you can't "link to a query" in Access.)
Reviewing your comment ('There is a specific reason ...'), I think this would possibly mean
adding a few more tables to the back-end, essentially buckets (import-data in ready form; export 1; export 2) that allow all users to get to consistent processed data;
making a small admin FE that sits next to the BE and stores your modules, queries for export, and export routines; and
having some redundant queries on the user FE. This is vexing in my own work. I just try to design sturdy stable "building block" queries in those roles, and keep their number to a minimum.
Hope I'm understanding you correctly, but the most sensible solution would be to link the tables in the backend DB and copy the queries to the UI database. Those queries would still be able to access the uderlying tables (via the linked tables) without issues and would be accessible through normal means to your forms and VBA code.
Is there a particular reason you don't want the queries in the UI database?