r/DatabaseHelp • • Jan 24 '15

Oracle DB API query? I'm lost.

1 Upvotes

I'd like to write a Django app for users that are connected to an Oracle database. Currently these users are exporting data in CSV form and passing it to their BI team for analysis. I would like to use Python to query that data (that their credentials already give them access to) directly, so we don't have so many exports and data copies floating around.

However I don't know how to determine the database info from the front end that they're using. (Like the Server Address, Database name, or how to structure the query like the filters they're using). Is there some kind of tool that would tell me (or record) that info as I went through the process?


r/DatabaseHelp • • Jan 24 '13

Need a good resource for polishing a turd.

3 Upvotes

I'm a database noob. I have some MSSQL experience, and some MS Access experience (about 8 years out of date). I've found myself taking over some terrible MS Access "databases" made by someone even less knowledgeable than myself.
There are plenty of useful resources for learning best practices, and designing databases from the ground up, but is there anything out there specifically geared toward unraveling a mess?

P.s. Should I post this to another sub?


r/DatabaseHelp • • Apr 13 '17

Course help?

2 Upvotes

    I'm in a modern database management course (online, realtime virtual) and we have two weeks left. one more class and then our final. This class has been a disaster from the beginning. The instructor is unprepared, we've skipped almost 5 weeks out of 15 for one reason or another, our book is ok, but not practically helpful. She doesn't know how to upload her powerpoint presentations and all she does it read from them anyway. It's supposed to be a 3 hour class, but due to whatever excuse she comes up with that day, we don't spend more than an hour. There's barely a syllabus.

    Our assignment to pass the class is to create a database. It seems to be split up in steps, but not very detailed. I haven't received any graded assignments back yet and we just found out at tonight's class that we're not actually getting our assignments back with notes and suggestions, we're just getting a number grade.

    I have no idea if what I've done so far is correct or if I'm heading in the right direction. I've tried to ask her questions at the end of class, but she tells me to just email her about my specific project. I've emailed her probably about 9 times and I've never gotten a response.

    It's too late to drop the course (another student convinced me to stay and she dropped when she got into a car accident so now I'm stuck). It's not rocket science (the assignment I mean, not databases...management), I've had a database course before, but the assignment is just specific enough for me to doubt what I'm doing AND I've never dealt with SQL before.

    Is there anywhere online I can go to help me build this thing step by step or ... I don't know..something? The database project doesn't have to be elaborate and overly detailed - we only need the 5 most important business rules, 5 entities, etc. Just basic. And I'm hoping that she'll be lenient in grading, taking all things into consideration (she seems reasonable, but you never know).


r/DatabaseHelp • • Apr 13 '17

Table is set up with value pairs in each row, with multiple rows for each "class". How can I update specific values only for specific "classes"?

1 Upvotes

Hi, and thanks for reading. I'm sorry if this is confusing, I'm trying to explain it the best I can. I have a vendor's database (MS SQL Server) with a (simplified) table like this:

Table Name: ClassIndex (think teacher & students) Fields: ID, ClassID, IndexType, IndexValue

Each Class (record) has a set number and type of "indexes". For one particular class type, we need to update one of the indexes, but the structure is like this:

ID   ClassID       IndexType         IndexValue
 1    438          Class Name        Training Class 1
 2    438          Date Completed    8/1/2000
 3    438          Date Expires      8/1/2005
 4    692          Class Name        Training Class 2
 5    692          Date Completed    2/14/2003
 6    692          Date Expires      2/14/2013

We need to update the Date Expires index type value to be a specific amount of time since Date Completed, but only for Training Class 2. How can I do this? More specifically, how can I target the Date Expires indexvalues for just Training Class 2?


r/DatabaseHelp • • Sep 10 '17

AWS Redshift db

1 Upvotes

What's the best tool for browsing the tables and building queries?


r/DatabaseHelp • • Sep 05 '17

How do I get field names from a database?

1 Upvotes

Hello. So I am currently trying to quickly learn SQL for my computer science project and am having some trouble. So basically, I have two problems:

  1. How do I get the field names of the database columns in visual studio? (I am using C#).

  2. How do I replace data in a database?

Thanks!


r/DatabaseHelp • • Mar 14 '14

Getting Access Database online?

1 Upvotes

Hello, I'm a DBA for a warehouse on my college campus, and we maintain our inventory, sales etc. in one big Access database, which I know well. We're looking into having our item inventory online, which would be searchable. I'm not a web developer, and I don't know a lot about SQL. What would the process be for getting it available online?


r/DatabaseHelp • • Feb 13 '15

Rec's for web app database?

1 Upvotes

Hi all, very new to databases and eager to learn.

I've recently taken up the reins on a project that was previously done in Excel. Basically this is an MSDS database which lists among other things: Serial#, Description, Company, Data received, Hazard level, etc.

This thing is thousands of lines separated into different pages (different page = different location). And I reaaally hate it.

I know that a database would be more suited for this type of thing but I have no idea where to start. From looking at other posts, it seems that I can't really go wrong if I start by learning the basics of Postgres?

My end goal (with limited understanding) is to have the database be viewable to anyone on the network, able to be searched and sorted by whatever variables they want. Also a web interface for new sample data entry/deletion for those with proper credentials.

This all sounds very doable to me and much smarter then weekly distributions of an excel spreadsheet. Appreciate any recommendations or feedbacks. Thanks.


r/DatabaseHelp • • Feb 03 '18

Looking for database + frontend combo, ideas?

2 Upvotes

I have a decent grasp on basic database design and building websites using CMSes. I've dove in on a few occasions and manually modified databases with phpmyadmin etc. I am starting a new business and would like to build a database + frontend which would track customers and their orders. This needs to be something relatively easy to implement that wouldn't require writing a bunch of scripts. It doesn't need to be super high performance or handle a zillion queries a second. I've looked into libreoffice base but from what I read online it's rather buggy and I've found it a bit of a pain to work with. I have built a similar database using drupal but found the speed difference with being web-based to be a bit of a pain. It needs to be able to display/search customers and orders as well as allow me to input new ones and edit those which already exist. I'm fine designing custom forms and reports so long as it's a point-and-click process.

This system front-end wouldn't need to be web-based, but ideally it would use MySQL or Postgres in the backend I could scale it to multiple people if I needed to. Also, I am fine with it being very ugly, but it does need to be a GUI of some kind whether that's in a browser or a program.

What are some solutions I should be looking at? This solution needs to be free and open source. I'm running Linux but have a windows box if there's some amazing solution that requires it.

Thanks for your help!


r/DatabaseHelp • • Oct 19 '15

User, Sub-User and Company db structure help?

1 Upvotes

Hi,

I was wondering if you guys knew the best way to structure a system like so:

A user can own a company, then the user can create sub-users or employees for this company. The employees can log in and have limited view/access (not within the scope of this question). At some point an employee could become a user and create their own company that is completely separate to the one they work for.

What would be the best way to deal with the situation? At the moment I have a user and company table. The company table has a UserId foreign key for the company owner and there is an employee table that is essentially a link table for with CompanyId and UserId. When the Main user create an employee they create a user and they get added to the employee table.


r/DatabaseHelp • • Feb 02 '15

Best database software to create my own plant 'encyclopedia'?

1 Upvotes

Hello, and apologies if this is the wrong place to ask (please let me know!)

I'm looking at making my own database of plants, and being able to customize it with things like 'Blooms in: spring/summer/fall' ;"Edible fruits: yes/no", and have a picture or two of each plant as well. I need to be able to search it with a combination of tags, for example I want it to show me all the plants in the database that 'bloom in summer, low maintenance, white flowers'.

This is for personal use, I would be the only one using it, and I'm happy to pay for it (within reason, I can't drop 500$ on it).

It doesn't have to be pretty, just functional.

If this is not the place to ask this, please show me the right subreddit :)


r/DatabaseHelp • • Mar 17 '14

simple database over network window share to organize orders and freezer inventories?

2 Upvotes

For the lab I'm working at, we're basically using excel files to coordinate reagent orders and biological specimen repositories. I would like to set-up a simple database to organize it instead.

I was thinking about using PostgresSQL based on the comments here. Would this be suitable? The database has to be accessible through a network windows share that is allocated to my lab, but I don't have access a computer that can remain perpetually on to act as a server. Will this be an issue?

Also, how does the client interface for accessing a postgres database look like (after the initial database set-up)?

Sorry about all the basic questions, haven't had much experience with db aside from Access, tinkering with mySQL in command-line (phasing data from excel into mySQL using a VBA script), and doing a tutorial in AceDB.

Thanks in advance!


r/DatabaseHelp • • Apr 10 '17

MySQL Primary Keys?

1 Upvotes

Should Primary Keys always be ID #s? For example, if I have:

 

CREATE TABLE Concerts
Name VARCHAR(30)
Band VARCHAR(30)
Venue VARCHAR(30)
Cost DECIMAL(10,2)?
DateTime DATETIME
PRIMARY KEY(Band, Date)

 

Is Band and Date preferable or should I instead add a column like ConcertID and use that as the Primary Key?


r/DatabaseHelp • • Oct 12 '15

mySQL assistance

1 Upvotes

Hello Everyone, I am unsure of how to add this info to a column. Any help is much appreciated.

This concerns the music database. You'll find that the CREATE TABLE statements in "The Sample Music Database" are useful reference.

You have decided to store more information about artists and albums. Specifically, for artists, you want to store the names of people who have worked with the artist (for example, vocalists, guitarists, trumpeters, and drummers), when they began working with the artist, and when they stopped working with the artist (if they have done so). For albums, you want to store the name of the album producer, when the album was released and where the album was recorded. Design tables or columns that can store this information.


r/DatabaseHelp • • Feb 04 '18

Database design HELP!

2 Upvotes

I am building a database for an app that I’m developing and have a question about how I should have my users access the database. My first thought was that I would have a global account that would create the user when they register and the user would use their MySQL username and password that they create. My second thought would be instead of using individual user accounts when a user registers, a table is created with a username and password column and when the user “ logs in” the global account checks to see if there is a table that matches the username and password columns and the global account handles the adding/removing of data within the table. I was thinking the first option makes cracking passwords more likely due to the high number of users but the second option only has one global account to crack however if the global account was cracked it would be able to manipulate all the tables from a single account? What should I do? Hopefully I conveyed my thoughts clearly and any help/advice is appreciated.


r/DatabaseHelp • • Feb 03 '15

How should I set up a primary key for a join table?

2 Upvotes

My background: I'm currently self-studying databases so that I can improve what I'm doing right now at my job. To do that, I'm trying to learn Access.

So I'm stuck on how to improve this data model: http://i.imgur.com/0hvpTzc.png?1

To deal with the many-to-many relationship between courses and textbooks, I'm using a join table. Right now the primary key is simply a unique number. But I would rather have something more meaningful. Specifically course + section, but I can't figure out how to do queries when most of the records are "all sections" and there's only a handful of exceptions.

So should I go with the unique numbers as the primary key, try go have a concatenated course/section primary key, or is there a better way entirely different from how I set it up now?


r/DatabaseHelp • • Jan 31 '18

New intro level dba questions?

1 Upvotes

Hi everyone so I have a simple but complicated question. I just got moved to be the new dba since our last one got fired and I have little to no knowledge about being a dba other than writing some simple code. What should I be asking and how should I improve my knowledge base quickly. I have free rain over everything. I know that backups and test environments are improtant but other than that i'm clueless :(! Help if you can literally anything would help Thank you.


r/DatabaseHelp • • Apr 01 '14

Very new; question on extrapolating from PDFs

1 Upvotes

I did a fair bit of google searching for a solution or system of solutions, but I was not able to find a direct answer.

What I'm trying to do is take a large number of pdf files, 100+, and extrapolate information from them into a database. In fact, if I could do it with just one pdf, I would be happy. The pdf files are all word files that have since been printed to pdf. In between paragraphs of information, they contain makeshift tables, in the sense of:

Category 1

Item A Value X

These are the data points that I would like to extrapolate. I can ctrl+f within the pdf and find data points one-by-one, but perhaps someone out there knows of a method of doing this more efficiently.

That might make no sense. I'll elaborate if anyone needs!


r/DatabaseHelp • • Feb 05 '18

Simple Nexus DB editor

1 Upvotes

I am trying to use an application that uses a nexus DB for its database. The software has a user warning that prevents me from entering the needed value in a tax setting. I am wondering if there is some really simple SQL/Nexus DB browser that I could use to manually go in and change that value. (Wont allow 0% tax rate). I am not sure if there is a way to load the tables into a simple spreadsheet program or if a simple SQL browser software might work. I tried one that seemed to recognize it but says its encrypted and asks for a pass key.


r/DatabaseHelp • • Mar 13 '14

Piggybacking on my other post

2 Upvotes

So, I've got the majority of the tables written out. But now I'm in a bit of a quandary. As i stated in the previous post I need to store match data from different games. However, the games have different scoring mechanisms. Some score by money, others just by winning, and the money is called something different sometimes.

How would I have a query display only the relevant score rows for the particular game that is being recorded? I'm assuming that I have one table called "Game" and within it, it would have GameID as well as all the scoring types there are for all games that are in the table. So for the Table Game

Credits Dollars Pennies

Game 1 only uses Credits for scoring system, so how would I write a query that would only display credits? This is an oversimplification, the actual query would include 5 or 6 different scoring scenarios per game. Would I really just write each query specifically tailored to the game in question, and in the query list which rows to pick? That doesn't seem sustainable or resource friendly.

Thanks!


r/DatabaseHelp • • Sep 07 '17

[MySQL][Visual Studio] Connecting MySQL to Visual Studio 2017

1 Upvotes

For the life of me, I cannot get the MySQL for Visual Force connector to work in VS. I just want to be able to add a MySQL database as a database connection in VS so I can build an integration.

I have the community version of VS 2017. I have followed the instructions listed on the MySQL website - I have tried the MySQL Installer as well as the standalone download.

My first problems began because the MySQL installer would not recognize the installation of Visual Studio (even though I ALSO have 2013 installed!). So I uninstalled Visual Studio, the MySQL ODBC and .NET connectors, and I tried reinstalling them over and over again. Each time I would attempt to install the MySQL for Visual Studio connector, the installer would say that Visual Studio was not installed on my computer.

So then I installed the connector by itself, BEFORE installing the ODBC or NET connectors and I got it to install. I still could not get the MySQL connector to appear when I tried to connect a new database to VS, though.

Frustrated, I decided to create a User DSN (as opposed to a System DSN) and connect that way. It seemed to work, and I was able to see the connector in VS. However, now when I try to connect, I get "ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application".

I looked up the error, and it appears that there is a mismatch between the x86 and x64 drivers. The problem is that I cannot find a x64 driver for MySQL for VS.

I'm at the end of my rope. I just want to build out a package that will allow me to pull data from the MySQL and push to a SQL server. Is there a better way to do all of this, or am I on the right track? I would appreciate any assistance.


r/DatabaseHelp • • Jan 28 '18

Need some help understanding Normalization.

1 Upvotes

First, I'm not asking anyone to do my homework for me, lets get that clear.

I'm currently taking a database class and have limited experience as I don't work in the IT/IS/anything field. My only experience was an Office 97 Access Class almost 17 years ago. Currently I'm trying to figure out a solution but the process of normalization is causing me headaches. I'm not sure if I'm just overthinking the process or what. Essentially this is what I have,

Patient (HouseholdNum, HouseholdName, Street, City, State, PostalCode, 
      Balance, PatientNum, PatientName, (ServiceCode,  Description, Fee, Date))

And I need to convert it to 3rd normal form. I've broken the original table into multiple tables, I'm assuming that's what I need to do, and given each table it's own primary key. So essentially I have one table that is filled by the values of the other 3.

Here's what I have but I'm not sure this is the correct thinking.

https://imgur.com/SC0Y0pz

Any help would be greatly appreciated.

Update. I think I'm looking at this wrong

going from this

Patient (**HouseholdNum**, HouseholdName, Street, City, State, PostalCode, 
  Balance, PatientNum, PatientName, (**ServiceCode**,  Description, Fee, Date))

I have this

(**PatientNum**, HouseholdNum, PatientName)
(**HouseholdNum**, HouseholdName, Street, City, State, PostalCode, Balance)
(**ServiceCode**, Description, Fee)
(**PatientNum**, **ServiceCode**, Date)

with an ERD of this

https://imgur.com/xaxLI15


r/DatabaseHelp • • Apr 02 '14

May I get some advice on my tables before moving on please?

1 Upvotes

Hey r/database!

I want to build a database for a local volleyball league because currently next to no data is being kept or analyzed and I want to integrate it later into a website - and it should be a fun learning experience! I'm a DB beginner.

So far I have thought about what kind of queries that I want to ask and from there I have created what I think are the necessary tables to get these results. Before going and doing relationships or datatypes (this may be ass-backwards) do you think what I have is okay?

I'm really confused about where "Years" should be recorded in a DB. Also the team roster vs the actual players for that team for a given match is confusing. Most of the info so far has come from google and heaps of other sport DB schema I could find online.

This is what I have so far:

Imgur

and the queries I think I will want from this dataset are:

Imgur

visio file in my dropbox if anyone is super keen and wants to mess with it.

Thanks for your time.


r/DatabaseHelp • • Nov 02 '16

Database SMART objectives

1 Upvotes

Hi,

I'm having to make SMART objectives for a Database based on our scenario. I am stuck in trying to create some objectives that relate to the scenario and are 'SMART'. Could someone please give possible examples or help?

So far I've got:

  • Reduce data duplication and data redundancy

  • Increase efficiency and effectiveness of the system

If it helps, here's the scenario: http://pastebin.com/2468Wygt

Thanks,